public class TestListenerAdapter extends java.lang.Object implements IResultListener2
| Constructor and Description |
|---|
TestListenerAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeConfiguration(ITestResult tr)
Invoked before a configuration method is invoked.
|
protected ITestNGMethod[] |
getAllTestMethods() |
java.util.List<ITestResult> |
getConfigurationFailures() |
java.util.List<ITestResult> |
getConfigurationSkips() |
java.util.List<ITestResult> |
getFailedButWithinSuccessPercentageTests() |
java.util.List<ITestResult> |
getFailedTests() |
java.util.List<ITestResult> |
getPassedTests() |
java.util.List<ITestResult> |
getSkippedTests() |
java.util.List<ITestContext> |
getTestContexts() |
void |
onConfigurationFailure(ITestResult itr)
Invoked whenever a configuration method failed.
|
void |
onConfigurationSkip(ITestResult itr)
Invoked whenever a configuration method was skipped.
|
void |
onConfigurationSuccess(ITestResult itr)
Invoked whenever a configuration method succeeded.
|
void |
onFinish(ITestContext testContext)
Invoked after all the tests have run and all their
Configuration methods have been called.
|
void |
onStart(ITestContext testContext)
Invoked after the test class is instantiated and before
any configuration method is called.
|
void |
onTestFailedButWithinSuccessPercentage(ITestResult tr)
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 tr)
Invoked each time a test fails.
|
void |
onTestSkipped(ITestResult tr)
Invoked each time a test is skipped.
|
void |
onTestStart(ITestResult result)
Invoked each time before a test will be invoked.
|
void |
onTestSuccess(ITestResult tr)
Invoked each time a test succeeds.
|
void |
setAllTestMethods(java.util.List<ITestNGMethod> allTestMethods) |
void |
setFailedButWithinSuccessPercentageTests(java.util.List<ITestResult> failedButWithinSuccessPercentageTests) |
void |
setFailedTests(java.util.List<ITestResult> failedTests) |
void |
setPassedTests(java.util.List<ITestResult> passedTests) |
void |
setSkippedTests(java.util.List<ITestResult> skippedTests) |
java.lang.String |
toString() |
public void onTestSuccess(ITestResult tr)
ITestListeneronTestSuccess in interface ITestListenertr - ITestResult containing information about the run testITestResult.SUCCESSpublic void onTestFailure(ITestResult tr)
ITestListeneronTestFailure in interface ITestListenertr - ITestResult containing information about the run testITestResult.FAILUREpublic void onTestSkipped(ITestResult tr)
ITestListeneronTestSkipped in interface ITestListenertr - ITestResult containing information about the run testITestResult.SKIPpublic void onTestFailedButWithinSuccessPercentage(ITestResult tr)
ITestListeneronTestFailedButWithinSuccessPercentage in interface ITestListenertr - ITestResult containing information about the run testITestResult.SUCCESS_PERCENTAGE_FAILUREprotected ITestNGMethod[] getAllTestMethods()
public void onStart(ITestContext testContext)
ITestListeneronStart in interface ITestListenerpublic void onFinish(ITestContext testContext)
ITestListeneronFinish in interface ITestListenerpublic java.util.List<ITestResult> getFailedButWithinSuccessPercentageTests()
public java.util.List<ITestResult> getFailedTests()
public java.util.List<ITestResult> getPassedTests()
public java.util.List<ITestResult> getSkippedTests()
public void setAllTestMethods(java.util.List<ITestNGMethod> allTestMethods)
allTestMethods - The allTestMethods to set.public void setFailedButWithinSuccessPercentageTests(java.util.List<ITestResult> failedButWithinSuccessPercentageTests)
failedButWithinSuccessPercentageTests - The failedButWithinSuccessPercentageTests to set.public void setFailedTests(java.util.List<ITestResult> failedTests)
failedTests - The failedTests to set.public void setPassedTests(java.util.List<ITestResult> passedTests)
passedTests - The passedTests to set.public void setSkippedTests(java.util.List<ITestResult> skippedTests)
skippedTests - The skippedTests to set.public 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 java.util.List<ITestContext> getTestContexts()
public java.util.List<ITestResult> getConfigurationFailures()
public void onConfigurationFailure(ITestResult itr)
IConfigurationListeneronConfigurationFailure in interface IConfigurationListenerIConfigurationListener.onConfigurationFailure(org.testng.ITestResult)public java.util.List<ITestResult> getConfigurationSkips()
public void beforeConfiguration(ITestResult tr)
IConfigurationListener2beforeConfiguration in interface IConfigurationListener2public void onConfigurationSkip(ITestResult itr)
IConfigurationListeneronConfigurationSkip in interface IConfigurationListenerIConfigurationListener.onConfigurationSkip(org.testng.ITestResult)public void onConfigurationSuccess(ITestResult itr)
IConfigurationListeneronConfigurationSuccess in interface IConfigurationListenerIConfigurationListener.onConfigurationSuccess(org.testng.ITestResult)public java.lang.String toString()
toString in class java.lang.Object