Package org.testng.reporters
Class JUnitXMLReporter
java.lang.Object
org.testng.reporters.JUnitXMLReporter
- All Implemented Interfaces:
IConfigurationListener
,org.testng.internal.IResultListener
,org.testng.internal.IResultListener2
,ITestListener
,ITestNGListener
A JUnit XML report generator (replacing the original JUnitXMLReporter that was based on XML
APIs).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
generateReport
(ITestContext context) generate the XML report given what we know from all the test resultsvoid
Invoked whenever a configuration method failed.void
Invoked whenever a configuration method was skipped.void
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
Invoked each time a method fails but has been annotated with successPercentage and this failure still keeps it within the success percentage requested.void
Invoked each time a test fails.void
Invoked each time a test is skipped.void
Invoked each time a test succeeds.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.testng.IConfigurationListener
beforeConfiguration, beforeConfiguration, onConfigurationFailure, onConfigurationSkip, onConfigurationSuccess
Methods inherited from interface org.testng.ITestListener
onTestFailedWithTimeout, onTestStart
Methods inherited from interface org.testng.ITestNGListener
isEnabled
-
Constructor Details
-
JUnitXMLReporter
public JUnitXMLReporter()
-
-
Method Details
-
onTestSuccess
Invoked each time a test succeeds.- Specified by:
onTestSuccess
in interfaceITestListener
- Parameters:
tr
-ITestResult
containing information about the run test- See Also:
-
onTestFailedButWithinSuccessPercentage
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 interfaceITestListener
- Parameters:
tr
-ITestResult
containing information about the run test- See Also:
-
onTestFailure
Invoked each time a test fails.- Specified by:
onTestFailure
in interfaceITestListener
- Parameters:
tr
-ITestResult
containing information about the run test- See Also:
-
onTestSkipped
Invoked each time a test is skipped.- Specified by:
onTestSkipped
in interfaceITestListener
- Parameters:
tr
-ITestResult
containing information about the run test- See Also:
-
onStart
Invoked after the test class is instantiated and before any configuration method is called.- Specified by:
onStart
in interfaceITestListener
- Parameters:
context
- The test context
-
onFinish
Invoked after all the tests have run and all their Configuration methods have been called.- Specified by:
onFinish
in interfaceITestListener
- Parameters:
context
- The test context
-
onConfigurationFailure
Description copied from interface:IConfigurationListener
Invoked whenever a configuration method failed.- Specified by:
onConfigurationFailure
in interfaceIConfigurationListener
- Parameters:
itr
- The test result- See Also:
-
onConfigurationSkip
Description copied from interface:IConfigurationListener
Invoked whenever a configuration method was skipped.- Specified by:
onConfigurationSkip
in interfaceIConfigurationListener
- Parameters:
itr
- The test result- See Also:
-
onConfigurationSuccess
Description copied from interface:IConfigurationListener
Invoked whenever a configuration method succeeded.- Specified by:
onConfigurationSuccess
in interfaceIConfigurationListener
- Parameters:
itr
- The test result- See Also:
-
generateReport
generate the XML report given what we know from all the test results- Parameters:
context
- The test context
-