Package org.testng.reporters
Class VerboseReporter
java.lang.Object
org.testng.reporters.VerboseReporter
- All Implemented Interfaces:
IConfigurationListener
,ITestListener
,ITestNGListener
Reporter printing out detailed messages about what TestNG is going to run and what is the status
of what has been just run.
To see messages from this reporter, either run Ant in verbose mode ('ant -v') or set verbose level to 5 or higher
- Since:
- 6.4
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Invoked before a configuration method is invoked.private String
getMethodDeclaration
(ITestNGMethod method, ITestResult tr) protected void
private void
logResults
(ITestContext context) Print out test summaryprivate void
logTestResult
(VerboseReporter.Status st, ITestResult itr, boolean isConfMethod) Log meaningful message for passed in arguments.void
Invoked whenever a configuration method failed.void
Invoked whenever a configuration method was skipped.void
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
Invoked each time a method fails but has been annotated with successPercentage and this failure still keeps it within the success percentage requested.void
Invoked each time a test fails.void
Invoked each time a test is skipped.void
Invoked each time before a test will be invoked.void
Invoked each time a test succeeds.private ITestNGMethod[]
resultsToMethods
(Collection<ITestResult> results) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.testng.IConfigurationListener
beforeConfiguration, onConfigurationFailure, onConfigurationSkip, onConfigurationSuccess
Methods inherited from interface org.testng.ITestListener
onTestFailedWithTimeout
-
Field Details
-
LISTENER_PREFIX
Default prefix for messages printed out by this reporter- See Also:
-
suiteName
-
prefix
-
-
Constructor Details
-
VerboseReporter
Create VerboseReporter with custom prefix- Parameters:
prefix
- prefix for messages printed out by this reporter
-
-
Method Details
-
beforeConfiguration
Description copied from interface:IConfigurationListener
Invoked before a configuration method is invoked.- Specified by:
beforeConfiguration
in interfaceIConfigurationListener
- Parameters:
tr
- The test result
-
onConfigurationFailure
Description copied from interface:IConfigurationListener
Invoked whenever a configuration method failed.- Specified by:
onConfigurationFailure
in interfaceIConfigurationListener
- Parameters:
tr
- The test result
-
onConfigurationSkip
Description copied from interface:IConfigurationListener
Invoked whenever a configuration method was skipped.- Specified by:
onConfigurationSkip
in interfaceIConfigurationListener
- Parameters:
tr
- The test result
-
onConfigurationSuccess
Description copied from interface:IConfigurationListener
Invoked whenever a configuration method succeeded.- Specified by:
onConfigurationSuccess
in interfaceIConfigurationListener
- Parameters:
tr
- The test result
-
onTestStart
Description copied from interface:ITestListener
Invoked each time before a test will be invoked. TheITestResult
is only partially filled with the references to class, method, start millis and status.- Specified by:
onTestStart
in interfaceITestListener
- Parameters:
tr
- the partially filledITestResult
- See Also:
-
onTestFailure
Description copied from interface:ITestListener
Invoked each time a test fails.- Specified by:
onTestFailure
in interfaceITestListener
- Parameters:
tr
-ITestResult
containing information about the run test- See Also:
-
onTestFailedButWithinSuccessPercentage
Description copied from interface:ITestListener
Invoked each time a method fails but has been annotated with successPercentage and this failure still keeps it within the success percentage requested.- Specified by:
onTestFailedButWithinSuccessPercentage
in interfaceITestListener
- Parameters:
tr
-ITestResult
containing information about the run test- See Also:
-
onTestSkipped
Description copied from interface:ITestListener
Invoked each time a test is skipped.- Specified by:
onTestSkipped
in interfaceITestListener
- Parameters:
tr
-ITestResult
containing information about the run test- See Also:
-
onTestSuccess
Description copied from interface:ITestListener
Invoked each time a test succeeds.- Specified by:
onTestSuccess
in interfaceITestListener
- Parameters:
tr
-ITestResult
containing information about the run test- See Also:
-
onStart
Description copied from interface:ITestListener
Invoked before running all the test methods belonging to the classes inside the <test> tag and calling all their Configuration methods.- Specified by:
onStart
in interfaceITestListener
- Parameters:
ctx
- The test context
-
onFinish
Description copied from interface:ITestListener
Invoked after all the test methods belonging to the classes inside the <test> tag have run and all their Configuration methods have been called.- Specified by:
onFinish
in interfaceITestListener
- Parameters:
context
- The test context
-
resultsToMethods
-
logResults
Print out test summary -
logTestResult
Log meaningful message for passed in arguments. Message itself is of form: $status: "$suiteName" - $methodDeclaration ($actualArguments) finished in $x ms ($run of $totalRuns)- Parameters:
st
- status of passed in itritr
- test result to be describedisConfMethod
- is itr describing configuration method
-
log
-
getMethodDeclaration
- Parameters:
method
- method to be described- Returns:
- FQN of a class + method declaration for a method passed in ie. test.triangle.CheckCount.testCheckCount(java.lang.String)
-
toString
-