Because people who have not read and understood concurrency in
practice often do not understand how the synchronization points affect
jvm sequencing, people often wrongly suspect that result of
instrumented and non-instrumented code is the same.

I have had bugs which were not caught by unit tests because:
1. The test passed when the code was not instrumented and failed when
the code was instrumented
2. The test failed when the code was not instrumented and passed when
the code was instrumented

As a result of my experiences I will not help you

-Stephen

On 12 January 2011 15:29, Stefan Schulze <algr...@gmx.de> wrote:
> Hi,
>
> In our project, the tests take some time - more than the developers are 
> willing to execute twice (Surefire and Cobertura) over and over again.
> First I bound Cobertura to verify-phase, but because the developers only run 
> "test" to run the tests only once, they never go through the coverage-checks 
> and the build on the buildserver breaks regularly because of too less 
> coverage.
>
> Because usually the result of instrumented and non-instrumented code is the 
> same, I would like to bind Cobertura on the test-phase and Surefire on the 
> verify-phase. But I can't get it work. Maven always executes either both 
> plugins in the test-phase or successfully skips Surefire but effectivly skips 
> Cobertura, too, because of skipped Surefire.
>
> Currently (both are skipped) I tried to use the following 
> plugin-configuration:
> <plugin>
>  <groupId>org.codehaus.mojo</groupId>
>  <artifactId>cobertura-maven-plugin</artifactId>
>  <version>2.4</version>
>  <configuration>
>    <instrumentation>
>      <excludes>
>        <exclude>**/*Exception.class</exclude>
>      </excludes>
>    </instrumentation>
>    <check>
>      <totalLineRate>80</totalLineRate>
>      <haltOnFailure>true</haltOnFailure>
>    </check>
>  </configuration>
>  <executions>
>    <execution>
>      <phase>test</phase>
>      <goals>
>        <goal>clean</goal>
>        <goal>check</goal>
>      </goals>
>    </execution>
>  </executions>
> </plugin>
> <plugin>
>  <groupId>org.apache.maven.plugins</groupId>
>  <artifactId>maven-surefire-plugin</artifactId>
>  <configuration>
>    <skip>true</skip>
>  </configuration>
>  <executions>
>    <execution>
>      <phase>verify</phase>
>      <goals>
>        <goal>test</goal>
>      </goals>
>      <configuration>
>        <skip>false</skip>
>      </configuration>
>    </execution>
>  </executions>
> </plugin>
>
> Does anybody know how to configure this?
> --
> GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
> gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to