Running TestNG classes named without convention in Maven
I am developing TestNG classes in a Maven Project and executing the same. I understand the fact that ,for the maven-surefire-plugin the classname should be in either of the following formats
- *Test.java
- Test*.java 开发者_如何学JAVA
- *TestCase.java
But incase I would NOT be naming my class as per this convention , does the plugin pick up the test classes depending upon the Java MetaData , as is the case with TestNG.
If not then is defining the names of the classes in testng.xml the way out or is there some other way ??
Thanks in Advance, Vivek
As per this documentation, you can explicitly include and exclude tests, as well as specify complex regex patterns. You could try this in lieu of maintaining a testng.xml
.
精彩评论