public interface ITestListener extends ITestNGListener
| Modifier and Type | Method and Description |
|---|---|
default 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.
|
default 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.
|
default 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.
|
default void |
onTestFailedWithTimeout(ITestResult result)
Invoked each time a test fails due to a timeout.
|
default void |
onTestFailure(ITestResult result)
Invoked each time a test fails.
|
default void |
onTestSkipped(ITestResult result)
Invoked each time a test is skipped.
|
default void |
onTestStart(ITestResult result)
Invoked each time before a test will be invoked.
|
default void |
onTestSuccess(ITestResult result)
Invoked each time a test succeeds.
|
default void onTestStart(ITestResult result)
ITestResult is only partially
filled with the references to class, method, start millis and status.result - the partially filled ITestResultITestResult.STARTEDdefault void onTestSuccess(ITestResult result)
result - ITestResult containing information about the run testITestResult.SUCCESSdefault void onTestFailure(ITestResult result)
result - ITestResult containing information about the run testITestResult.FAILUREdefault void onTestSkipped(ITestResult result)
result - ITestResult containing information about the run testITestResult.SKIPdefault void onTestFailedButWithinSuccessPercentage(ITestResult result)
result - ITestResult containing information about the run testITestResult.SUCCESS_PERCENTAGE_FAILUREdefault void onTestFailedWithTimeout(ITestResult result)
result - ITestResult containing information about the run testdefault void onStart(ITestContext context)
context - The test contextdefault void onFinish(ITestContext context)
context - The test contextCopyright © 2025. All rights reserved.