You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Surefire is using the MethodSelector the same for option junit=true|false.
These are our calls. As @baev found out the selector is not applied to JUnit if the option is set to true.
Hi @juherr , thx for fast reply.
I appreciate if you make a try. It's TestNGDirectoryTestSuite class.
The Parameterized is more complex runner, so I tried to test similar scenario mvn test -Dtest=MyTest2#testWithParameters with pure JUnit test class and two methods but still the bad result : either nothing to run or running both methods.
Well, forget what I said about XmlMethodSelector, I was wrong and I confirm it is a TestNG issue: IMethodSelector (first time I see it :p) is not used by JUnit runners.
In case TestNG in project classpath surefire-maven-plugin runs the JUnit tests ignore method name filtering.
There is a sample project to reproduce: https://github.com/baev/surefire-testng-junit-bug
Simply clone it and run
mvn clean test -Dtest=MyTest#asdasdasd
There is no test named
asdasdasd
and there is no TestNG suites or tests. There is only the dependency in classpath.TestNG 6.9.10
maven-surefire-plugin 2.19.1
See for more details https://issues.apache.org/jira/browse/SUREFIRE-1225?focusedCommentId=15141199&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15141199
Summon @Tibor17
The text was updated successfully, but these errors were encountered: