Package org.testng.reporters
Class TextReporter
- java.lang.Object
-
- org.testng.TestListenerAdapter
-
- org.testng.reporters.TextReporter
-
- All Implemented Interfaces:
IConfigurationListener
,IResultListener
,IResultListener2
,ITestListener
,ITestNGListener
public class TextReporter extends TestListenerAdapter
A simple reporter that collects the results and prints them on standard out.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
LINE
private java.lang.String
m_testName
private int
m_verbose
-
Constructor Summary
Constructors Constructor Description TextReporter(java.lang.String testName, int verbose)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
logExceptions(java.lang.String status, java.util.List<ITestResult> results)
private void
logResult(java.lang.String status, java.lang.String message)
private void
logResult(java.lang.String status, java.lang.String name, java.lang.String description, java.lang.String stackTrace, java.lang.Object[] params, java.lang.Class<?>[] paramTypes)
private void
logResult(java.lang.String status, ITestResult tr, java.lang.String stackTrace)
private void
logResults()
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.private static java.util.List<ITestNGMethod>
resultsToMethods(java.util.List<ITestResult> results)
-
Methods inherited from class org.testng.TestListenerAdapter
beforeConfiguration, getAllTestMethods, getConfigurationFailures, getConfigurationSkips, getFailedButWithinSuccessPercentageTests, getFailedTests, getPassedTests, getSkippedTests, getTestContexts, getTimedoutTests, onConfigurationFailure, onConfigurationSkip, onConfigurationSuccess, onStart, onTestFailedButWithinSuccessPercentage, onTestFailedWithTimeout, onTestFailure, onTestSkipped, onTestStart, onTestSuccess, setAllTestMethods, setFailedButWithinSuccessPercentageTests, setFailedTests, setPassedTests, setSkippedTests, 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
-
-
-
-
Field Detail
-
LINE
private static final java.lang.String LINE
- See Also:
- Constant Field Values
-
m_verbose
private final int m_verbose
-
m_testName
private final java.lang.String m_testName
-
-
Method Detail
-
onFinish
public void onFinish(ITestContext context)
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
- Overrides:
onFinish
in classTestListenerAdapter
- Parameters:
context
- The test context
-
resultsToMethods
private static java.util.List<ITestNGMethod> resultsToMethods(java.util.List<ITestResult> results)
-
logResults
private void logResults()
-
logResult
private void logResult(java.lang.String status, ITestResult tr, java.lang.String stackTrace)
-
logExceptions
private void logExceptions(java.lang.String status, java.util.List<ITestResult> results)
-
logResult
private void logResult(java.lang.String status, java.lang.String message)
-
logResult
private void logResult(java.lang.String status, java.lang.String name, java.lang.String description, java.lang.String stackTrace, java.lang.Object[] params, java.lang.Class<?>[] paramTypes)
-
-