I have following code snippet-
Class 1 :- DependencyOne.java
public class DependencyOne
{
@Test(groups = "xxx")
public void parentTestMethodOne()
{
System.out.println("parent Test Method One");
}
@Test(groups = "vizac")
public void parentTestMethodTwo()
{
System.out.println("parent Test Method Two");
}
@Test(groups = "xxx")
public void parentTestMethodThree()
{
System.out.println("parent Test Method Three");
}
}
And The another class is
Class 2 :- DependencyTwo.java
public class DependencyTwo
{
@Test(dependsOnMethods = "testMethodThree")
public void testMethodOne()
{
System.out.println("Test Method One");
}
@Test(dependsOnGroups = "xxx")
public void testMethodTwo()
{
System.out.println("Test Method Two");
}
@Test(dependsOnMethods = "testMethodTwo")
public void testMethodThree()
{
System.out.println("Test Method Three");
}
}
When I'm executing the DependencyTwo it is giving following output -
And what I'm expecting is-
Can any one please explain me why it is happening even I'm accessing only specified group's test methods of other class and Please suggest me how can I access only group specified test methods in other class.