Class ExitCodeListener
java.lang.Object
org.testng.internal.ExitCodeListener
- All Implemented Interfaces:
IExecutionListener, IReporter, ITestListener, ITestNGListener
public class ExitCodeListener
extends Object
implements ITestListener, IReporter, IExecutionListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidGenerate a report for the given suites into the specified output directory.booleanvoidInvoked once all the suites have been run.voidInvoked 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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IExecutionListener
onExecutionStartMethods inherited from interface ITestListener
onFinish, onStart, onTestFailedWithTimeoutMethods inherited from interface ITestNGListener
isEnabled
-
Constructor Details
-
ExitCodeListener
public ExitCodeListener()
-
-
Method Details
-
failIfAllTestsSkipped
public void failIfAllTestsSkipped() -
getStatus
-
noTestsFound
public boolean noTestsFound() -
generateReport
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
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:
-
onTestSuccess
Description copied from interface:ITestListenerInvoked each time a test succeeds.- Specified by:
onTestSuccessin interfaceITestListener- Parameters:
result-ITestResultcontaining information about the run test- See Also:
-
onTestFailure
Description copied from interface:ITestListenerInvoked each time a test fails.- Specified by:
onTestFailurein interfaceITestListener- Parameters:
result-ITestResultcontaining information about the run test- See Also:
-
onTestSkipped
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:
-
onTestFailedButWithinSuccessPercentage
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:
-
onExecutionFinish
public void onExecutionFinish()Description copied from interface:IExecutionListenerInvoked once all the suites have been run.- Specified by:
onExecutionFinishin interfaceIExecutionListener
-