Я пытаюсь создать покрытие кода для моего проекта GWT maven.Как настроить покрытие с помощью GWT, maven, jacoco?
Он работает с моим JUnit тест
mvn test jacoco:report
Но когда я бегу
mvn gwt:test jacoco:report
пустой отчет.
Как получить покрытие кода, когда я запускаю тесты gwt:?
pom.xml
GWT:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<module>${gwtModule}</module>
<gwtVersion>2.5.1</gwtVersion>
<runTarget>https://localhost:8443/dashboard/mainview.jsp</runTarget>
<noServer>true</noServer>
<sourcesOnPath>true</sourcesOnPath>
<hostedWebapp>${war.target}</hostedWebapp>
<mode>HtmlUnit</mode>
</configuration>
<executions>
<execution>
<configuration>
<extraJvmArgs>-Xmx512m</extraJvmArgs>
</configuration>
<goals>
<goal>compile</goal>
<goal>test</goal>
</goals>
</execution>
</executions>
Jacoco:
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.6.2.201302030002</version>
<configuration>
<destfile>${basedir}/target/coverage-reports/jacoco-unit.exec</destfile>
<datafile>${basedir}/target/coverage-reports/jacoco-unit.exec</datafile>
</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>
Вы пробовали JBoss's ['jacoco-gwt-maven-plugin'] (http://search.maven.org/#artifactdetails%7Corg.jboss.errai%7Cjacoco-gwt-maven-plugin%7C0.5.4. 201202141554% 7Cmaven-плагин)? –
Я попробовал, но я не смог его запустить. У вас есть пример о том, как его использовать? – kesse
https://github.com/search?q=%22jacoco-gwt-maven-plugin%22&type=Code может быть? –