`
banner
  • 浏览: 52726 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

用maven生成Junit test report

阅读更多
  看到别人用ant生成了junit test report,而自己的maven2只在target的surefire-reports中生成了一堆的txt/xml文件。打开pom.xml发现:surefire-reports被加在了build中。把这段设置去掉,在reporting中加入:
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
      </plugin>
于是surefire-report.html在site中生成了,同时依然会生成surefire-reports。
当然还可以设置一些configuration。
  上面是针对maven2;maven1中相应的plugin是:maven-junit-report-plugin。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics