public class EmailableReporter2 extends java.lang.Object implements IReporter
Modifier and Type | Class and Description |
---|---|
protected static class |
EmailableReporter2.ClassResult
Groups
EmailableReporter2.MethodResult s by class. |
protected static class |
EmailableReporter2.MethodResult
Groups test results by method.
|
protected static class |
EmailableReporter2.SuiteResult
Groups
EmailableReporter2.TestResult s by suite. |
protected static class |
EmailableReporter2.TestResult
Groups
EmailableReporter2.ClassResult s by test, type (configuration or test), and
status. |
Modifier and Type | Field and Description |
---|---|
private java.lang.StringBuilder |
buffer |
private java.lang.String |
fileName |
private static java.lang.String |
JVM_ARG |
private static Logger |
LOG |
protected java.util.List<EmailableReporter2.SuiteResult> |
suiteResults |
protected java.io.PrintWriter |
writer |
Constructor and Description |
---|
EmailableReporter2() |
Modifier and Type | Method and Description |
---|---|
protected java.io.PrintWriter |
createWriter(java.lang.String outdir) |
void |
generateReport(java.util.List<XmlSuite> xmlSuites,
java.util.List<ISuite> suites,
java.lang.String outputDirectory)
Generate a report for the given suites into the specified output directory.
|
java.lang.String |
getFileName() |
void |
setFileName(java.lang.String fileName) |
protected void |
writeBody() |
protected void |
writeDocumentEnd() |
protected void |
writeDocumentStart() |
protected void |
writeHead() |
protected void |
writeReporterMessages(java.util.List<java.lang.String> reporterMessages) |
private void |
writeScenario(int scenarioIndex,
java.lang.String label,
ITestResult result)
Writes the details for an individual test scenario.
|
protected void |
writeScenarioDetails()
Writes the details for all test scenarios.
|
private int |
writeScenarioDetails(java.util.List<EmailableReporter2.ClassResult> classResults,
int startingScenarioIndex)
Writes the scenario details for the results of a given state for a single
test.
|
protected void |
writeScenarioSummary()
Writes a summary of all the test scenarios.
|
private int |
writeScenarioSummary(java.lang.String description,
java.util.List<EmailableReporter2.ClassResult> classResults,
java.lang.String cssClassPrefix,
int startingScenarioIndex)
Writes the scenario summary for the results of a given state for a single
test.
|
protected void |
writeStackTrace(java.lang.Throwable throwable) |
protected void |
writeStylesheet() |
protected void |
writeSuiteSummary() |
protected void |
writeTableData(java.lang.String html)
Writes a TD element with the specified contents.
|
protected void |
writeTableData(java.lang.String html,
java.lang.String cssClasses)
Writes a TD element with the specified contents and CSS class names.
|
protected void |
writeTableHeader(java.lang.String html,
java.lang.String cssClasses)
Writes a TH element with the specified contents and CSS class names.
|
protected void |
writeTag(java.lang.String tag,
java.lang.String html,
java.lang.String cssClasses)
Writes an arbitrary HTML element with the specified contents and CSS
class names.
|
private static final Logger LOG
protected java.io.PrintWriter writer
protected final java.util.List<EmailableReporter2.SuiteResult> suiteResults
private final java.lang.StringBuilder buffer
private java.lang.String fileName
private static final java.lang.String JVM_ARG
public void setFileName(java.lang.String fileName)
public java.lang.String getFileName()
public void generateReport(java.util.List<XmlSuite> xmlSuites, java.util.List<ISuite> suites, java.lang.String outputDirectory)
IReporter
generateReport
in interface IReporter
protected java.io.PrintWriter createWriter(java.lang.String outdir) throws java.io.IOException
java.io.IOException
protected void writeDocumentStart()
protected void writeHead()
protected void writeStylesheet()
protected void writeBody()
protected void writeDocumentEnd()
protected void writeSuiteSummary()
protected void writeScenarioSummary()
private int writeScenarioSummary(java.lang.String description, java.util.List<EmailableReporter2.ClassResult> classResults, java.lang.String cssClassPrefix, int startingScenarioIndex)
protected void writeScenarioDetails()
private int writeScenarioDetails(java.util.List<EmailableReporter2.ClassResult> classResults, int startingScenarioIndex)
private void writeScenario(int scenarioIndex, java.lang.String label, ITestResult result)
protected void writeReporterMessages(java.util.List<java.lang.String> reporterMessages)
protected void writeStackTrace(java.lang.Throwable throwable)
protected void writeTableHeader(java.lang.String html, java.lang.String cssClasses)
html
- the HTML contentscssClasses
- the space-delimited CSS classes or null if there are no
classes to applyprotected void writeTableData(java.lang.String html)
html
- the HTML contentsprotected void writeTableData(java.lang.String html, java.lang.String cssClasses)
html
- the HTML contentscssClasses
- the space-delimited CSS classes or null if there are no
classes to applyprotected void writeTag(java.lang.String tag, java.lang.String html, java.lang.String cssClasses)
tag
- the tag namehtml
- the HTML contentscssClasses
- the space-delimited CSS classes or null if there are no
classes to apply