主方法
import com.com.utlis.createTestngXml;
import org.testng.TestNG;
import java.util.ArrayList;
import java.util.List;
/**
-
@author lw
-
@createTime 2019/3/30 15:35
-
@description testng调试类
*/
public class inittet {
private static final String ESCAPE_PROPERTY = “org.uncommons.reportng.escape-output”;public static void main(String[] args) {
try {
//执行的类
createTestngXml.createTestngXml(“com.com.javatest.one.domese”);
} catch (Exception e) {
e.printStackTrace();
}
System.setProperty(ESCAPE_PROPERTY, “false”);
List suites = new ArrayList();
System.out.println(suites);
suites.add(System.getProperty(“user.dir”) + “/mytestng.xml”);
TestNG tng = new TestNG();
tng.setTestSuites(suites);
tng.run();
}
}
创建xml方法
import