开发者

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

  1. *Test.java
  2. Test*.java
  3. 开发者_如何学JAVA
  4. *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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