Issue Details (XML | Word | Printable)

Key: SUREFIRE-52
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Minor Minor
Assignee: Unassigned
Reporter: bin zhu
Votes: 14
Watchers: 9
Operations

If you were logged in you would be able to see more operations.
Maven Surefire

XML Reports include testcases from previous tests

Created: 05/Aug/06 09:24 AM   Updated: 21/Nov/07 06:53 PM
Component/s: None
Affects Version/s: 2.0 (2.2 plugin)
Fix Version/s: 2.4

Time Tracking:
Not Specified

File Attachments: 1. Text File patch.txt (0.6 kB)

Issue Links:
Duplicate

Complexity: Intermediate
Patch Submitted: Yes


 Description  « Hide
to reproduce

1. create the following JUnit tests:

public class TestA extends TestCase {
public void test1() {
}
}

public class TestB extends TestCase {
public void test2() {
}

2. run 'mvn clean install'

note that in TEST-TestB.xml includes testcase results from test1 and test2, even though TestB only has test2()

<testsuite errors="0" skipped="0" tests="1" time="0" failures="0" name="TestB">
...
<testcase time="0" name="test1"/>
<testcase time="0" name="test2"/>
</testsuite>



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Brice Copy added a comment - 17/Aug/06 04:36 AM
Is there a workaround for this, like using an older version of surefire ?

Mirko Nasato added a comment - 20/Nov/06 12:43 PM
I'd suggest raising the Priority from Minor to Major.

It may be just a presentation issue, but frankly it's quite annoying to see all the HTML reports incorrect, even for all the Maven plugins themselves

http://maven.apache.org/plugins/maven-install-plugin/surefire-report.html
http://maven.apache.org/plugins/maven-resources-plugin/surefire-report.html
http://maven.apache.org/plugins/maven-ear-plugin/surefire-report.html
...


Dave Syer added a comment - 23/Nov/06 05:56 AM
I can't understand why this is categorised as "minor". Would it get more attention if someone bumped it up to "major"?

Klaus Brunner added a comment - 30/Nov/06 11:56 AM
My workaround is to use <forkMode>always</forkMode> in the surefire plugin config of the POM. Slows things down a bit, but at least the reports are coherent.

Lilians Auvigne added a comment - 16/Feb/07 08:03 AM
With workaround
<forkMode>always</forkMode>
or
<forkMode>pertest</forkMode>
, i have always the problem.
I am obliged to use version 2.2 because I use TestNG.

Why the patch is not applied, in 2.3-SNAPSHOT ?


Lilians Auvigne added a comment - 19/Feb/07 07:34 AM
Applied in this commit (see patch in SUREFIRE-122) :

Revision: 479603
Author: jvanzyl
Date: 13:25:21, lundi 27 novembre 2006
Message:
SUREFIRE-114: With forkmode once, XML reports are cumulative
Submitted by: Eugene Zhuravlev
M report/XMLReporter.java


Modified : /maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/XMLReporter.java


Dan Fabulich added a comment - 21/Nov/07 06:53 PM
This got fixed at some point. Checked in an integration test in revision 597279.