![](/img/trans.png)
[英]Integration tests code coverage report with OpenClover, Java and Gradle
[英]Surefire and OpenClover - Generate Clover report if tests fail
我正在使用插件插件maven-surefire-plugin 2.20.1和OpenClover插件的4.2.0版本
Surefire設置
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20.1</version>
</plugin>
OpenClover設置
<plugin>
<groupId>org.openclover</groupId>
<artifactId>clover-maven-plugin</artifactId>
<version>4.2.0</version>
</plugin>
如果任何測試失敗-不會生成三葉草報告這是我用來生成測試的命令
mvn clean clover:setup test clover:aggregate clover:clover -DskipTests=false -DtestFailureIgnore=true
我有什么想法要使三葉草即使在測試失敗時也可以生成報告?
謝謝達米恩
我通過在我的maven命令中添加maven --fail-never選項來解決此問題
更新的命令是
mvn clean clover:setup test clover:aggregate clover:clover -DskipTests=false -DtestFailureIgnore=true -fail-never
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.