Package org.testng.reporters
Class FailedReporter
java.lang.Object
org.testng.reporters.FailedReporter
- All Implemented Interfaces:
IReporter
,ITestNGListener
This reporter is responsible for creating testng-failed.xml
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateXmlClasses
(List<ITestNGMethod> methods, XmlTest srcXmlTest) private void
createXmlTest
(ITestContext context, List<ITestNGMethod> methods, XmlTest srcXmlTest) Generate testng-failed.xmlfindMethodLocalParameters
(XmlTest srcXmlTest, ITestNGMethod method) Get local parameters of one include method from origin test xml.protected void
generateFailureSuite
(XmlSuite xmlSuite, ISuite suite, String outputDir) void
Generate a report for the given suites into the specified output directory.private void
generateXmlTest
(XmlTest xmlTest, ITestContext context, Set<ITestResult> failedTests, Set<ITestResult> skippedTests) private static void
getAllApplicableConfigs
(Set<ITestNGMethod> configs, ITestClass iTestClass)
-
Field Details
-
TESTNG_FAILED_XML
- See Also:
-
m_xmlSuite
-
-
Constructor Details
-
FailedReporter
public FailedReporter() -
FailedReporter
-
-
Method Details
-
generateReport
Description copied from interface:IReporter
Generate a report for the given suites into the specified output directory.- Specified by:
generateReport
in interfaceIReporter
- Parameters:
xmlSuites
- The list ofXmlSuite
suites
- The list ofISuite
outputDirectory
- The output directory
-
generateFailureSuite
-
generateXmlTest
private void generateXmlTest(XmlTest xmlTest, ITestContext context, Set<ITestResult> failedTests, Set<ITestResult> skippedTests) -
getAllApplicableConfigs
-
createXmlTest
Generate testng-failed.xml -
createXmlClasses
- Parameters:
methods
- The methods we want to representsrcXmlTest
- TheXmlTest
object that represents the source.- Returns:
- A list of XmlClass objects (each representing a
tag) based on the parameter methods
-
findMethodLocalParameters
private static Map<String,String> findMethodLocalParameters(XmlTest srcXmlTest, ITestNGMethod method) Get local parameters of one include method from origin test xml.- Parameters:
srcXmlTest
- TheXmlTest
object that represents the source.method
- the method we want to find its parameters- Returns:
- local parameters belong to one test method.
-