我有下面指定的两个类
package otherFeatures;
import org.testng.annotations.Test;
public class DependsOnInheritedTestMethodExample extends ParentClassExample{
@Test(dependsOnMethods = "myTestE")
public void myTestA() {
System.out.println("I am in myTestA");
}
@Test
public void myTestB() {
System.out.println("I am in myTestB");
}
}
上面的类依赖于下面的父类,如图所示
package otherFeatures;
import org.testng.annotations.Test;
public class ParentClassExample {
@Test(dependsOnMethods = "myTestF")
public void myTestE() {
System.out.println("I am in myTestE");
}
@Test
public void myTestF() {
System.out.println("I am in myTestF");
}
}
以前当我两年前运行这个程序时,它给出的结果低于
I am in myTestB
I am in myTestF
I am in myTestE
I am in myTestA
但是现在当我运行时,我看到以下结果
I am in myTestF
I am in myTestE
I am in myTestB
I am in myTestF
I am in myTestE
I am in myTestA
有人可以让我知道为什么当前输出中的“我在 myTestE”和“我在 myTestA”最后再次重复吗?