0
war文件位於tomcat7/webapps /中。我曾在pom.xml以下變化:我們可以使用Jacoco測量手動測試的代碼覆蓋率嗎?
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.5.5.201112152213</version>
<configuration>
<destFile>${basedir}/../../../../../../opt/tomcat7/webapps/coverage-reports/jacoco-unit.exec</destFile>
<dataFile>${basedir}/../../../../../../opt/tomcat7/webapps/coverage-reports/jacoco-unit.exec</dataFile>
<outputDirectory>${basedir}/../../../../../../opt/tomcat7/webapps/coverage-reports/jacoco</outputDirectory> </configuration>
<executions>
<execution>
<id>jacoco-initialize</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-site</id>
<phase>package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
建設上述項目後,文件夾獲取tomcat7創建/ webapps中包含的index.html。但同樣的情況繼續給出0%的覆蓋率報告。有什麼我做錯了嗎?