St.*_*rio 0 java testing testng
我testng 6.11在以下测试类中使用和编写测试:
public class MyTest{
public int i;
public void init(){
//initialize i
}
@Test
public void test1(){
//test some
}
@Test
public void test2(){
//Here I need fresh value of i as it would be
//right after invocation of init()
//...
//test something else
}
}
Run Code Online (Sandbox Code Playgroud)
是否可以init()在调用测试类中的每个测试之前使 testng run方法?