From: Chris V. <cv...@me...> - 2015-08-18 20:12:13
|
Hi all, I have a Maven-based project where I'm using Cobertura 2.1.1 via the Cobertura Maven Plugin 2.7. Tests are being run using PowerMock 1.5.2 (Junit 4.11) and Java 1.7.0_80. The tests are running just fine, but one class appears to have 0% line coverage even though the class' tests are being executed. ... Running com.xxx.apps.commons.jobs.misc.TimeUtilsTest Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.412 sec - in com.xxx.apps.commons.jobs.misc.TimeUtilsTest ... [INFO] --- cobertura-maven-plugin:2.7:check (default) @ commons-jobs --- [INFO] Cobertura 2.1.1 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file [INFO] Cobertura: Loaded information on 59 classes. [[ERROR] com.xxx.apps.commons.jobs.misc.TimeUtils failed coverage check. Line coverage rate of 0.0% is below 75.0% ... The <build> section from pom.xml is: <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>${cobertura.version}</version> <configuration> <check> <totalBranchRate>90</totalBranchRate> <packageBranchRate>90</packageBranchRate> </check> <instrumentation> <excludes> <exclude>**/*Exception.class</exclude> <exclude>**/JobStatus.class</exclude> <exclude>**/PGPUtils.class</exclude> <exclude>**/LastLineRemover.class</exclude> <exclude>**/EofMarkRemoverStrategy.class</exclude> <exclude>**/MonitorStatusReporter*.class</exclude> <exclude>**/JobConfiguration.class</exclude> </excludes> </instrumentation> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <!-- Use the version from the parent --> <configuration> <argLine>-Xmx1024m -XX:MaxPermSize=1024m</argLine> </configuration> </plugin> </plugins> </build> After playing with this for awhile now, I'm at a bit of a loss for what to do next to continue debugging. The TimeUtils class is showing up in the cobertura.ser file, it's being executed, etc. Any guidance that you can provide would be greatly appreciated! Thanks, Chris |