1 package test.testng317; 2 3 import org.testng.TestNG; 4 import org.testng.annotations.BeforeMethod; 5 import org.testng.annotations.Test; 6 7 import test.SimpleBaseTest; 8 9 import java.util.ArrayList; 10 import java.util.List; 11 12 public class VerifyTest extends SimpleBaseTest { 13 static List<String> m_methods = new ArrayList<>(); 14 15 @BeforeMethod before()16 public void before() { 17 m_methods = new ArrayList<>(); 18 } 19 20 @Test verify()21 public void verify() { 22 TestNG tng = create(); 23 tng.setTestClasses(new Class[] { test.testng317.ClassB.class, test.testng317.ClassA.class }); 24 tng.run(); 25 26 System.out.println("Methods:" + m_methods.size()); 27 } 28 } 29