jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven Surefire
  • SUREFIRE-160

Bug into xml report generation

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: None
  • Fix Version/s: 2.4
  • Component/s: xml generation
  • Labels:
    None
  • Environment:
    release 2.0 of maven-surfire-plugin
    mvn 2.0.4
  • Testcase included:
    yes

Description

since 2-3 weeks i have wrong information into my junit test tun (mvn test for example)
In fact, the *.txt are right, but the corresponding xml file have wrong entry. i means additionnal testcase are present ninto the testcase section.
you can find exmple in attachement (ThreadWarningSystemTest for example). You can see that the error number are good (because read into the attribute of the first xml tag) but in several TestSuite, we have testcase form other testsuite.

I don't know if this errors comes from maven dependancies update.
What i am sure is:
1/ a little bit of source modification into my project since this error appears.
2/ no new maven dependancies into my project
3/ i use only ibilio/maven2 as repository.

This errors can'be shown on other projet and other not ...

I have a workaround to solve this issue but with low performance:
I use the option "fork per test" and the reports is right.
Maybe a way to be investigate can be the temporaly file created by the command line:

Forking command line: java -classpath
> C:\HOMEWARE\maven-2_local\org\apache\maven\surefire\surefire-api\2.0\surefire-api-2.0.jar;C:\HOMEWARE\maven-2_local\o
> rg\codehaus\plexus\plexus-utils\1.1\plexus-utils-1.1.jar;C:\HOMEWARE\maven-2_local\org\apache\maven\surefire\surefire-booter\2.0\surefire-booter-2.0.jar or
> g.apache.maven.surefire.booter.SurefireBooter C:\temp\surefire40840tmp C:\temp\surefire40841tmp

Any Idea ?
Thx
Christophe

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    nick.zip
    13/Oct/06 4:12 AM
    5 kB
    Nick Cunnah
    1. XML File
      TEST-TestA.xml 4 kB
    2. XML File
      TEST-TestB.xml 4 kB
    3. XML File
      TEST-TestC.xml 4 kB
    4. Java Source File
      TestA.java 0.2 kB
    5. Text File
      TestA.txt 0.2 kB
    6. Java Source File
      TestB.java 0.2 kB
    7. Text File
      TestB.txt 0.2 kB
    8. Java Source File
      TestC.java 0.2 kB
    9. Text File
      TestC.txt 0.2 kB
    10. Text File
      out.txt 0.5 kB
    Download Zip
    Show
    Zip Archive
    nick.zip
    13/Oct/06 4:12 AM
    5 kB
    Nick Cunnah
  2. XML File
    TEST-deai.ft.archi.common.debug.ThreadWarningSystemTest.xml
    11/Oct/06 11:25 AM
    6 kB
    Christophe Lallement
  3. Java Source File
    ThreadWarningSystem.java
    11/Oct/06 11:25 AM
    6 kB
    Christophe Lallement
  4. Java Source File
    ThreadWarningSystemTest.java
    11/Oct/06 11:25 AM
    4 kB
    Christophe Lallement

Issue Links

duplicates

Bug - A problem which impairs or prevents the functions of the product. SUREFIRE-52 XML Reports include testcases from previous tests

  • Minor - Minor loss of function, or other problem where easy workaround is present.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Nick Cunnah added a comment - 13/Oct/06 4:09 AM

I am also seeing this same bug.
Again *.txt are ok but *.xml are also including results from previous test cases.

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestB testB
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.125 sec
Running TestC testC
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 sec
Running TestA testA
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec

Results :
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0

[TEST-TestB.xml]
...
<testcase time="0.003" name="testB"/>

[TEST-TestC.xml]
...
<testcase time="0.003" name="testB"/>
<testcase time="0" name="testC"/>

[TEST-TestA.xml]
...
<testcase time="0.003" name="testB"/>
<testcase time="0" name="testC"/>
<testcase time="0.001" name="testA"/>

For further details see nick.zip attachment for the 3 very simple "helloworld" style tests (.java, .txt and .xml) files.

Cheers,

Nick

