public class SuiteRunner extends java.lang.Object implements ISuite, IInvokedMethodListener
SuiteRunner is responsible for running all the tests included in one
suite. The test start is triggered by run() method.| Modifier | Constructor and Description |
|---|---|
|
SuiteRunner(IConfiguration configuration,
XmlSuite suite,
java.lang.String outputDir)
Deprecated.
|
|
SuiteRunner(IConfiguration configuration,
XmlSuite suite,
java.lang.String outputDir,
java.util.Comparator<ITestNGMethod> comparator) |
|
SuiteRunner(IConfiguration configuration,
XmlSuite suite,
java.lang.String outputDir,
ITestRunnerFactory runnerFactory)
Deprecated.
|
|
SuiteRunner(IConfiguration configuration,
XmlSuite suite,
java.lang.String outputDir,
ITestRunnerFactory runnerFactory,
boolean useDefaultListeners)
Deprecated.
|
|
SuiteRunner(IConfiguration configuration,
XmlSuite suite,
java.lang.String outputDir,
ITestRunnerFactory runnerFactory,
boolean useDefaultListeners,
java.util.Comparator<ITestNGMethod> comparator) |
protected |
SuiteRunner(IConfiguration configuration,
XmlSuite suite,
java.lang.String outputDir,
ITestRunnerFactory runnerFactory,
boolean useDefaultListeners,
java.util.List<IMethodInterceptor> methodInterceptors,
java.util.Collection<IInvokedMethodListener> invokedMethodListeners,
java.util.Collection<ITestListener> testListeners,
java.util.Collection<IClassListener> classListeners)
Deprecated.
|
protected |
SuiteRunner(IConfiguration configuration,
XmlSuite suite,
java.lang.String outputDir,
ITestRunnerFactory runnerFactory,
boolean useDefaultListeners,
java.util.List<IMethodInterceptor> methodInterceptors,
java.util.Collection<IInvokedMethodListener> invokedMethodListeners,
java.util.Collection<ITestListener> testListeners,
java.util.Collection<IClassListener> classListeners,
java.util.Comparator<ITestNGMethod> comparator)
Deprecated.
- This constructor stands deprecated as of TestNG v6.13.
|
protected |
SuiteRunner(IConfiguration configuration,
XmlSuite suite,
java.lang.String outputDir,
ITestRunnerFactory runnerFactory,
boolean useDefaultListeners,
java.util.List<IMethodInterceptor> methodInterceptors,
java.util.Collection<IInvokedMethodListener> invokedMethodListeners,
java.util.Collection<ITestListener> testListeners,
java.util.Collection<IClassListener> classListeners,
java.util.Map<java.lang.Class<? extends IDataProviderListener>,IDataProviderListener> dataProviderListeners,
java.util.Comparator<ITestNGMethod> comparator) |
protected |
SuiteRunner(IConfiguration configuration,
XmlSuite suite,
java.lang.String outputDir,
ITestRunnerFactory runnerFactory,
boolean useDefaultListeners,
java.util.List<IMethodInterceptor> methodInterceptors,
java.util.List<IInvokedMethodListener> invokedMethodListeners,
java.util.List<ITestListener> testListeners,
java.util.List<IClassListener> classListeners)
Deprecated.
- This constructor stands deprecated.
|
|
SuiteRunner(IConfiguration configuration,
XmlSuite suite,
java.lang.String outputDir,
ITestRunnerFactory runnerFactory,
java.util.Comparator<ITestNGMethod> comparator) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addListener(ISuiteListener reporter)
Registers ISuiteListeners interested in reporting the result of the current
suite.
|
void |
addListener(ITestNGListener listener) |
void |
afterInvocation(IInvokedMethod method,
ITestResult testResult) |
void |
beforeInvocation(IInvokedMethod method,
ITestResult testResult) |
java.util.List<IInvokedMethod> |
getAllInvokedMethods() |
java.util.List<ITestNGMethod> |
getAllMethods() |
IAnnotationFinder |
getAnnotationFinder()
Returns the annotation finder for the given annotation type.
|
java.lang.Object |
getAttribute(java.lang.String name) |
java.util.Set<java.lang.String> |
getAttributeNames() |
java.util.Collection<ITestNGMethod> |
getExcludedMethods() |
java.lang.String |
getGuiceStage() |
java.lang.String |
getHost() |
java.util.Collection<ITestNGMethod> |
getInvokedMethods()
Retrieves the list of all the methods that were invoked during this run.
|
java.util.Map<java.lang.String,java.util.Collection<ITestNGMethod>> |
getMethodsByGroups()
Retrieves the map of groups and their associated test methods.
|
java.lang.String |
getName() |
IObjectFactory |
getObjectFactory() |
IObjectFactory2 |
getObjectFactory2() |
java.lang.String |
getOutputDirectory() |
java.lang.String |
getParallel() |
java.lang.String |
getParameter(java.lang.String parameterName)
FIXME: should be removed?
|
com.google.inject.Injector |
getParentInjector() |
java.lang.String |
getParentModule() |
java.util.List<IReporter> |
getReporters() |
java.util.Map<java.lang.String,ISuiteResult> |
getResults() |
SuiteRunState |
getSuiteState()
Retrieves the shared state for a suite.
|
XmlSuite |
getXmlSuite() |
static void |
ppp(java.lang.String s) |
java.lang.Object |
removeAttribute(java.lang.String name)
Remove the attribute
|
void |
run()
Triggers the start of running tests included in the suite.
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Set a custom attribute.
|
void |
setHost(java.lang.String host) |
void |
setObjectFactory(ITestObjectFactory objectFactory) |
void |
setParentInjector(com.google.inject.Injector injector) |
void |
setReportResults(boolean reportResults) |
void |
setSkipFailedInvocationCounts(java.lang.Boolean skipFailedInvocationCounts) |
public SuiteRunner(IConfiguration configuration, XmlSuite suite, java.lang.String outputDir, java.util.Comparator<ITestNGMethod> comparator)
public SuiteRunner(IConfiguration configuration, XmlSuite suite, java.lang.String outputDir, ITestRunnerFactory runnerFactory, java.util.Comparator<ITestNGMethod> comparator)
public SuiteRunner(IConfiguration configuration, XmlSuite suite, java.lang.String outputDir, ITestRunnerFactory runnerFactory, boolean useDefaultListeners, java.util.Comparator<ITestNGMethod> comparator)
@Deprecated public SuiteRunner(IConfiguration configuration, XmlSuite suite, java.lang.String outputDir)
@Deprecated public SuiteRunner(IConfiguration configuration, XmlSuite suite, java.lang.String outputDir, ITestRunnerFactory runnerFactory)
@Deprecated public SuiteRunner(IConfiguration configuration, XmlSuite suite, java.lang.String outputDir, ITestRunnerFactory runnerFactory, boolean useDefaultListeners)
@Deprecated protected SuiteRunner(IConfiguration configuration, XmlSuite suite, java.lang.String outputDir, ITestRunnerFactory runnerFactory, boolean useDefaultListeners, java.util.List<IMethodInterceptor> methodInterceptors, java.util.List<IInvokedMethodListener> invokedMethodListeners, java.util.List<ITestListener> testListeners, java.util.List<IClassListener> classListeners)
@Deprecated protected SuiteRunner(IConfiguration configuration, XmlSuite suite, java.lang.String outputDir, ITestRunnerFactory runnerFactory, boolean useDefaultListeners, java.util.List<IMethodInterceptor> methodInterceptors, java.util.Collection<IInvokedMethodListener> invokedMethodListeners, java.util.Collection<ITestListener> testListeners, java.util.Collection<IClassListener> classListeners)
@Deprecated protected SuiteRunner(IConfiguration configuration, XmlSuite suite, java.lang.String outputDir, ITestRunnerFactory runnerFactory, boolean useDefaultListeners, java.util.List<IMethodInterceptor> methodInterceptors, java.util.Collection<IInvokedMethodListener> invokedMethodListeners, java.util.Collection<ITestListener> testListeners, java.util.Collection<IClassListener> classListeners, java.util.Comparator<ITestNGMethod> comparator)
protected SuiteRunner(IConfiguration configuration, XmlSuite suite, java.lang.String outputDir, ITestRunnerFactory runnerFactory, boolean useDefaultListeners, java.util.List<IMethodInterceptor> methodInterceptors, java.util.Collection<IInvokedMethodListener> invokedMethodListeners, java.util.Collection<ITestListener> testListeners, java.util.Collection<IClassListener> classListeners, java.util.Map<java.lang.Class<? extends IDataProviderListener>,IDataProviderListener> dataProviderListeners, java.util.Comparator<ITestNGMethod> comparator)
public XmlSuite getXmlSuite()
getXmlSuite in interface ISuitepublic java.lang.String getName()
public void setObjectFactory(ITestObjectFactory objectFactory)
public void setReportResults(boolean reportResults)
public java.lang.String getParallel()
getParallel in interface ISuitepublic java.lang.String getParentModule()
getParentModule in interface ISuitepublic java.lang.String getGuiceStage()
getGuiceStage in interface ISuitepublic com.google.inject.Injector getParentInjector()
getParentInjector in interface ISuitepublic void setParentInjector(com.google.inject.Injector injector)
setParentInjector in interface ISuitepublic void run()
ISuitepublic java.util.List<IReporter> getReporters()
protected void addListener(ISuiteListener reporter)
reporter - public void addListener(ITestNGListener listener)
addListener in interface ISuitepublic java.lang.String getOutputDirectory()
getOutputDirectory in interface ISuitepublic java.util.Map<java.lang.String,ISuiteResult> getResults()
getResults in interface ISuitepublic java.lang.String getParameter(java.lang.String parameterName)
getParameter in interface ISuiteISuite.getParameter(java.lang.String)public java.util.Map<java.lang.String,java.util.Collection<ITestNGMethod>> getMethodsByGroups()
ISuitegetMethodsByGroups in interface ISuiteISuite.getMethodsByGroups()public java.util.Collection<ITestNGMethod> getInvokedMethods()
ISuitegetInvokedMethods in interface ISuiteISuite.getInvokedMethods()public java.util.Collection<ITestNGMethod> getExcludedMethods()
getExcludedMethods in interface ISuiteISuite.getExcludedMethods()public IObjectFactory getObjectFactory()
getObjectFactory in interface ISuitepublic IObjectFactory2 getObjectFactory2()
getObjectFactory2 in interface ISuitepublic IAnnotationFinder getAnnotationFinder()
getAnnotationFinder in interface ISuitepublic static void ppp(java.lang.String s)
public void setHost(java.lang.String host)
public java.lang.String getHost()
public SuiteRunState getSuiteState()
ISuitegetSuiteState in interface ISuiteISuite.getSuiteState()public void setSkipFailedInvocationCounts(java.lang.Boolean skipFailedInvocationCounts)
public java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface IAttributesname - The name of the attribute to returnpublic void setAttribute(java.lang.String name,
java.lang.Object value)
IAttributessetAttribute in interface IAttributespublic java.util.Set<java.lang.String> getAttributeNames()
getAttributeNames in interface IAttributespublic java.lang.Object removeAttribute(java.lang.String name)
IAttributesremoveAttribute in interface IAttributespublic void afterInvocation(IInvokedMethod method, ITestResult testResult)
afterInvocation in interface IInvokedMethodListenerpublic void beforeInvocation(IInvokedMethod method, ITestResult testResult)
beforeInvocation in interface IInvokedMethodListenerpublic java.util.List<IInvokedMethod> getAllInvokedMethods()
getAllInvokedMethods in interface ISuitepublic java.util.List<ITestNGMethod> getAllMethods()
getAllMethods in interface ISuite