I'm wondering how I can write a program to run TestNG tests, still using the testng.xml file. For example, how do I make a class that can do this:
TestNG ng = new TestNG();
//ng.setTests("testng.xml") or something similar
ng.run();
I've looked at the documentation, but it's not very detailed, so I'm not sure if this is possible. Obviously, the comment should be replaced with the actual code to use the testng.xml file.
Do I need to use the TestNG configure method? Or does TestNG already have a method that does this that I missed?