You can run testng directly from commandline, probably make a bat file on top of it or use jenkins to trigger it. Refer here
or
If you want it in main, then you can try
TestListenerAdapter tla = new TestListenerAdapter();
TestNG testng = new TestNG();
List<String> suites = Lists.newArrayList();
suites.add("c:/tests/testng1.xml");//path to xml..
suites.add("c:/tests/testng2.xml");
testng.setTestSuites(suites);
testng.run();
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…