1. Tests that verify multiple thread behaviour. as cobertura will
effectively synchronize the threads in order to record the code
coverage.
2. Tests that verify performance.
3. One system had a bug whereby the server we were communicating with
would read the message header from the stream and then block until the
next packet (the body) was sent. when instrumented the two packets
were sent by our client due to instrumentation adding enough of a
delay. when running in the real world communication did not work as
they were sent as a single packet.
NOTE: in all cases the issues identified were real issues. and the
fact that the results differed between instrumented and uninstrumented
caused us to find these bugs.
I have similar stories where tests passed uninstrumented and failed
instrumented.
IMHO, you need to run them twice on more than one JVM!
- Stephen
Sent from my iPod
On 25 Mar 2008, at 18:08, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
Can you provide details for one or two of them? I'd like to know what
to look out for in the future.
Wayne
On 3/25/08, Stephen Connolly <[EMAIL PROTECTED]> wrote:
beware. we have had tests that pass when instrumented with cobertura,
but fail when run normally. this is at least one reason why what you
are trying to do is "a bad thing"
- Stephen
Sent from my iPod
On 25 Mar 2008, at 16:13, "Brian Relph" <[EMAIL PROTECTED]> wrote:
Hello,
I was wondering if someone could help me fix my surefire + cobertura
config. I only want one unit tests to run ONE time, but when I add
the
cobertura-maven-plugin to the reporting section, it seems to trigger
another
surefire:test phase. Any help?
Here is my current config:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>site</id>
<phase>pre-site</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
<execution>
<id>instrument</id>
<phase>site</phase>
<goals>
<goal>instrument</goal>
<goal>cobertura</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<forkMode>once</forkMode>
<systemProperties>
<property>
<name>
net.sourceforge.cobertura.datafile
</name>
<value>
target/cobertura/cobertura.ser
</value>
</property>
</systemProperties>
</configuration>
</plugin>
</plugins>
...
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>
maven-project-info-reports-plugin
</artifactId>
<version>2.0.1</version>
<reportSets>
<reportSet>
<reports>
<report>dependencies</report>
<report>cim</report>
<report>project-team</report>
<report>summary</report>
<report>issue-tracking</report>
<report>scm</report>
<report>index</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.4.2</version>
<reportSets>
<reportSet>
<reports>
<report>report-only</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.2</version>
</plugin>
...
</reporting>
--
Brian
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]