Show
Nick Cunnah added a comment - 13/Oct/06 4:09 AM I am also seeing this same bug. Again *.txt are ok but *.xml are also including results from previous test cases. ------------------------------------------------------- T E S T S ------------------------------------------------------- Running TestB testB Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.125 sec Running TestC testC Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 sec Running TestA testA Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec Results : Tests run: 3, Failures: 0, Errors: 0, Skipped: 0 [TEST-TestB.xml] ... <testcase time="0.003" name="testB"/> [TEST-TestC.xml] ... <testcase time="0.003" name="testB"/> <testcase time="0" name="testC"/> [TEST-TestA.xml] ... <testcase time="0.003" name="testB"/> <testcase time="0" name="testC"/> <testcase time="0.001" name="testA"/> For further details see nick.zip attachment for the 3 very simple "helloworld" style tests (.java, .txt and .xml) files. Cheers, Nick
Hide
Permalink
Nick Cunnah added a comment - 13/Oct/06 4:12 AM

Simle test cases and results.

Show
Nick Cunnah added a comment - 13/Oct/06 4:12 AM Simle test cases and results.
Hide
Permalink
Antoine Levy-Lambert added a comment - 23/Oct/06 7:52 PM

Hi,
I built maven-surefire-plugin from HEAD to run the testcases of ... ant and I also observed the same issue.

Regards,

Antoine

Show
Antoine Levy-Lambert added a comment - 23/Oct/06 7:52 PM Hi, I built maven-surefire-plugin from HEAD to run the testcases of ... ant and I also observed the same issue. Regards, Antoine
Hide
Permalink
Brice Copy added a comment - 17/Nov/06 5:08 AM

Could someone fix this and make it the default version of the plugin ? Because of this bug, the surefire reports are rather unreadable when building multiple modules

Show
Brice Copy added a comment - 17/Nov/06 5:08 AM Could someone fix this and make it the default version of the plugin ? Because of this bug, the surefire reports are rather unreadable when building multiple modules
Hide
Permalink
Milos Volauf added a comment - 12/Jan/07 6:56 AM

Hi.

I am also voting for this bug to be fixed.

Here is a hint for the fix:

in the module surefire-api, the class org.apache.maven.surefire.report.XMLReporter
should implement a method:

public void testSetStarting(ReportEntry report) throws ReporterException { super.testSetStarting(report); results.clear(); }

(before each start, previous result should be cleared. AbstractTextReporter does the same.)

I tried it locally and it works.

Can someone provide a guess when this fix could appear in the released plugin (e.g. maven-surefire-plugin version 2.2.1 or something) ?

Show
Milos Volauf added a comment - 12/Jan/07 6:56 AM Hi. I am also voting for this bug to be fixed. Here is a hint for the fix: in the module surefire-api, the class org.apache.maven.surefire.report.XMLReporter should implement a method: public void testSetStarting(ReportEntry report) throws ReporterException { super.testSetStarting(report); results.clear(); } (before each start, previous result should be cleared. AbstractTextReporter does the same.) I tried it locally and it works. Can someone provide a guess when this fix could appear in the released plugin (e.g. maven-surefire-plugin version 2.2.1 or something) ?
Hide
Permalink
Andreas Ebbert-Karroum added a comment - 13/Feb/07 4:23 AM

I cannot beleive that this bug is still unfixed, it basically makes surefire unusable with maven2!

Show
Andreas Ebbert-Karroum added a comment - 13/Feb/07 4:23 AM I cannot beleive that this bug is still unfixed, it basically makes surefire unusable with maven2!
Hide
Permalink
Henri Yandell added a comment - 15/Feb/07 2:03 AM

+1, this bug's bitten me a couple of times now [10000 tests? wow! *investigate*... ohhh].

Show
Henri Yandell added a comment - 15/Feb/07 2:03 AM +1, this bug's bitten me a couple of times now [10000 tests? wow! *investigate*... ohhh].
Hide
Permalink
Dan Fabulich added a comment - 21/Nov/07 6:54 PM

This got fixed at some point. Integration test checked in revision 597279.

Show
Dan Fabulich added a comment - 21/Nov/07 6:54 PM This got fixed at some point. Integration test checked in revision 597279.

People

  • Assignee:
    Unassigned
    Reporter:
    Christophe Lallement
Vote (19)
Watch (15)

Dates

  • Created:
    11/Oct/06 11:25 AM
    Updated:
    21/Nov/07 6:54 PM
    Resolved:
    21/Nov/07 6:54 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.