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 String
Generate information about the methods that were runstatic final String
static final String
private static final String
static final String
private final Map<String,
ITestClass> private String
static final String
static final String
static final String
static final String
private static final String
private static final String
private static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate String
Generate a HTML color based on the class of the methodprivate String
dumpMethods
(ITestNGMethod[] testMethods) private String
generateClass
(ITestClass cls) private void
generateClasses
(XmlSuite xmlSuite) private void
generateExcludedMethodsReport
(XmlSuite xmlSuite, ISuite suite) private void
generateIndex
(List<ISuite> suites) Generate the main index.html file that lists all the suites and their resultprivate void
generateIndex
(XmlSuite xmlSuite, ISuite sr) private void
generateMain
(XmlSuite xmlSuite, ISuite sr) private void
generateMethodsAndGroups
(XmlSuite xmlSuite, ISuite suite) Generate information about methods and groupsprivate void
generateMethodsChronologically
(XmlSuite xmlSuite, ISuite suite, String outputFileName, boolean alphabetical) protected String
generateOutputDirectoryName
(String outputDirectory) Overridable by subclasses to create different directory names (e.g.void
Generate a report for the given suites into the specified output directory.private void
generateReporterOutput
(XmlSuite xmlSuite) private void
generateSuiteResult
(String suiteName, ISuiteResult sr, String cssClass, StringBuilder tableOfContents) private void
generateSuites
(XmlSuite xmlSuite, ISuite suite) Writes a property file for each suite result.private void
generateTableOfContents
(XmlSuite xmlSuite, ISuite suite) private void
generateXmlFile
(XmlSuite xmlSuite) private static String
getMethodName
(String name) private String
getOutputDirectory
(XmlSuite xmlSuite) private String
private String
private 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: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
-
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.
-