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