Vivek
Vivek

Reputation: 11

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. *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

Upvotes: 1

Views: 320

Answers (1)

Raghuram
Raghuram

Reputation: 52635

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.

Upvotes: 1

Related Questions