when I tried to execute this below code, I am confused with the order of Test Methods E and A.
My Output order is C->D->E->A->B
public class Example5
{
@Test
public void A()
{
System.out.println("A");
}
@Test(dependsOnGroups={"MM"})
public void B()
{
System.out.println("B");
}
@Test(groups={"MM"})
public void C()
{
System.out.println("C");
}
@Test(groups={"MM"})
public void D()
{
System.out.println("D");
}
@Test
public void E()
{
System.out.println("E");
}
}
From the output, I can see Test Methods C and D got executed before B method(this I can understand), but what I don't understand is the sequential order of E and A methods.
Please explain how TestNG follows sequential order in this code