public class ExitCodeListener extends Object implements ITestListener, IReporter, IExecutionListener
| Constructor and Description |
|---|
ExitCodeListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
failIfAllTestsSkipped() |
void |
generateReport(List<XmlSuite> xmlSuites,
List<ISuite> suites,
String outputDirectory)
Generate a report for the given suites into the specified output directory.
|
ExitCode |
getStatus() |
boolean |
noTestsFound() |
void |
onExecutionFinish()
Invoked once all the suites have been run.
|
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, waitonTestFailedWithTimeoutonExecutionStartpublic void failIfAllTestsSkipped()
public ExitCode getStatus()
public boolean noTestsFound()
public void generateReport(List<XmlSuite> xmlSuites, List<ISuite> suites, String outputDirectory)
IReportergenerateReport in interface IReporterxmlSuites - The list of XmlSuitesuites - The list of ISuiteoutputDirectory - The output directorypublic void onTestStart(ITestResult result)
ITestListenerITestResult is only partially
filled with the references to class, method, start millis and status.onTestStart in interface ITestListenerresult - the partially filled ITestResultITestResult.STARTEDpublic void onTestSuccess(ITestResult result)
ITestListeneronTestSuccess in interface ITestListenerresult - ITestResult containing information about the run testITestResult.SUCCESSpublic void onTestFailure(ITestResult result)
ITestListeneronTestFailure in interface ITestListenerresult - ITestResult containing information about the run testITestResult.FAILUREpublic void onTestSkipped(ITestResult result)
ITestListeneronTestSkipped in interface ITestListenerresult - ITestResult containing information about the run testITestResult.SKIPpublic void onTestFailedButWithinSuccessPercentage(ITestResult result)
ITestListeneronTestFailedButWithinSuccessPercentage in interface ITestListenerresult - ITestResult containing information about the run testITestResult.SUCCESS_PERCENTAGE_FAILUREpublic void onStart(ITestContext context)
ITestListeneronStart in interface ITestListenercontext - The test contextpublic void onFinish(ITestContext context)
ITestListeneronFinish in interface ITestListenercontext - The test contextpublic void onExecutionFinish()
IExecutionListeneronExecutionFinish in interface IExecutionListenerCopyright © 2025. All rights reserved.