[ 
https://jira.codehaus.org/browse/SUREFIRE-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=329595#comment-329595
 ] 

Andreas Gudian commented on SUREFIRE-1019:
------------------------------------------

I tested around a bit, and this is what I found: even when launching TestNG 
manually with a nice testng.xml referencing the JUnit4 test, it is able to 
execute the tests, but is not able to report the test results. So there's no 
way for me to get it report the results to Surefire either.

This fix here now is only makes sure to let TestNG know when it deals with a 
JUnit test. How well it may run is up to the TestNG version used.

I guess you should strip down your problem to a simple example with the 
JUnit4-Runner you are using and create a non-Surefire related TestNG issue over 
at their tracker.

As a workaround for you, try splitting the TestNG and JUnit tests with a naming 
convention and add two executions of the {{test}} goal to the test phase in 
your pom, once with an include-filter for TestNG and explicitly specifying the 
{{surefire-testng}} provider, and once with an include-filter for the JUnit 
tests with an explicit declaration of the {{surefire-junit47}} provider. That 
should work for you, although it's a bit bulky.
                
> TestNG provider fails to execute certain jUnit tests
> ----------------------------------------------------
>
>                 Key: SUREFIRE-1019
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-1019
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: TestNG support
>    Affects Versions: 2.15
>            Reporter: Andreas Dolk
>            Assignee: Andreas Gudian
>             Fix For: 2.16
>
>         Attachments: maven-log.txt
>
>
> TestNG won't run certain jUnit tests. The test that showed this behaviour are 
> compiled from specs bei jnario and use the special jnario test runner. During 
> a maven build, TestNG "inspects" all test classes but doesn't execute any 
> test method. 
> This thread on the maven uses mailing list contain further informations about 
> this issue:
> http://mail-archives.apache.org/mod_mbox/maven-users/201307.mbox/%3ccakbglvvdaw7tibdyxpjqnnwgknmkxecwdre_m5ncbh6u06v...@mail.gmail.com%3E

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to