I've TestNG with version 7.0.0(also tried with 6.14.3) and want to run tests with specific group say Sanity
hence testng.xml is like -
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="Suite1" verbose="1" >
<test name="Sanity Tests">
<groups>
<run>
<include name="Sanity"/>
</run>
</groups>
</test>
</suite>
and test methods are like -
@Test(groups = {"Sanity"})
public void test4(){
System.out.println("Test4 of Test2");
}
These tests methods are in class which is under maven project - src -> main -> test -> testngtest
When run testng.xml from IDE, it shows no test is run. However if I run those tests by package, class or methods in testng.xml those run.
Could you please help to understand what could be wrong here?