Giter Club home page Giter Club logo

Test4J


test4j是一个单元测试和集成测试的框架,目前已经分拆成4个子项目

test4j项目作为一个总控集成框架继续存在, test4j提供了3个测试框架的总控集成

  • test4j-junit4 使用junit4进行测试
  • test4j-junit5 使用junit5进行测试
  • test4j-testng 使用testng进行测试

使用

  • maven pom.xml
<project>
<properties>
    <fluent-mock.version>1.0.5</fluent-mock.version>
    <test4j.version>2.7.1</test4j.version>
</properties>
<dependencies>
    <dependency>
        <groupId>org.test4j</groupId>
        <artifactId>test4j-junit4</artifactId>
        <!-- 
        <artifactId>test4j-junit5</artifactId>
        <artifactId>test4j-testng</artifactId>
        -->
        <version>${test4j.version}</version>
        <scope>test</scope>
    </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.22.2</version>
            <configuration>
                <useSystemClassLoader>true</useSystemClassLoader>
                <testFailureIgnore>true</testFailureIgnore>
                <parallel>all</parallel>
                <!-- 重要,argLine用于surefire插件启动fluent-mock -->
                <argLine>-javaagent:"${settings.localRepository}/org/test4j/fluent-mock/${fluent-mock.version}/fluent-mock-${fluent-mock.version}.jar</argLine>
                <forkMode>always</forkMode>
                <threadCount>1</threadCount>
            </configuration>
        </plugin>
    </plugins>
</build>
</project>
  • gradle
dependencies {
    testCompile('org.test4j:test4j-junit5:2.7.1')
    //annotationProcessor('org.test4j:fluent-mock:${fluent-mock.version}')
    testAnnotationProcessor('org.test4j:fluent-mock:1.0.5')

    test {
        jvmArgs "-javaagent:${classpath.find { it.name.contains("fluent-mock") }.absolutePath}"
        useJUnitPlatform()
    }
}

davey.wu's Projects

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.