1
我开始在TestNG中使用selenium webdriver。我创建了一个可以运行多个测试的多重测试类,但是,如何在每个测试块中调用其他类而不复制整个代码?TestNG - 如何调用MultipleTest类中的单个测试类
public WebDriver driver;
//Test 1
@Test(priority = 0) //Set Priority of Test - Priority of test always starts from Zero
public void one() {
System.out.println("This is Test Case 1");
}
//Test 2
@Test(priority = 1) // Test priority 1
public void Two(){
System.out.println("This is Test Case 2");
}
我需要创建一个函数来调用每个测试块来运行其他类吗?