Package org.testng.internal
Class ExitCodeListener
- java.lang.Object
-
- org.testng.internal.ExitCodeListener
-
- All Implemented Interfaces:
IExecutionListener,IReporter,ITestListener,ITestNGListener
public class ExitCodeListener extends java.lang.Object implements ITestListener, IReporter, IExecutionListener
-
-
Constructor Summary
Constructors Constructor Description ExitCodeListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfailIfAllTestsSkipped()voidgenerateReport(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.ExitCodegetStatus()booleannoTestsFound()voidonExecutionFinish()Invoked once all the suites have been run.voidonTestFailedButWithinSuccessPercentage(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.voidonTestFailure(ITestResult result)Invoked each time a test fails.voidonTestSkipped(ITestResult result)Invoked each time a test is skipped.voidonTestStart(ITestResult result)Invoked each time before a test will be invoked.voidonTestSuccess(ITestResult result)Invoked each time a test succeeds.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.testng.IExecutionListener
onExecutionStart
-
Methods inherited from interface org.testng.ITestListener
onFinish, onStart, onTestFailedWithTimeout
-
Methods inherited from interface org.testng.ITestNGListener
isEnabled
-
-
-
-
Method Detail
-
failIfAllTestsSkipped
public void failIfAllTestsSkipped()
-
getStatus
public ExitCode getStatus()
-
noTestsFound
public boolean noTestsFound()
-
generateReport
public void generateReport(java.util.List<XmlSuite> xmlSuites, java.util.List<ISuite> suites, java.lang.String outputDirectory)
Description copied from interface:IReporterGenerate a report for the given suites into the specified output directory.- Specified by:
generateReportin interfaceIReporter- Parameters:
xmlSuites- The list ofXmlSuitesuites- The list ofISuiteoutputDirectory- The output directory
-
onTestStart
public void onTestStart(ITestResult result)
Description copied from interface:ITestListenerInvoked each time before a test will be invoked. TheITestResultis only partially filled with the references to class, method, start millis and status.- Specified by:
onTestStartin interfaceITestListener- Parameters:
result- the partially filledITestResult- See Also:
ITestResult.STARTED
-
onTestSuccess
public void onTestSuccess(ITestResult result)
Description copied from interface:ITestListenerInvoked each time a test succeeds.- Specified by:
onTestSuccessin interfaceITestListener- Parameters:
result-ITestResultcontaining information about the run test- See Also:
ITestResult.SUCCESS
-
onTestFailure
public void onTestFailure(ITestResult result)
Description copied from interface:ITestListenerInvoked each time a test fails.- Specified by:
onTestFailurein interfaceITestListener- Parameters:
result-ITestResultcontaining information about the run test- See Also:
ITestResult.FAILURE
-
onTestSkipped
public void onTestSkipped(ITestResult result)
Description copied from interface:ITestListenerInvoked each time a test is skipped.- Specified by:
onTestSkippedin interfaceITestListener- Parameters:
result-ITestResultcontaining information about the run test- See Also:
ITestResult.SKIP
-
onTestFailedButWithinSuccessPercentage
public void onTestFailedButWithinSuccessPercentage(ITestResult result)
Description copied from interface:ITestListenerInvoked each time a method fails but has been annotated with successPercentage and this failure still keeps it within the success percentage requested.- Specified by:
onTestFailedButWithinSuccessPercentagein interfaceITestListener- Parameters:
result-ITestResultcontaining information about the run test- See Also:
ITestResult.SUCCESS_PERCENTAGE_FAILURE
-
onExecutionFinish
public void onExecutionFinish()
Description copied from interface:IExecutionListenerInvoked once all the suites have been run.- Specified by:
onExecutionFinishin interfaceIExecutionListener
-
-