Package org.testng.reporters
Class TextReporter
- java.lang.Object
-
- org.testng.TestListenerAdapter
-
- org.testng.reporters.TextReporter
-
- All Implemented Interfaces:
IConfigurationListener
,IConfigurationListener2
,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 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
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 tests 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, onConfigurationFailure, onConfigurationSkip, onConfigurationSuccess, onStart, onTestFailedButWithinSuccessPercentage, onTestFailure, onTestSkipped, onTestStart, onTestSuccess, setAllTestMethods, setFailedButWithinSuccessPercentageTests, setFailedTests, setPassedTests, setSkippedTests, toString
-
-
-
-
Method Detail
-
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 interfaceITestListener
- Overrides:
onFinish
in classTestListenerAdapter
-
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)
-
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)
-
-