public class VerboseReporter extends TestListenerAdapter
| Modifier and Type | Class and Description |
|---|---|
private static class |
VerboseReporter.Status |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
LISTENER_PREFIX
Default prefix for messages printed out by this reporter
|
private java.lang.String |
prefix |
private java.lang.String |
suiteName |
| Constructor and Description |
|---|
VerboseReporter()
Deprecated.
Unused
|
VerboseReporter(java.lang.String prefix)
Create VerboseReporter with custom prefix
|
| Modifier and Type | Method and Description |
|---|---|
void |
beforeConfiguration(ITestResult tr)
Invoked before a configuration method is invoked.
|
private java.lang.String |
getMethodDeclaration(ITestNGMethod method) |
protected void |
log(java.lang.String message) |
private void |
logResults()
Print out test summary
|
private void |
logTestResult(VerboseReporter.Status st,
ITestResult itr,
boolean isConfMethod)
Log meaningful message for passed in arguments.
|
void |
onConfigurationFailure(ITestResult tr)
Invoked whenever a configuration method failed.
|
void |
onConfigurationSkip(ITestResult tr)
Invoked whenever a configuration method was skipped.
|
void |
onConfigurationSuccess(ITestResult tr)
Invoked whenever a configuration method succeeded.
|
void |
onFinish(ITestContext context)
Invoked after all the tests have run and all their
Configuration methods have been called.
|
void |
onStart(ITestContext ctx)
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 tr)
Invoked each time before a test will be invoked.
|
void |
onTestSuccess(ITestResult tr)
Invoked each time a test succeeds.
|
private ITestNGMethod[] |
resultsToMethods(java.util.List<ITestResult> results) |
java.lang.String |
toString() |
getAllTestMethods, getConfigurationFailures, getConfigurationSkips, getFailedButWithinSuccessPercentageTests, getFailedTests, getPassedTests, getSkippedTests, getTestContexts, setAllTestMethods, setFailedButWithinSuccessPercentageTests, setFailedTests, setPassedTests, setSkippedTestspublic static final java.lang.String LISTENER_PREFIX
private java.lang.String suiteName
private final java.lang.String prefix
@Deprecated public VerboseReporter()
public VerboseReporter(java.lang.String prefix)
prefix - prefix for messages printed out by this reporterpublic void beforeConfiguration(ITestResult tr)
IConfigurationListener2beforeConfiguration in interface IConfigurationListener2beforeConfiguration in class TestListenerAdapterpublic void onConfigurationFailure(ITestResult tr)
IConfigurationListeneronConfigurationFailure in interface IConfigurationListeneronConfigurationFailure in class TestListenerAdapterIConfigurationListener.onConfigurationFailure(org.testng.ITestResult)public void onConfigurationSkip(ITestResult tr)
IConfigurationListeneronConfigurationSkip in interface IConfigurationListeneronConfigurationSkip in class TestListenerAdapterIConfigurationListener.onConfigurationSkip(org.testng.ITestResult)public void onConfigurationSuccess(ITestResult tr)
IConfigurationListeneronConfigurationSuccess in interface IConfigurationListeneronConfigurationSuccess in class TestListenerAdapterIConfigurationListener.onConfigurationSuccess(org.testng.ITestResult)public void onTestStart(ITestResult tr)
ITestListenerITestResult is only partially filled with the references to
class, method, start millis and status.onTestStart in interface ITestListeneronTestStart in class TestListenerAdaptertr - the partially filled ITestResultITestResult.STARTEDpublic void onTestFailure(ITestResult tr)
ITestListeneronTestFailure in interface ITestListeneronTestFailure in class TestListenerAdaptertr - ITestResult containing information about the run testITestResult.FAILUREpublic void onTestFailedButWithinSuccessPercentage(ITestResult tr)
ITestListeneronTestFailedButWithinSuccessPercentage in interface ITestListeneronTestFailedButWithinSuccessPercentage in class TestListenerAdaptertr - ITestResult containing information about the run testITestResult.SUCCESS_PERCENTAGE_FAILUREpublic void onTestSkipped(ITestResult tr)
ITestListeneronTestSkipped in interface ITestListeneronTestSkipped in class TestListenerAdaptertr - ITestResult containing information about the run testITestResult.SKIPpublic void onTestSuccess(ITestResult tr)
ITestListeneronTestSuccess in interface ITestListeneronTestSuccess in class TestListenerAdaptertr - ITestResult containing information about the run testITestResult.SUCCESSpublic void onStart(ITestContext ctx)
ITestListeneronStart in interface ITestListeneronStart in class TestListenerAdapterpublic void onFinish(ITestContext context)
ITestListeneronFinish in interface ITestListeneronFinish in class TestListenerAdapterprivate ITestNGMethod[] resultsToMethods(java.util.List<ITestResult> results)
private void logResults()
private void logTestResult(VerboseReporter.Status st, ITestResult itr, boolean isConfMethod)
st - status of passed in itritr - test result to be describedisConfMethod - is itr describing configuration methodprotected void log(java.lang.String message)
private java.lang.String getMethodDeclaration(ITestNGMethod method)
method - method to be describedpublic java.lang.String toString()
toString in class TestListenerAdapter