public TestRunner(IConfiguration configuration, ISuite suite, XmlTest test, boolean skipFailedInvocationCounts, Collection<IInvokedMethodListener> invokedMethodListeners, List<IClassListener> classListeners, Comparator<ITestNGMethod> comparator) { this.comparator = comparator; this.m_dataProviderListeners = Collections.emptyMap(); init(configuration, suite, test, suite.getOutputDirectory(), suite.getAnnotationFinder(), skipFailedInvocationCounts, invokedMethodListeners, classListeners); }
/** * This constructor is used by testng-remote, any changes related to it please contact with testng-team. */ public TestRunner(IConfiguration configuration, ISuite suite, XmlTest test, boolean skipFailedInvocationCounts, Collection<IInvokedMethodListener> invokedMethodListeners, List<IClassListener> classListeners) { this.comparator = Systematiser.getComparator(); this.m_dataProviderListeners = Collections.emptyMap(); init(configuration, suite, test, suite.getOutputDirectory(), suite.getAnnotationFinder(), skipFailedInvocationCounts, invokedMethodListeners, classListeners); }
public TestRunner( IConfiguration configuration, ISuite suite, XmlTest test, boolean skipFailedInvocationCounts, Collection<IInvokedMethodListener> invokedMethodListeners, List<IClassListener> classListeners, Comparator<ITestNGMethod> comparator) { this.comparator = comparator; this.m_dataProviderListeners = Collections.emptyMap(); init( configuration, suite, test, suite.getOutputDirectory(), suite.getAnnotationFinder(), skipFailedInvocationCounts, invokedMethodListeners, classListeners); }
/** * This constructor is used by testng-remote, any changes related to it please contact with * testng-team. */ public TestRunner( IConfiguration configuration, ISuite suite, XmlTest test, boolean skipFailedInvocationCounts, Collection<IInvokedMethodListener> invokedMethodListeners, List<IClassListener> classListeners) { this.comparator = Systematiser.getComparator(); this.m_dataProviderListeners = Collections.emptyMap(); init( configuration, suite, test, suite.getOutputDirectory(), suite.getAnnotationFinder(), skipFailedInvocationCounts, invokedMethodListeners, classListeners); }
@Override public TestRunner newTestRunner(ISuite suite, XmlTest test, Collection<IInvokedMethodListener> listeners, List<IClassListener> classListeners, Map<Class<? extends IDataProviderListener>, IDataProviderListener> dataProviderListeners) { boolean skip = skipFailedInvocationCounts; if (! skip) { skip = test.skipFailedInvocationCounts(); } TestRunner testRunner = new TestRunner(configuration, suite, test, suite.getOutputDirectory(), suite.getAnnotationFinder(), skip, listeners, classListeners, comparator, dataProviderListeners); if (useDefaultListeners) { testRunner.addListener(new TestHTMLReporter()); testRunner.addListener(new JUnitXMLReporter()); //TODO: Moved these here because maven2 has output reporters running //already, the output from these causes directories to be created with //files. This is not the desired behaviour of running tests in maven2. //Don't know what to do about this though, are people relying on these //to be added even with defaultListeners set to false? testRunner.addListener(new TextReporter(testRunner.getName(), TestRunner.getVerbose())); } for (ITestListener itl : failureGenerators) { testRunner.addTestListener(itl); } for (IConfigurationListener cl : configuration.getConfigurationListeners()) { testRunner.addConfigurationListener(cl); } return testRunner; } }
test, suite.getOutputDirectory(), suite.getAnnotationFinder(), skip, listeners,
public static MethodInstance newFailureMethodInstance(Exception e, XmlTest xmlTest, ITestContext context) { Method failMethod = null; try { failMethod = TestFrameworkFailure.class.getMethod("fail"); } catch (NoSuchMethodException e1) { e1.addSuppressed(e); e1.printStackTrace(System.err); throw new TestNGException(e1); } TestFrameworkFailure testInstance = new TestFrameworkFailure(e); TestNGMethod testNGMethod = new TestNGMethod(failMethod, context.getSuite().getAnnotationFinder(), xmlTest, testInstance); ITestClass testClass = new FakeTestClass(testNGMethod, testInstance, xmlTest); testNGMethod.setTestClass(testClass); return new MethodInstance(testNGMethod); }