On Mon, Dec 22, 2008 at 9:43 AM, Stephen Connolly <[email protected]> wrote:
> Now for my standard disclaimer: > > "RUN THE DAMN TESTS TWICE!" > > I have seen: > > 1, Tests that fail when run without coverage but pass when run with > coverage. > 2. Tests that pass when run without coverage but fail when run with > coverage. Stephen, I actually saw your post come up stating the same thing while searching for "how I make sure cobertura only runs the tests once" in this thread here http://www.nabble.com/cobertura-%2B-surefire-config-td16281994.html I understand what you are saying about being sure that they are run twice (once before instrumentation), but for general use during the course of the day I'd still like to shorten the cycle by only having the tests run one time. You mention to use a profile to accomplish this, and I'm trying different things to no avail. If I disable the surefire plugin in my plugin the tests never run, so I'm confused what to do? I'm confused on how I'm supposed to set up the profile to only run the test suite once after instrumentation? I was trying a profile like below which I thought might work. I thought maybe cobertura would still force the tests to run even with the surefire plugin was set to skip, but in this scenario I get no tests run. If I remove the surefire plugin from the profile, I'll end up with the tests run twice. Thanks for any help. <profile> <id>coverage</id> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <configuration> <instrumentation> .... </instrumentation> </configuration> <executions> <execution> <phase>test</phase> <goals> <goal>cobertura</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.4.2</version> <configuration> <skip>true</skip> </configuration> </plugin> </plugins> </build> </profile> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
