public class TestNGReporter
extends java.lang.Object
implements org.testng.ITestListener, org.testng.ISuiteListener
RunListener
.Modifier and Type | Field and Description |
---|---|
private RunListener |
reporter |
Constructor and Description |
---|
TestNGReporter(RunListener reportManager)
Constructs a new instance that will listen to
test updates from a
TestNG class instance. |
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
getSource(org.testng.ITestResult result) |
private static java.lang.String |
getUserFriendlyTestName(org.testng.ITestResult result) |
private static java.lang.String |
groupString(java.lang.String[] groups,
java.lang.String defaultValue)
Creates a string out of the list of testng groups in the
form of
|
void |
onConfigurationFailure(org.testng.ITestResult result) |
void |
onConfigurationSkip(org.testng.ITestResult result) |
void |
onConfigurationSuccess(org.testng.ITestResult result) |
void |
onFinish(org.testng.ISuite suite) |
void |
onFinish(org.testng.ITestContext context) |
void |
onStart(org.testng.ISuite suite) |
void |
onStart(org.testng.ITestContext context) |
void |
onTestFailedButWithinSuccessPercentage(org.testng.ITestResult result) |
void |
onTestFailure(org.testng.ITestResult result) |
void |
onTestSkipped(org.testng.ITestResult result) |
void |
onTestStart(org.testng.ITestResult result) |
void |
onTestSuccess(org.testng.ITestResult result) |
private final RunListener reporter
public TestNGReporter(RunListener reportManager)
TestNG
class instance.
TestNG.addListener(ITestListener)
method call has already associated with this instance before the test
suite is run.reportManager
- Instance to report suite status topublic void onTestStart(org.testng.ITestResult result)
onTestStart
in interface org.testng.ITestListener
private java.lang.String getSource(org.testng.ITestResult result)
public void onTestSuccess(org.testng.ITestResult result)
onTestSuccess
in interface org.testng.ITestListener
public void onTestFailure(org.testng.ITestResult result)
onTestFailure
in interface org.testng.ITestListener
private static java.lang.String getUserFriendlyTestName(org.testng.ITestResult result)
public void onTestSkipped(org.testng.ITestResult result)
onTestSkipped
in interface org.testng.ITestListener
public void onTestFailedButWithinSuccessPercentage(org.testng.ITestResult result)
onTestFailedButWithinSuccessPercentage
in interface org.testng.ITestListener
public void onStart(org.testng.ITestContext context)
onStart
in interface org.testng.ITestListener
public void onFinish(org.testng.ITestContext context)
onFinish
in interface org.testng.ITestListener
public void onStart(org.testng.ISuite suite)
onStart
in interface org.testng.ISuiteListener
public void onFinish(org.testng.ISuite suite)
onFinish
in interface org.testng.ISuiteListener
private static java.lang.String groupString(java.lang.String[] groups, java.lang.String defaultValue)
"group1,group2,group3".
groups
- The groups being rundefaultValue
- The default to use if no groupspublic void onConfigurationFailure(org.testng.ITestResult result)
public void onConfigurationSkip(org.testng.ITestResult result)
public void onConfigurationSuccess(org.testng.ITestResult result)