[ 
http://jira.codehaus.org/browse/SUREFIRE-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=242669#action_242669
 ] 

Marvin Froeder commented on SUREFIRE-446:
-----------------------------------------

I made a small patch that doesn't solve the problem of the testNG html report, 
but, it makes this issue more manageable, specially for those running testNG + 
maven + forked=always on CI servers
{code}
Index: 
surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java
===================================================================
--- 
surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java
     (revision 1033415)
+++ 
surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java
     (working copy)
@@ -98,6 +98,8 @@
             throw new TestSetFailedException( "Unable to find test set '" + 
testSetName + "' in suite" );
         }
 
+        this.options.put( "suitename", testSetName );
+
         ReporterManager reporterManager = 
reporterManagerFactory.createReporterManager();
         startTestSuite( reporterManager, this );
 
{code}

This will create on report.xml per test. This eliminates the problem on CI 
builds and makes it much more useful for people running it locally, since now 
it is possible to see the test failure result.

VELO

> Surefire fails to capture TestNG results when forkMode=always
> -------------------------------------------------------------
>
>                 Key: SUREFIRE-446
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-446
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: process forking
>    Affects Versions: 2.4
>         Environment: Maven 2.0.8, JDK 1.5.0_12, WinXP
>            Reporter: Benjamin Bentmann
>             Fix For: Backlog
>
>         Attachments: testng-fork-mode-it.patch
>
>
> The interplay between {{surefire.Surefire}} and 
> {{testng.TestNGDirectoryTestSuite}} does not properly notify the 
> ReportManager such that it reports 0 executed tests after the end of the day. 
> IT to reproduce attached.
> Also confirmed against 2.5-SNAPSHOT.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to