在eclipse中使用Clover
参考资料
http://blog.csdn.net/rubylearner/article/details/7835446
注意事项: 主要license的有效期。
执行某个执行类,或testng-XX,xml,会出现 coverage explorer等信息。在maven中使用Clover
2.1 在pom.xml代码:
com.atlassian.maven.plugins
maven-clover2-plugin
4.0.6
1%
src/test/clover.license
<execution> <phase>pre-site</phase> <goals> <goal>instrument</goal> <goal>aggregate</goal> <goal>clover</goal> </goals> </execution> </executions>
com.atlassian.maven.plugins
maven-clover2-plugin
4.0.6
true
true
true
必须使用license,不然一直会No Clover database found, skip the test coverage
申请细节:
https://my.atlassian.com/注册,生成license,新建文件名:clover.license,放置在工程代码路径下src/test/clover.license。clover.license内容为新的license。
2.2 cmd命令:
mvn clean; mvn install;mvn test; mvn site ; mvn clover2:log 重新编译,运行,输出覆盖率,查看。
参考资料
http://blog.csdn.net/yanmingming1989/article/details/8557981
Clover 的使用方法解读
https://docs.atlassian.com/maven-clover2-plugin/2.3.1/usage.html Maven Clover Plugin的usage部分
目前遗留问题:
src/test/**.java
在重新编译,就不能产生
Clover database