[ 
http://jira.codehaus.org/browse/SUREFIRE-549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kristian Rosenvold updated SUREFIRE-549:
----------------------------------------

    Component/s:     (was: process forking)
                 TestNG support

> TestNg provider does not run junit tests correctly when forkMode=always
> -----------------------------------------------------------------------
>
>                 Key: SUREFIRE-549
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-549
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: TestNG support
>    Affects Versions: 2.4.3
>            Reporter: Michael Pigg
>            Priority: Minor
>         Attachments: SurefireJunitViaTestngProblem.zip
>
>
> We have both TestNG-based tests for unit testing and Junit-based tests (that 
> use Spring OSGi test framework) for integration testing. When running the 
> JUnit tests we would like to use forkMode=always to force the OSGi container 
> to be created for each test. However, when forkMode=always is set, the TestNG 
> provider does not properly run the JUnit test. In the default forkMode of 
> once, the JUnit tests are executed.
> The problem is that the TestNGDirectoryTestSuite.execute method is coded to 
> run both TestNG and JUnit tests when run for multiple test sets (which is 
> executed for forkMode=once), but when run for one test it seems to assume 
> that the test is a TestNG test. I think it should check for JUnit tests in 
> either mode of execution.
> The work-around for the problem is to add the TestNG junit property to the 
> surefire configuration when running the JUnit tests:
> <properties>
>      <property>
>            <name>junit</name>
>            <value>true</value>
>      </property>
> </properties>

-- 
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