maven test需要配置maven-surefire-plugin和maven-surefire-report-plugin插件

 <build>
      <plugins>
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-surefire-plugin</artifactId>
              <version>2.17</version>
              <configuration>
                  <suiteXmlFiles>
                    <suiteXmlFile>src/test/java/testng.xml</suiteXmlFile>
                  </suiteXmlFiles>
            </configuration>
          </plugin>
      </plugins>         
  </build>
  
    <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>2.17</version>
        <reportSets>
                <reportSet>
                    <reports>
                        <report>report-only</report>
                    </reports>
                </reportSet>
            </reportSets>
      </plugin>
    </plugins>
  </reporting>


参考:http://maven.apache.org/surefire/maven-surefire-plugin/examples/testng.html

http://maven.apache.org/surefire/maven-surefire-report-plugin/usage.html

欢迎光临娇娇家的美衣阁 http://shop105984718.taobao.com/

posted on 2014-06-11 09:09  娇娇家的美衣阁  阅读(1391)  评论(0编辑  收藏  举报

导航