Java 类org.testng.IClassListener 实例源码

项目:testng-remote    文件:RemoteTestNG6_10.java   
@Override
protected ITestRunnerFactory buildTestRunnerFactory() {
  if(null == m_customTestRunnerFactory) {
    m_customTestRunnerFactory= new ITestRunnerFactory() {
        @Override
        public TestRunner newTestRunner(ISuite suite, XmlTest xmlTest,
            Collection<IInvokedMethodListener> listeners, List<IClassListener> classListeners) {
          TestRunner runner =
            new TestRunner(getConfiguration(), suite, xmlTest,
                false /*skipFailedInvocationCounts */,
                listeners, classListeners);
          if (m_useDefaultListeners) {
            runner.addListener(new TestHTMLReporter());
            runner.addListener(new JUnitXMLReporter());
          }

          return runner;
        }
      };
  }

  return m_customTestRunnerFactory;
}
项目:testng-remote    文件:RemoteTestNG6_9_10.java   
@Override
protected ITestRunnerFactory buildTestRunnerFactory() {
  if(null == m_customTestRunnerFactory) {
    m_customTestRunnerFactory= new ITestRunnerFactory() {
        @Override
        public TestRunner newTestRunner(ISuite suite, XmlTest xmlTest,
            Collection<IInvokedMethodListener> listeners, List<IClassListener> classListeners) {
          TestRunner runner =
            new TestRunner(getConfiguration(), suite, xmlTest,
                false /*skipFailedInvocationCounts */,
                listeners, classListeners);
          if (m_useDefaultListeners) {
            runner.addListener(new TestHTMLReporter());
            runner.addListener(new JUnitXMLReporter());
          }
          for (IConfigurationListener cl : getConfiguration().getConfigurationListeners()) {
            runner.addListener(cl);
          }

          return runner;
        }
      };
  }

  return m_customTestRunnerFactory;
}
项目:testng-remote    文件:RemoteTestNG6_12.java   
@Override
protected ITestRunnerFactory buildTestRunnerFactory() {
  if(null == m_customTestRunnerFactory) {
    m_customTestRunnerFactory= new ITestRunnerFactory() {
        @Override
        public TestRunner newTestRunner(ISuite suite, XmlTest xmlTest,
            Collection<IInvokedMethodListener> listeners, List<IClassListener> classListeners) {
          TestRunner runner =
            new TestRunner(getConfiguration(), suite, xmlTest,
                false /*skipFailedInvocationCounts */,
                listeners, classListeners);
          if (m_useDefaultListeners) {
            runner.addListener(new TestHTMLReporter());
            runner.addListener(new JUnitXMLReporter());
          }

          return runner;
        }
      };
  }

  return m_customTestRunnerFactory;
}
项目:TestNG-Foundation    文件:ListenerChain.java   
/**
 * [IClassListener]
 * Invoked after the test class is instantiated and before
 * {@link org.testng.annotations.BeforeClass &#64;BeforeClass} 
 * configuration methods are called.
 * 
 * @param testClass TestNG representation for the current test class
 */
@Override
public void onBeforeClass(ITestClass testClass) {
    synchronized (classListeners) {
        for (IClassListener classListener : Lists.reverse(classListeners)) {
            classListener.onBeforeClass(testClass);
        }
    }
}
项目:TestNG-Foundation    文件:ListenerChain.java   
/**
 * [IClassListener]
 * Invoked after all of the test methods of the test class have been invoked
 * and before {@link org.testng.annotations.AfterClass &#64;AfterClass}
 * configuration methods are called.
 * 
 * @param testClass TestNG representation for the current test class
 */
@Override
public void onAfterClass(ITestClass testClass) {
    synchronized (classListeners) {
        for (IClassListener classListener : classListeners) {
            classListener.onAfterClass(testClass);
        }
    }
}
项目:testng-remote    文件:RemoteTestNG6_10.java   
@Override
public TestRunner newTestRunner(ISuite suite, XmlTest test,
    Collection<IInvokedMethodListener> listeners, List<IClassListener> classListeners) {
  TestRunner tr = m_delegateFactory.newTestRunner(suite, test, listeners, classListeners);
  tr.addListener(new RemoteTestListener(suite, test, m_messageSender));
  return tr;
}
项目:testng-remote    文件:RemoteTestNG6_9_10.java   
@Override
public TestRunner newTestRunner(ISuite suite, XmlTest test,
    Collection<IInvokedMethodListener> listeners, List<IClassListener> classListeners) {
  TestRunner tr = m_delegateFactory.newTestRunner(suite, test, listeners, classListeners);
  tr.addListener(new RemoteTestListener(suite, test, m_messageSender));
  return tr;
}
项目:testng-remote    文件:RemoteTestNG6_12.java   
@Override
public TestRunner newTestRunner(ISuite suite, XmlTest test,
    Collection<IInvokedMethodListener> listeners, List<IClassListener> classListeners) {
  TestRunner tr = m_delegateFactory.newTestRunner(suite, test, listeners, classListeners);
  tr.addListener(new RemoteTestListener(suite, test, m_messageSender));
  return tr;
}