Package org.testng.reporters
Class SuiteHTMLReporter
java.lang.Object
org.testng.reporters.SuiteHTMLReporter
- All Implemented Interfaces:
IReporter,ITestNGListener
This class implements an HTML reporter for suites.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringGenerate information about the methods that were runstatic final Stringstatic final Stringprivate static final Stringstatic final Stringprivate final Map<String, ITestClass> private Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate static final Stringprivate static final Stringprivate static final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringGenerate a HTML color based on the class of the methodprivate StringdumpMethods(ITestNGMethod[] testMethods) private StringgenerateClass(ITestClass cls) private voidgenerateClasses(XmlSuite xmlSuite) private voidgenerateExcludedMethodsReport(XmlSuite xmlSuite, ISuite suite) private voidgenerateIndex(List<ISuite> suites) Generate the main index.html file that lists all the suites and their resultprivate voidgenerateIndex(XmlSuite xmlSuite, ISuite sr) private voidgenerateMain(XmlSuite xmlSuite, ISuite sr) private voidgenerateMethodsAndGroups(XmlSuite xmlSuite, ISuite suite) Generate information about methods and groupsprivate voidgenerateMethodsChronologically(XmlSuite xmlSuite, ISuite suite, String outputFileName, boolean alphabetical) protected StringgenerateOutputDirectoryName(String outputDirectory) Overridable by subclasses to create different directory names (e.g.voidGenerate a report for the given suites into the specified output directory.private voidgenerateReporterOutput(XmlSuite xmlSuite) private voidgenerateSuiteResult(String suiteName, ISuiteResult sr, String cssClass, StringBuilder tableOfContents) private voidgenerateSuites(XmlSuite xmlSuite, ISuite suite) Writes a property file for each suite result.private voidgenerateTableOfContents(XmlSuite xmlSuite, ISuite suite) private voidgenerateXmlFile(XmlSuite xmlSuite) private static StringgetMethodName(String name) private StringgetOutputDirectory(XmlSuite xmlSuite) private Stringprivate Stringprivate ISuiteResult[]private String
-
Field Details
-
METHODS_CHRONOLOGICAL
- See Also:
-
METHODS_ALPHABETICAL
- See Also:
-
GROUPS
- See Also:
-
CLASSES
- See Also:
-
REPORTER_OUTPUT
- See Also:
-
METHODS_NOT_RUN
- See Also:
-
TESTNG_XML
- See Also:
-
TD_A_TARGET_MAIN_FRAME_HREF
- See Also:
-
CLOSE_TD
- See Also:
-
m_classes
-
m_outputDirectory
-
SP
- See Also:
-
SP2
- See Also:
-
AFTER
Generate information about the methods that were run- See Also:
-
BEFORE
- See Also:
-
-
Constructor Details
-
SuiteHTMLReporter
public SuiteHTMLReporter()
-
-
Method Details
-
generateReport
Description copied from interface:IReporterGenerate a report for the given suites into the specified output directory.- Specified by:
generateReportin interfaceIReporter- Parameters:
xmlSuites- The list ofXmlSuitesuites- The list ofISuiteoutputDirectory- The output directory
-
generateOutputDirectoryName
Overridable by subclasses to create different directory names (e.g. with timestamps).- Parameters:
outputDirectory- the output directory specified by the user- Returns:
- the name of the output directory of the report
-
generateXmlFile
-
generateIndex
Generate the main index.html file that lists all the suites and their result -
generateExcludedMethodsReport
-
generateReporterOutput
-
generateClasses
-
generateClass
-
dumpMethods
-
getMethodName
-
generateMethodsChronologically
-
createColor
Generate a HTML color based on the class of the method -
td
-
generateMethodsAndGroups
Generate information about methods and groups -
generateIndex
-
makeTitle
-
generateMain
-
generateTableOfContents
-
pluralize
-
getOutputDirectory
-
sortResults
-
generateSuiteResult
private void generateSuiteResult(String suiteName, ISuiteResult sr, String cssClass, StringBuilder tableOfContents) -
generateSuites
Writes a property file for each suite result.
-