public class JUnitXMLReporter
extends java.lang.Object
implements org.testng.internal.IResultListener2
Constructor and Description |
---|
JUnitXMLReporter() |
Modifier and Type | Method and Description |
---|---|
void |
beforeConfiguration(ITestResult tr)
Invoked before a configuration method is invoked.
|
protected void |
generateReport(ITestContext context)
generate the XML report given what we know from all the test results
|
void |
onConfigurationFailure(ITestResult itr)
Invoked whenever a configuration method failed.
|
void |
onConfigurationSkip(ITestResult itr)
Invoked whenever a configuration method was skipped.
|
void |
onConfigurationSuccess(ITestResult itr)
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 context)
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 result)
Invoked each time before a test will be invoked.
|
void |
onTestSuccess(ITestResult tr)
Invoked each time a test succeeds.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onTestFailedWithTimeout
beforeConfiguration, onConfigurationFailure, onConfigurationSkip, onConfigurationSuccess
public void onTestStart(ITestResult result)
ITestListener
ITestResult
is only partially
filled with the references to class, method, start millis and status.onTestStart
in interface ITestListener
result
- the partially filled ITestResult
ITestResult.STARTED
public void beforeConfiguration(ITestResult tr)
IConfigurationListener
beforeConfiguration
in interface IConfigurationListener
tr
- The test resultpublic void onTestSuccess(ITestResult tr)
onTestSuccess
in interface ITestListener
tr
- ITestResult
containing information about the run testITestResult.SUCCESS
public void onTestFailedButWithinSuccessPercentage(ITestResult tr)
ITestListener
onTestFailedButWithinSuccessPercentage
in interface ITestListener
tr
- ITestResult
containing information about the run testITestResult.SUCCESS_PERCENTAGE_FAILURE
public void onTestFailure(ITestResult tr)
onTestFailure
in interface ITestListener
tr
- ITestResult
containing information about the run testITestResult.FAILURE
public void onTestSkipped(ITestResult tr)
onTestSkipped
in interface ITestListener
tr
- ITestResult
containing information about the run testITestResult.SKIP
public void onStart(ITestContext context)
onStart
in interface ITestListener
context
- The test contextpublic void onFinish(ITestContext context)
onFinish
in interface ITestListener
context
- The test contextpublic void onConfigurationFailure(ITestResult itr)
IConfigurationListener
onConfigurationFailure
in interface IConfigurationListener
itr
- The test resultIConfigurationListener.onConfigurationFailure(org.testng.ITestResult)
public void onConfigurationSkip(ITestResult itr)
IConfigurationListener
onConfigurationSkip
in interface IConfigurationListener
itr
- The test resultIConfigurationListener.onConfigurationSkip(org.testng.ITestResult)
public void onConfigurationSuccess(ITestResult itr)
IConfigurationListener
onConfigurationSuccess
in interface IConfigurationListener
itr
- The test resultIConfigurationListener.onConfigurationSuccess(org.testng.ITestResult)
protected void generateReport(ITestContext context)
context
- The test context