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

Kristian Rosenvold closed SUREFIRE-549.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.11
         Assignee: Kristian Rosenvold

As of r1200541, all the configuration properties are now properly sent to 
testng in forkmode always, this solves this issue too. In fact, I seem to be 
running into trouble if I *supply* the TestNG parameter, which I suppose might 
be related to junit version. Removing junit parameter works fine

> TestNg provider does not run junit tests correctly when forkMode=always
> -----------------------------------------------------------------------
>
>                 Key: SUREFIRE-549
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-549
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: TestNG support
>    Affects Versions: 2.4.3
>            Reporter: Michael Pigg
>            Assignee: Kristian Rosenvold
>            Priority: Minor
>             Fix For: 2.11
>
>         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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to