[Maven] maven-sure-plugin unit test

Arranged in pom.xml the JUnit, TestNG testing framework dependent, and can automatically identify the frame by using the prepared test src / test directory operation.

surefire can recognize and perform compliance test methods (POJO test) some general category of naming conventions.

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.18.1</version>
        <configuration>
          ......
      配置内容
      ......
        </configuration>
      </plugin>
  • Skip Test
  • <skipTests>true</skipTests> 
    或 
    mvn install -DskipTests

    Ignore the test fails

  • <testFailureIgnore>true</testFailureIgnore>  
    或  
    mvn test -Dmaven.test.failure.ignore=true

     

Guess you like

Origin www.cnblogs.com/clarino/p/12089242.html