com.googlecode.lightest.core
Interface ILightestTestListener

All Superinterfaces:
IReporter, ISuiteListener, ITestListener, ITestNGListener
All Known Implementing Classes:
LightestTestListener

public interface ILightestTestListener
extends ISuiteListener, ITestListener, IReporter


Method Summary
 void addEnvironmentMapping(Class testClass, ITestEnvironment env)
          Records the mapping between a test class and the environment in which the test was performed.
 TestRegistry getRegistry()
          Returns the registry of pending tests.
 void initializeReporters(String configText)
          Invokes generateBaseReport() on all registered reporters that are instances of ILightestReporter.
 void onTaskComplete(ITaskResult taskResult, ITestResult testResult)
          Invoked each time a task finishes performing.
 void onTestFinish(ITestResult result)
          Invoked when a test finishes, whether successfully or not (or skipped).
 void registerReporter(Object reporter)
          Registers a new reporter to be notified of reportable events.
 void setDispatcherAssignmentStrategy(IDispatcherAssignmentStrategy strategy)
          This listener is the mechanism through which the dispatcher assignment strategy is communicated to each testcase.
 void setOutputDir(String outputDir)
          Sets the output directory to be propagated to all registered reporters.
 void setRegistry(TestRegistry registry)
          Sets the registry of pending tests, which are tests that will be run that have not yet been reported on.
 
Methods inherited from interface org.testng.ISuiteListener
onFinish, onStart
 
Methods inherited from interface org.testng.ITestListener
onFinish, onStart, onTestFailedButWithinSuccessPercentage, onTestFailure, onTestSkipped, onTestStart, onTestSuccess
 
Methods inherited from interface org.testng.IReporter
generateReport
 

Method Detail

setRegistry

void setRegistry(TestRegistry registry)
Sets the registry of pending tests, which are tests that will be run that have not yet been reported on. Tests will be removed from the registry once they are reported as being run.

Parameters:
registry -

getRegistry

TestRegistry getRegistry()
Returns the registry of pending tests.


addEnvironmentMapping

void addEnvironmentMapping(Class testClass,
                           ITestEnvironment env)
Records the mapping between a test class and the environment in which the test was performed.

Parameters:
testClass -
env -

setDispatcherAssignmentStrategy

void setDispatcherAssignmentStrategy(IDispatcherAssignmentStrategy strategy)
This listener is the mechanism through which the dispatcher assignment strategy is communicated to each testcase. The strategy is set on the context object when onTestStart() is called. Thus, the strategy must be set on this listener prior to any tests being run.

Parameters:
strategy -

onTestFinish

void onTestFinish(ITestResult result)
Invoked when a test finishes, whether successfully or not (or skipped).

Parameters:
result -

onTaskComplete

void onTaskComplete(ITaskResult taskResult,
                    ITestResult testResult)
Invoked each time a task finishes performing.

Parameters:
taskResult - the result of performing the task
testResult - the ITestResult associated with the currently executing test

registerReporter

void registerReporter(Object reporter)
Registers a new reporter to be notified of reportable events. The reporter should implement at least one of org.testng.IReporter or ILightestReporter.

Parameters:
reporter -

initializeReporters

void initializeReporters(String configText)
Invokes generateBaseReport() on all registered reporters that are instances of ILightestReporter.

Parameters:
configText - the textual configuration that was used to configure this run, if any. May be null.

setOutputDir

void setOutputDir(String outputDir)
Sets the output directory to be propagated to all registered reporters.



Copyright © 2009. All Rights Reserved.