Examples of IJUnitTestRunner


Examples of org.testng.junit.IJUnitTestRunner

   */
  public static IJUnitTestRunner createTestRunner(TestRunner runner) {
      try {
          //try to get runner for JUnit 4 first
          Class.forName("org.junit.Test");
          IJUnitTestRunner tr = (IJUnitTestRunner) ClassHelper.forName(JUNIT_4_TESTRUNNER).newInstance();
          tr.setTestResultNotifier(runner);
          return tr;
      } catch (Throwable t) {
          Utils.log("ClassHelper", 2, "JUnit 4 was not found on the classpath");
          try {
              //fallback to JUnit 3
              Class.forName("junit.framework.Test");
              IJUnitTestRunner tr = (IJUnitTestRunner) ClassHelper.forName(JUNIT_TESTRUNNER).newInstance();
              tr.setTestResultNotifier(runner);

              return tr;
          } catch (Exception ex) {
              Utils.log("ClassHelper", 2, "JUnit 3 was not found on the classpath");
              //there's no JUnit on the classpath
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.