org.testng.reporters
Class VerboseReporter

java.lang.Object
  extended by org.testng.TestListenerAdapter
      extended by org.testng.reporters.VerboseReporter
All Implemented Interfaces:
IConfigurationListener, IConfigurationListener2, org.testng.internal.IResultListener, org.testng.internal.IResultListener2, ITestListener, ITestNGListener

public class VerboseReporter
extends TestListenerAdapter

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
Author:
Lukas Jungmann

Field Summary
static String LISTENER_PREFIX
          Default prefix for messages printed out by this reporter
 
Constructor Summary
VerboseReporter()
          Default constructor
VerboseReporter(String prefix)
          Create VerboseReporter with custom prefix
 
Method Summary
 void beforeConfiguration(ITestResult tr)
          Invoked before a configuration method is invoked.
protected  void log(String message)
           
 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.
 String toString()
           
 
Methods inherited from class org.testng.TestListenerAdapter
getAllTestMethods, getConfigurationFailures, getConfigurationSkips, getFailedButWithinSuccessPercentageTests, getFailedTests, getPassedTests, getSkippedTests, getTestContexts, setAllTestMethods, setFailedButWithinSuccessPercentageTests, setFailedTests, setPassedTests, setSkippedTests
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LISTENER_PREFIX

public static final String LISTENER_PREFIX
Default prefix for messages printed out by this reporter

See Also:
Constant Field Values
Constructor Detail

VerboseReporter

public VerboseReporter()
Default constructor


VerboseReporter

public VerboseReporter(String prefix)
Create VerboseReporter with custom prefix

Parameters:
prefix - prefix for messages printed out by this reporter
Method Detail

beforeConfiguration

public void beforeConfiguration(ITestResult tr)
Description copied from interface: IConfigurationListener2
Invoked before a configuration method is invoked.

Specified by:
beforeConfiguration in interface IConfigurationListener2
Overrides:
beforeConfiguration in class TestListenerAdapter

onConfigurationFailure

public void onConfigurationFailure(ITestResult tr)
Description copied from interface: IConfigurationListener
Invoked whenever a configuration method failed.

Specified by:
onConfigurationFailure in interface IConfigurationListener
Overrides:
onConfigurationFailure in class TestListenerAdapter
See Also:
IConfigurationListener.onConfigurationFailure(org.testng.ITestResult)

onConfigurationSkip

public void onConfigurationSkip(ITestResult tr)
Description copied from interface: IConfigurationListener
Invoked whenever a configuration method was skipped.

Specified by:
onConfigurationSkip in interface IConfigurationListener
Overrides:
onConfigurationSkip in class TestListenerAdapter
See Also:
IConfigurationListener.onConfigurationSkip(org.testng.ITestResult)

onConfigurationSuccess

public void onConfigurationSuccess(ITestResult tr)
Description copied from interface: IConfigurationListener
Invoked whenever a configuration method succeeded.

Specified by:
onConfigurationSuccess in interface IConfigurationListener
Overrides:
onConfigurationSuccess in class TestListenerAdapter
See Also:
IConfigurationListener.onConfigurationSuccess(org.testng.ITestResult)

onTestStart

public void onTestStart(ITestResult tr)
Description copied from interface: ITestListener
Invoked each time before a test will be invoked. The ITestResult is only partially filled with the references to class, method, start millis and status.

Specified by:
onTestStart in interface ITestListener
Overrides:
onTestStart in class TestListenerAdapter
Parameters:
tr - the partially filled ITestResult
See Also:
ITestResult.STARTED

onTestFailure

public void onTestFailure(ITestResult tr)
Description copied from interface: ITestListener
Invoked each time a test fails.

Specified by:
onTestFailure in interface ITestListener
Overrides:
onTestFailure in class TestListenerAdapter
Parameters:
tr - ITestResult containing information about the run test
See Also:
ITestResult.FAILURE

onTestFailedButWithinSuccessPercentage

public void onTestFailedButWithinSuccessPercentage(ITestResult tr)
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 interface ITestListener
Overrides:
onTestFailedButWithinSuccessPercentage in class TestListenerAdapter
Parameters:
tr - ITestResult containing information about the run test
See Also:
ITestResult.SUCCESS_PERCENTAGE_FAILURE

onTestSkipped

public void onTestSkipped(ITestResult tr)
Description copied from interface: ITestListener
Invoked each time a test is skipped.

Specified by:
onTestSkipped in interface ITestListener
Overrides:
onTestSkipped in class TestListenerAdapter
Parameters:
tr - ITestResult containing information about the run test
See Also:
ITestResult.SKIP

onTestSuccess

public void onTestSuccess(ITestResult tr)
Description copied from interface: ITestListener
Invoked each time a test succeeds.

Specified by:
onTestSuccess in interface ITestListener
Overrides:
onTestSuccess in class TestListenerAdapter
Parameters:
tr - ITestResult containing information about the run test
See Also:
ITestResult.SUCCESS

onStart

public void onStart(ITestContext ctx)
Description copied from interface: ITestListener
Invoked after the test class is instantiated and before any configuration method is called.

Specified by:
onStart in interface ITestListener
Overrides:
onStart in class TestListenerAdapter

onFinish

public void onFinish(ITestContext context)
Description copied from interface: ITestListener
Invoked after all the tests have run and all their Configuration methods have been called.

Specified by:
onFinish in interface ITestListener
Overrides:
onFinish in class TestListenerAdapter

log

protected void log(String message)

toString

public String toString()
Overrides:
toString in class TestListenerAdapter


Copyright © 2015. All Rights Reserved.