Hi Tomek,
I have tried with given way
TestListenerAdapter tla = new TestListenerAdapter();
TestNG testng = new TestNG();
Class[] classes = new Class[]{
mypackage.myclass1.class,
mypackage.myclass2.class};
testng.setTestClasses(classes);
testng.addListener(tla);
testng.run();
But when i m trying to run this main method @beforesuite is working fine but it only loads class method unable to execute any of them. The error i am getting is
Command line suite
Total tests run: 9, Failures: 7, Skips: 2
Configuration Failures: 1, Skips: 2
of these i am unable to figure out the configuration failure reason , if possible can you please provide some help on this.
Thanks
Reagards
Abhishek