Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 774 Bytes

File metadata and controls

30 lines (24 loc) · 774 Bytes

相比junit增加了更多注解形式,可以使用XML文件配置参数化测试。

依赖测试

指测试的方法是有依赖的,在执行的测试之前需要执行的另一测试。
@Test
public void method1() {
System.out.println("This is method 1");
}

@Test(dependsOnMethods={"method1"})
public void method2() {
System.out.println("This is method 2");
}
如果method1()成功执行,那么method2()也将被执行,否则method2()将会被忽略。

Reference