我有單元測試,我想在代碼覆蓋率結果報告。 當我運行與Maven的測試,我在日誌:JaCoCo Maven插件爲什麼跳過報告?
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.4.201502262128:report (post-unit-test) @ che-core-api-git ---
[INFO] Skipping JaCoCo execution due to missing execution data file:C:\dev\eclipse_che_core\platform-api\che-core-api-git\target\coverage-reports\jacoco-ut.exec
這是我的POM的相關部分。
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<!--
Prepares the property pointing to the JaCoCo runtime agent which
is passed as VM argument when Maven the Surefire plugin is executed.
-->
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
<!--
Sets the name of the property containing the settings
for JaCoCo runtime agent.
-->
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
<!--
Ensures that the code coverage report for unit tests is created after
unit tests have been run.
-->
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
<!-- Sets the output directory for the code coverage report. -->
<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
爲什麼插件跳過執行?我怎樣才能解決這個問題?
我做了改變,現在我ahve covergae的報告,但爲空,也該文件夾網站jave index.html,但當我打開它,我沒有看到任何結果。 – user1365697
我更新了問題 – user1365697
中的pom.xml我現在沒有得到信息,但也沒有得到任何結果 – user1365697