Hey guys,
This is my first post on JaCoCo. I've enjoyed working with code coverage; it's
enlightened my team and has promoted writing good tests.
That being said I'm having trouble getting full code coverage for my new
project that has web integration. Below is a sample.
CodeCoverage (parent pom)
-> CodeCoverage-jar
-> src\main\java\com\sandbox\Greeting.java
-> src\test\java\com\sandbox\GreetingTest.java
-> CodeCoverage-web
-> src\main\java\com\sandbox\HelloWorldMB.java (JSF Managed Bean)
-> src\test\java\com\sandbox\HelloWorldPageIT.java (Web Driven Test)
Using some other blogs/forum posts I've successfully split up the integration
and unit tests. Using the attached snippet. My unit tests run, instrumented
code is deployed to the server, and integration tests are run. I can clearly
see unit tests and integration test results. However, my web integration tests
don't look like they are hitting my jar code. If I have 100% code coverage
through my web tests and comment out all of my jar tests; I should still see
100% code coverage. I do not; it only shows 100% code coverage in my web
project. Any help would be greatful.
Thanks,
Chris
[code]
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.6.4.201312101107</version>
<executions>
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
<execution>
<id>prepare-agent-integration</id>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
<configuration>
<destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
<propertyName>failsafeArgLine</propertyName>
</configuration>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
</configuration>
</execution>
<execution>
<id>report-integration</id>
<goals>
<goal>report-integration</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/coverage-reports/jacoco-it.exec</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
[/code]
--
You received this message because you are subscribed to the Google Groups
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.