0
我使用Clover代碼覆蓋率,並在我的pom.xml文件中具有以下設置。三葉草代碼覆蓋率:檢測單元測試
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-clover2-plugin</artifactId>
<version>4.0.3</version>
<configuration>
<generateHtml>true</generateHtml>
<generateXml>false</generateXml>
<includesTestSourceRoots>false</includesTestSourceRoots>
<includesAllSourceRoots>true</includesAllSourceRoots>
<license>MyLicense</license>
<jdk>1.8</jdk>
<excludes>
<exclude>**/classes/</exclude>
<exclude>**/generated-sources/</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>main</id>
<phase>verify</phase>
<goals>
<goal>instrument</goal>
<goal>check</goal>
<goal>log</goal>
</goals>
</execution>
<execution>
<id>site</id>
<phase>pre-site</phase>
<goals>
<goal>instrument</goal>
<goal>clover</goal>
</goals>
</execution>
</executions>
</plugin>
然後我運行Maven方式如下:
mvn clean install clover2:instrument clover2:instrument-test clover2:aggregate clover2:clover
雖然我看到的代碼覆蓋率等細節,我看到以下警告:
沒有測試結果 沒有測試結果可能被發現。請確保您已正確安裝了您的單元測試。
這是什麼意思?我如何測試Clover的Junit測試用例類?