本文共 826 字,大约阅读时间需要 2 分钟。
public static void main(String args[]){ tng = new TestNG(); tng.SetTestClasses(new Class[]{MyTest.class}) //这里可以加多个类。 tng.run(); } |
public static void main(String args[]){ TestNG tng = new TestNG(); RetryTestListener rtl = new RetryTestListener(); XmlSuite xs = new XmlSuite(); Parser parser = new Parser("./testxml/temp.xml"); List<XmlSuite> suites = new ArrayList<XmlSuite>(); try { suites = parser.parseToList(); } catch (ParserConfigurationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SAXException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); }; tng.setXmlSuites(suites); tng.addListener(rtl); tng.run(); } |
转载地址:http://yjtta.baihongyu.com/