Package org.testng.reporters
Class EmailableReporter2
java.lang.Object
org.testng.reporters.EmailableReporter2
- All Implemented Interfaces:
IReporter
,ITestNGListener
Reporter that generates a single-page HTML report of the test results.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
GroupsEmailableReporter2.MethodResult
s by class.protected static class
Groups test results by method.protected static class
GroupsEmailableReporter2.TestResult
s by suite.protected static class
GroupsEmailableReporter2.ClassResult
s by test, type (configuration or test), and status. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List
<EmailableReporter2.SuiteResult> protected PrintWriter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PrintWriter
createWriter
(String outdir) void
Generate a report for the given suites into the specified output directory.protected String
getFormattedStartTime
(long startTimeInMillisFromEpoch) void
setFileName
(String fileName) protected void
protected void
protected void
protected void
protected void
writeReporterMessages
(List<String> reporterMessages) protected void
Writes the details for all test scenarios.protected void
Writes a summary of all the test scenarios.protected void
writeStackTrace
(Throwable throwable) protected void
protected void
protected void
writeTableData
(String html) Writes a TD element with the specified contents.protected void
writeTableData
(String html, String cssClasses) Writes a TD element with the specified contents and CSS class names.protected void
writeTableHeader
(String html, String cssClasses) Writes a TH element with the specified contents and CSS class names.protected void
Writes an arbitrary HTML element with the specified contents and CSS class names.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.testng.ITestNGListener
isEnabled
-
Field Details
-
writer
-
suiteResults
-
-
Constructor Details
-
EmailableReporter2
public EmailableReporter2()
-
-
Method Details
-
setFileName
-
getFileName
-
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
-
createWriter
- Throws:
IOException
-
writeDocumentStart
protected void writeDocumentStart() -
writeHead
protected void writeHead() -
writeStylesheet
protected void writeStylesheet() -
writeBody
protected void writeBody() -
writeDocumentEnd
protected void writeDocumentEnd() -
writeSuiteSummary
protected void writeSuiteSummary() -
writeScenarioSummary
protected void writeScenarioSummary()Writes a summary of all the test scenarios. -
getFormattedStartTime
-
writeScenarioDetails
protected void writeScenarioDetails()Writes the details for all test scenarios. -
writeReporterMessages
-
writeStackTrace
-
writeTableHeader
Writes a TH element with the specified contents and CSS class names.- Parameters:
html
- the HTML contentscssClasses
- the space-delimited CSS classes or null if there are no classes to apply
-
writeTableData
Writes a TD element with the specified contents.- Parameters:
html
- the HTML contents
-
writeTableData
Writes a TD element with the specified contents and CSS class names.- Parameters:
html
- the HTML contentscssClasses
- the space-delimited CSS classes or null if there are no classes to apply
-
writeTag
Writes an arbitrary HTML element with the specified contents and CSS class names.- Parameters:
tag
- the tag namehtml
- the HTML contentscssClasses
- the space-delimited CSS classes or null if there are no classes to apply
-