public class VerboseReporter extends TestListenerAdapter
To see messages from this reporter, either run Ant in verbose mode ('ant -v') or set verbose level to 5 or higher
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 test methods belonging to the classes inside the <test> tag have run
and all their Configuration methods have been called.
|
void |
onStart(ITestContext ctx)
Invoked before running all the test methods belonging to the classes inside the <test> tag
and calling all their Configuration methods.
|
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, getTimedoutTests, onTestFailedWithTimeout, setAllTestMethods, setFailedButWithinSuccessPercentageTests, setFailedTests, setPassedTests, setSkippedTests
public 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)
IConfigurationListener
beforeConfiguration
in interface IConfigurationListener
beforeConfiguration
in class TestListenerAdapter
public void onConfigurationFailure(ITestResult tr)
IConfigurationListener
onConfigurationFailure
in interface IConfigurationListener
onConfigurationFailure
in class TestListenerAdapter
IConfigurationListener.onConfigurationFailure(org.testng.ITestResult)
public void onConfigurationSkip(ITestResult tr)
IConfigurationListener
onConfigurationSkip
in interface IConfigurationListener
onConfigurationSkip
in class TestListenerAdapter
IConfigurationListener.onConfigurationSkip(org.testng.ITestResult)
public void onConfigurationSuccess(ITestResult tr)
IConfigurationListener
onConfigurationSuccess
in interface IConfigurationListener
onConfigurationSuccess
in class TestListenerAdapter
IConfigurationListener.onConfigurationSuccess(org.testng.ITestResult)
public void onTestStart(ITestResult tr)
ITestListener
ITestResult
is only partially
filled with the references to class, method, start millis and status.onTestStart
in interface ITestListener
onTestStart
in class TestListenerAdapter
tr
- the partially filled ITestResult
ITestResult.STARTED
public void onTestFailure(ITestResult tr)
ITestListener
onTestFailure
in interface ITestListener
onTestFailure
in class TestListenerAdapter
tr
- ITestResult
containing information about the run testITestResult.FAILURE
public void onTestFailedButWithinSuccessPercentage(ITestResult tr)
ITestListener
onTestFailedButWithinSuccessPercentage
in interface ITestListener
onTestFailedButWithinSuccessPercentage
in class TestListenerAdapter
tr
- ITestResult
containing information about the run testITestResult.SUCCESS_PERCENTAGE_FAILURE
public void onTestSkipped(ITestResult tr)
ITestListener
onTestSkipped
in interface ITestListener
onTestSkipped
in class TestListenerAdapter
tr
- ITestResult
containing information about the run testITestResult.SKIP
public void onTestSuccess(ITestResult tr)
ITestListener
onTestSuccess
in interface ITestListener
onTestSuccess
in class TestListenerAdapter
tr
- ITestResult
containing information about the run testITestResult.SUCCESS
public void onStart(ITestContext ctx)
ITestListener
onStart
in interface ITestListener
onStart
in class TestListenerAdapter
public void onFinish(ITestContext context)
ITestListener
onFinish
in interface ITestListener
onFinish
in class TestListenerAdapter
private 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