XML加载执行
TestNG testNg = new TestNG();
XmlSuite suite = new XmlSuite();
Map<String,String> map = new HashMap<>();
map.put("groupId",groupId);
suite.setName("TestCaseExcute");
suite.setParameters(map);
XmlTest test = new XmlTest(suite);
test.setName("TestCaseExcute");
List<XmlClass> classes = new ArrayList<XmlClass>();
classes.add(new XmlClass("testplatform.util.TestCaseExcute"));
test.setXmlClasses(classes);
List<XmlSuite> suites = new ArrayList<XmlSuite>();
suites.add(suite);
## 主类执行
```java
TestNG testNg = new TestNG();
Class[] listenerClass = {ExtentTestNGIReporterListener.class, MultiThreadingListener.class};
testNg.setListenerClasses(Arrays.asList(listenerClass));
testNg.setTestClasses(new Class[]{TEST.class});
testNg.run();