package testng;
import org.testng.TestListenerAdapter;
import org.testng.TestNG;
import org.testng.annotations.Test;
public class A {
@Test
public void one() {
System.out.println("one");
}
@Test
public void two() {
System.out.println("two");
}
@Test
public void three() {
System.out.println("three");
}
public static void main(String[] args) {
TestNG tng = new TestNG();
tng.setTestClasses(new Class[] {A.class});
TestListenerAdapter listener = new TestListenerAdapter();
tng.addListener(listener);
tng.setAnnotationTransformer(new InvocationTransformer());
tng.run();
System.out.println("Passed: " + listener.getPassedTests().size());
}
}