com.beust.testng
Class SuiteRunner

java.lang.Object
  extended by com.beust.testng.SuiteRunner
All Implemented Interfaces:
ISuite

public class SuiteRunner
extends java.lang.Object
implements ISuite

SuiteRunner is reponsible for running all the tests included in one suite. The test start is triggered by run() method.

Author:
Cedric Beust, Apr 26, 2004, Alex Popescu

Nested Class Summary
static class SuiteRunner.DefaultTestRunnerFactory
          The default implementation of ITestRunnerFactory.
 
Constructor Summary
SuiteRunner(XmlSuite suite, java.lang.String outputDir)
           
SuiteRunner(XmlSuite suite, java.lang.String outputDir, ITestRunnerFactory runnerFactory)
           
 
Method Summary
 void addListener(ISuiteListener reporter)
          Registers ISuiteListeners interested in reporting the result of the current suite.
 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()
           
 java.lang.String getOutputDirectory()
           
 java.lang.String getParameter(java.lang.String parameterName)
          FIXME: should be removed?
 java.util.Map<java.lang.String,ISuiteResult> getResults()
           
 boolean isParallel()
           
static void ppp(java.lang.String s)
           
 void run()
          Triggers the start of running tests included in the suite.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SuiteRunner

public SuiteRunner(XmlSuite suite,
                   java.lang.String outputDir)

SuiteRunner

public SuiteRunner(XmlSuite suite,
                   java.lang.String outputDir,
                   ITestRunnerFactory runnerFactory)
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface ISuite
Returns:
the name of this suite.

isParallel

public boolean isParallel()
Specified by:
isParallel in interface ISuite
Returns:
true if the tests must be run in parallel.

run

public void run()
Description copied from interface: ISuite
Triggers the start of running tests included in the suite.

Specified by:
run in interface ISuite

addListener

public void addListener(ISuiteListener reporter)
Registers ISuiteListeners interested in reporting the result of the current suite.

Parameters:
reporter -

getOutputDirectory

public java.lang.String getOutputDirectory()
Specified by:
getOutputDirectory in interface ISuite
Returns:
The output directory used for the reports.

getResults

public java.util.Map<java.lang.String,ISuiteResult> getResults()
Specified by:
getResults in interface ISuite
Returns:
The results for this suite.

getParameter

public java.lang.String getParameter(java.lang.String parameterName)
FIXME: should be removed?

Specified by:
getParameter in interface ISuite
Returns:
The value of this parameter, or null if none was specified.
See Also:
ISuite.getParameter(java.lang.String)

getMethodsByGroups

public java.util.Map<java.lang.String,java.util.Collection<ITestNGMethod>> getMethodsByGroups()
Description copied from interface: ISuite
Retrieves the map of groups and their associated test methods.

Specified by:
getMethodsByGroups in interface ISuite
Returns:
A map where the key is the group and the value is a list of methods used by this group.
See Also:
ISuite.getMethodsByGroups()

getInvokedMethods

public java.util.Collection<ITestNGMethod> getInvokedMethods()
Description copied from interface: ISuite
Retrieves the list of all the methods that were invoked during this run.

Specified by:
getInvokedMethods in interface ISuite
Returns:
a collection of ITestNGMethods belonging to all tests included in the suite.
See Also:
ISuite.getInvokedMethods()

ppp

public static void ppp(java.lang.String s)