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

Karl Heinz Marbaise commented on SUREFIRE-1066:
-----------------------------------------------

First which test classes are beeing run is based on the [include rules of 
maven-surefire-plugin|http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#includes]
 which is not related to any annotation if you use plain maven-surefire-plugin.
To make discussion simpler [i have setup an example github project which 
contains a configuration for testng as well as 
junit|https://github.com/khmarbaise/surefire]. I have checked 
maven-surefire-plugin 2.11, 2.7.2, 2.14.1 and 2.16 and all of them behave the 
same. Only a test class [which fulfils the naming 
convention|http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#includes]
 its test will be exeuted. The naming conventions is needed to [separate 
between unit and integration 
tests|http://maven.apache.org/surefire/maven-failsafe-plugin/].  

> version 2.14.1 runs tests only if named *Test.java
> --------------------------------------------------
>
>                 Key: SUREFIRE-1066
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-1066
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.14.1, 2.16
>            Reporter: Max Calderoni
>
> This is a regression from 2.11, where it was working fine.
> For TestNG (and JUnit) tests, in order to be run by surefire, all you needed 
> to do is to get the correct annotations in place (@Test) regardless of the 
> name of your test classes.
> Looks like between version 2.11 and 2.14.1 surefire started *not* running 
> classes whose name did not end with the word 'Test' (like it was few years 
> back, when there were no annotations).
> That means that upgrading to 2.16 will break previous test code.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to