1XmlTest xmlTest = new XmlTest();2xmlTest.setName("Test");3xmlTest.setParallel(XmlSuite.ParallelMode.METHODS);4xmlTest.setThreadCount(3);5xmlTest.setPreserveOrder(true);6xmlTest.setVerbose(2);7xmlTest.setParameters(new HashMap<String, String>() {{8put("browser", "chrome");9}});10xmlTest.setParameters(new HashMap<String, String>() {{11put("browser", "firefox");12}});13xmlTest.setParameters(new HashMap<String, String>() {{14put("browser", "ie");15}});16XmlSuite xmlSuite = new XmlSuite();17xmlSuite.setName("Suite");18xmlSuite.setParallel(XmlSuite.ParallelMode.METHODS);19xmlSuite.setThreadCount(3);20xmlSuite.setPreserveOrder(true);21xmlSuite.setVerbose(2);22xmlSuite.setParameters(new HashMap<String, String>() {{23put("browser", "chrome");24}});25xmlSuite.setParameters(new HashMap<String, String>() {{26put("browser", "firefox");27}});28xmlSuite.setParameters(new HashMap<String, String>() {{29put("browser", "ie");30}});31xmlSuite.addTest(xmlTest);32List<XmlSuite> suites = new ArrayList<>();33suites.add(xmlSuite);34TestNG tng = new TestNG();35tng.setXmlSuites(suites);36tng.run();37}38XmlTest xmlTest = new XmlTest();39xmlTest.setName("Test");40xmlTest.setParallel(XmlSuite.ParallelMode.METHODS);41xmlTest.setThreadCount(3);42xmlTest.setPreserveOrder(true);43xmlTest.setVerbose(2);44xmlTest.setParameters(new HashMap<String, String>() {{45put("browser", "chrome");46}});47xmlTest.setParameters(new HashMap<String, String>() {{48put("browser", "firefox");49}});50xmlTest.setParameters(new HashMap<String, String>() {{51put("browser", "ie");52}});53XmlSuite xmlSuite = new XmlSuite();54xmlSuite.setName("Suite");55xmlSuite.setParallel(XmlSuite.ParallelMode.METHODS);