开发者

Running TestNG classes named without convention in Maven

开发者 https://www.devze.com 2023-03-19 05:38 出处:网络
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

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

精彩评论

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

关注公众号