From: Jake C. <jak...@ga...> - 2011-01-05 21:00:14
|
This is probably better addressed to the Maven plugin group (which is separate from Cobertura itself): http://mojo.codehaus.org/cobertura-maven-plugin/ -Jake Cobb On Wed, Jan 5, 2011 at 8:03 AM, Flavia Rainone <fla...@jb...>wrote: > Can somebody please check if this is a bug? > If there is a workaround I could use, I would be glad. > > Em 30-11-2010 14:34, Flavia Rainone escreveu: > > Hi all, > > > > I'm new to this list and I'm a big fan of Cobertura. > > > > I'm sending this e-mail to talk about a problem I'm having. > > > > If I run mvn clean install cobertura:cobertura with this project: > > https://github.com/jbossas/jboss-msc, the results show 0% of coverage. > > > > The problem started when I changed the pom script: > > https://github.com/jbossas/jboss-msc/blob/master/pom.xml > > > > I needed to run one of the tests with a javaagent enabled, so I had to > > create two test executions: one that runs all the other tests, and a > > second one that runs the specific test with javaagent. Given that the > > test that requires javaagent will fail if it's executed without the > > agent, I added a skip true to the surefire-plugin parent configuration, > > and each surefire execution override this value with false. > > > > My previous pom, that contained the tags below, used to work ok with > > cobertura. > > > > So I'm assuming the cause of the problem is the skip true in the parent > > surefire tag. For some reason, cobertura fails to detect that there are > > surefire executions overriding skip value with false. Can somebody look > > into this? It would be great if this were fixed in a future release :-). > > > > > > <plugin> > > <artifactId>maven-surefire-plugin</artifactId> > > <configuration> > > <systemProperties> > > <property> > > <name>jboss.msc.profile.output</name> > > <value>${project.build.testOutputDirectory}/prof.txt</value> > > </property> > > <property> > > <name>java.util.logging.manager</name> > > <value>org.jboss.logmanager.LogManager</value> > > </property> > > </systemProperties> > > > > <includes> > > <include>**/*TestCase.java</include> > > </includes> > > <excludes> > > <exclude>org/jboss/msc/bench/*.java</exclude> > > <exclude>org/jboss/msc/racecondition/*.java</exclude> > > </excludes> > > </configuration> > > </plugin> > > <plugin> > > <groupId>org.apache.maven.plugins</groupId> > > <artifactId>maven-antrun-plugin</artifactId> > > <version>1.6</version> > > <executions> > > <execution> > > <id>run-racecondition-tests</id> > > <goals> > > <goal>run</goal> > > </goals> > > <phase>test</phase> > > <configuration> > > <target> > > <property name="byteman.path" > > value="${maven.dependency.org.jboss.byteman.byteman.jar.path}" /> > > <property name="report.dir" > > value="${project.build.directory}/surefire-reports" /> > > <property name="testOutputDirectory" > > value="${project.build.testOutputDirectory}" /> > > <property name ="jboss.msc.profile.output" > > value="${project.build.testOutputDirectory}/prof.txt" /> > > <property name="java.util.logging.manager" > > value="org.jboss.logmanager.LogManager" /> > > <property name="bytemanScript" > > > value="${testOutputDirectory}/org/jboss/msc/racecondition/StopRequestedToUpTransitionTestCase.txt"/> > > <junit printsummary="yes" fork="true" haltonfailure="true" > > haltonerror="true"> > > <classpath><path refid="maven.test.classpath"/></classpath> > > <jvmarg value="-javaagent:${byteman.path}=script:${bytemanScript}"/> > > <sysproperty key="org.jboss.byteman.debug" value="true"/> > > <formatter > > classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter" > > usefile="true" extension=".xml" /> > > <formatter type="plain" usefile="true" extension=".txt" /> > > <test fork="yes" > > name="org.jboss.msc.racecondition.StopRequestedToUpTransitionTestCase" > > todir="${report.dir}"/> > > </junit> > > </target> > > </configuration> > > </execution> > > </executions> > > <dependencies> > > <dependency> > > <groupId>ant</groupId> > > <artifactId>ant-junit</artifactId> > > <version>1.6.5</version> > > </dependency> > > <dependency> > > <groupId>junit</groupId> > > <artifactId>junit</artifactId> > > <version>4.4</version> > > </dependency> > > </dependencies> > > </plugin> > > > > Regards, > > > > > > -- > Flavia Rainone | JBoss Core Developer > > M: (+55) (+11) 8122-5466 > YIM/MSNIM: flaviarnn > > > > ------------------------------------------------------------------------------ > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, > and, > should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > |