public class SuiteRunner extends java.lang.Object implements ISuite, java.io.Serializable
SuiteRunner
is responsible for running all the tests included in one
suite. The test start is triggered by run()
method.Modifier and Type | Class and Description |
---|---|
static class |
SuiteRunner.DefaultTestRunnerFactory
The default implementation of
ITestRunnerFactory . |
static class |
SuiteRunner.ProxyTestRunnerFactory |
Constructor and Description |
---|
SuiteRunner(XmlSuite suite,
java.lang.String outputDir,
IAnnotationFinder[] finders) |
SuiteRunner(XmlSuite suite,
java.lang.String outputDir,
ITestRunnerFactory runnerFactory,
boolean useDefaultListeners,
IAnnotationFinder[] finders) |
SuiteRunner(XmlSuite suite,
java.lang.String outputDir,
ITestRunnerFactory runnerFactory,
boolean useDefaultListeners,
IAnnotationFinder[] finders,
IObjectFactory factory,
IMethodInterceptor methodInterceptor,
java.util.List<IInvokedMethodListener> invokedMethodListener) |
SuiteRunner(XmlSuite suite,
java.lang.String outputDir,
ITestRunnerFactory runnerFactory,
IAnnotationFinder[] finders) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(ISuiteListener reporter)
Registers ISuiteListeners interested in reporting the result of the current
suite.
|
protected ITestRunnerFactory |
buildRunnerFactory(java.util.List testListeners) |
IAnnotationFinder |
getAnnotationFinder(java.lang.String pAnnotationType)
Returns the annotation finder for the given annotation type.
|
java.lang.Object |
getAttribute(java.lang.String name) |
java.util.Collection<ITestNGMethod> |
getExcludedMethods() |
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() |
java.lang.String |
getOutputDirectory() |
java.lang.String |
getParallel() |
java.lang.String |
getParameter(java.lang.String parameterName)
FIXME: should be removed?
|
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) |
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(IObjectFactory objectFactory) |
void |
setReportResults(boolean reportResults) |
void |
setSkipFailedInvocationCounts(java.lang.Boolean skipFailedInvocationCounts) |
void |
setTestListeners(java.util.List<ITestListener> testlisteners) |
public SuiteRunner(XmlSuite suite, java.lang.String outputDir, IAnnotationFinder[] finders)
public SuiteRunner(XmlSuite suite, java.lang.String outputDir, ITestRunnerFactory runnerFactory, IAnnotationFinder[] finders)
public SuiteRunner(XmlSuite suite, java.lang.String outputDir, ITestRunnerFactory runnerFactory, boolean useDefaultListeners, IAnnotationFinder[] finders)
public SuiteRunner(XmlSuite suite, java.lang.String outputDir, ITestRunnerFactory runnerFactory, boolean useDefaultListeners, IAnnotationFinder[] finders, IObjectFactory factory, IMethodInterceptor methodInterceptor, java.util.List<IInvokedMethodListener> invokedMethodListener)
public XmlSuite getXmlSuite()
getXmlSuite
in interface ISuite
public java.lang.String getName()
public void setObjectFactory(IObjectFactory objectFactory)
public void setTestListeners(java.util.List<ITestListener> testlisteners)
public void setReportResults(boolean reportResults)
protected ITestRunnerFactory buildRunnerFactory(java.util.List testListeners)
public java.lang.String getParallel()
getParallel
in interface ISuite
public void run()
ISuite
public void addListener(ISuiteListener reporter)
reporter
- public java.lang.String getOutputDirectory()
getOutputDirectory
in interface ISuite
public java.util.Map<java.lang.String,ISuiteResult> getResults()
getResults
in interface ISuite
public java.lang.String getParameter(java.lang.String parameterName)
getParameter
in interface ISuite
ISuite.getParameter(java.lang.String)
public java.util.Map<java.lang.String,java.util.Collection<ITestNGMethod>> getMethodsByGroups()
ISuite
getMethodsByGroups
in interface ISuite
ISuite.getMethodsByGroups()
public java.util.Collection<ITestNGMethod> getInvokedMethods()
ISuite
getInvokedMethods
in interface ISuite
ISuite.getInvokedMethods()
public java.util.Collection<ITestNGMethod> getExcludedMethods()
getExcludedMethods
in interface ISuite
ISuite.getExcludedMethods()
public IObjectFactory getObjectFactory()
getObjectFactory
in interface ISuite
public IAnnotationFinder getAnnotationFinder(java.lang.String pAnnotationType)
getAnnotationFinder
in interface ISuite
pAnnotationType
- the annotation typepublic static void ppp(java.lang.String s)
public void setHost(java.lang.String host)
public java.lang.String getHost()
public SuiteRunState getSuiteState()
ISuite
getSuiteState
in interface ISuite
ISuite.getSuiteState()
public void setSkipFailedInvocationCounts(java.lang.Boolean skipFailedInvocationCounts)
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface IAttributes
name
- The name of the attribute to returnpublic void setAttribute(java.lang.String name, java.lang.Object value)
IAttributes
setAttribute
in interface IAttributes