Constructor and Description |
---|
Invoker(IConfiguration configuration,
ITestContext testContext,
ITestResultNotifier notifier,
SuiteRunState state,
boolean skipFailedInvocationCounts,
java.util.Collection<IInvokedMethodListener> invokedMethodListeners,
java.util.List<IClassListener> classListeners,
java.util.Collection<IDataProviderListener> dataProviderListeners) |
Modifier and Type | Method and Description |
---|---|
org.testng.internal.ConfigInvoker |
getConfigInvoker() |
org.testng.internal.TestInvoker |
getTestInvoker() |
void |
invokeConfigurations(IClass testClass,
ITestNGMethod[] allMethods,
XmlSuite suite,
java.util.Map<java.lang.String,java.lang.String> params,
java.lang.Object[] parameterValues,
java.lang.Object instance)
Invoke configuration methods if they belong to the same TestClass passed in parameter..
|
java.util.List<ITestResult> |
invokeTestMethods(ITestNGMethod testMethod,
java.util.Map<java.lang.String,java.lang.String> testParameters,
ConfigurationGroupMethods groupMethods,
java.lang.Object instance,
ITestContext testContext)
Invoke all the test methods.
|
public Invoker(IConfiguration configuration, ITestContext testContext, ITestResultNotifier notifier, SuiteRunState state, boolean skipFailedInvocationCounts, java.util.Collection<IInvokedMethodListener> invokedMethodListeners, java.util.List<IClassListener> classListeners, java.util.Collection<IDataProviderListener> dataProviderListeners)
public org.testng.internal.ConfigInvoker getConfigInvoker()
getConfigInvoker
in interface IInvoker
public org.testng.internal.TestInvoker getTestInvoker()
getTestInvoker
in interface IInvoker
public void invokeConfigurations(IClass testClass, ITestNGMethod[] allMethods, XmlSuite suite, java.util.Map<java.lang.String,java.lang.String> params, java.lang.Object[] parameterValues, java.lang.Object instance)
TODO: Calculate ahead of time which methods should be invoked for each class. Might speed things up for users who invoke the same test class with different parameters in the same suite run.
If instance is non-null, the configuration will be run on it. If it is null, the configuration methods will be run on all the instances retrieved from the ITestClass.
invokeConfigurations
in interface IInvoker
testClass
- the class whose configuration methods must be runpublic java.util.List<ITestResult> invokeTestMethods(ITestNGMethod testMethod, java.util.Map<java.lang.String,java.lang.String> testParameters, ConfigurationGroupMethods groupMethods, java.lang.Object instance, ITestContext testContext)
Note that this method also takes care of invoking the beforeTestMethod and afterTestMethod, if any.
Note (alex): this method can be refactored to use a SingleTestMethodWorker that directly
invokes ITestInvoker.invokeTestMethod(TestMethodArguments, XmlSuite, FailureContext)
and
this would simplify the implementation (see how DataTestMethodWorker is used)
invokeTestMethods
in interface IInvoker