public class ExitCodeListener extends java.lang.Object implements ITestListener, IReporter
Modifier and Type | Field and Description |
---|---|
private boolean |
hasTests |
private ExitCode |
status |
Constructor and Description |
---|
ExitCodeListener() |
Modifier and Type | Method and Description |
---|---|
void |
generateReport(java.util.List<XmlSuite> xmlSuites,
java.util.List<ISuite> suites,
java.lang.String outputDirectory)
Generate a report for the given suites into the specified output directory.
|
ExitCode |
getStatus() |
boolean |
noTestsFound() |
void |
onFinish(ITestContext context)
Invoked after all the test methods belonging to the classes inside the <test> tag have run
and all their Configuration methods have been called.
|
void |
onStart(ITestContext context)
Invoked before running all the test methods belonging to the classes inside the <test> tag
and calling all their Configuration methods.
|
void |
onTestFailedButWithinSuccessPercentage(ITestResult result)
Invoked each time a method fails but has been annotated with successPercentage and this failure
still keeps it within the success percentage requested.
|
void |
onTestFailure(ITestResult result)
Invoked each time a test fails.
|
void |
onTestSkipped(ITestResult result)
Invoked each time a test is skipped.
|
void |
onTestStart(ITestResult result)
Invoked each time before a test will be invoked.
|
void |
onTestSuccess(ITestResult result)
Invoked each time a test succeeds.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onTestFailedWithTimeout
private boolean hasTests
private final ExitCode status
public ExitCode getStatus()
public boolean noTestsFound()
public void generateReport(java.util.List<XmlSuite> xmlSuites, java.util.List<ISuite> suites, java.lang.String outputDirectory)
IReporter
generateReport
in interface IReporter
public void onTestStart(ITestResult result)
ITestListener
ITestResult
is only partially
filled with the references to class, method, start millis and status.onTestStart
in interface ITestListener
result
- the partially filled ITestResult
ITestResult.STARTED
public void onTestSuccess(ITestResult result)
ITestListener
onTestSuccess
in interface ITestListener
result
- ITestResult
containing information about the run testITestResult.SUCCESS
public void onTestFailure(ITestResult result)
ITestListener
onTestFailure
in interface ITestListener
result
- ITestResult
containing information about the run testITestResult.FAILURE
public void onTestSkipped(ITestResult result)
ITestListener
onTestSkipped
in interface ITestListener
result
- ITestResult
containing information about the run testITestResult.SKIP
public void onTestFailedButWithinSuccessPercentage(ITestResult result)
ITestListener
onTestFailedButWithinSuccessPercentage
in interface ITestListener
result
- ITestResult
containing information about the run testITestResult.SUCCESS_PERCENTAGE_FAILURE
public void onStart(ITestContext context)
ITestListener
onStart
in interface ITestListener
public void onFinish(ITestContext context)
ITestListener
onFinish
in interface ITestListener