Package org.testng.reporters
Class EmailableReporter
- java.lang.Object
-
- org.testng.reporters.EmailableReporter
-
- All Implemented Interfaces:
IReporter
,ITestNGListener
public class EmailableReporter extends java.lang.Object implements IReporter
Reported designed to render self-contained HTML top down view of a testing suite.- Since:
- 5.2
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
EmailableReporter.TestSorter
Arranges methods by classname and method name
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
fileName
private static Logger
L
private int
m_methodIndex
private java.io.PrintWriter
m_out
private int
m_row
private java.lang.Integer
m_testIndex
-
Constructor Summary
Constructors Constructor Description EmailableReporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.io.PrintWriter
createWriter(java.lang.String outdir)
protected void
endHtml(java.io.PrintWriter out)
protected void
generateExceptionReport(java.lang.Throwable exception)
private void
generateForResult(ITestResult ans)
protected void
generateMethodDetailReport(java.util.List<ISuite> suites)
Creates a section showing known results for each methodprotected void
generateMethodSummaryReport(java.util.List<ISuite> suites)
Creates a table showing the highlights of each test method with links to the method detailsvoid
generateReport(java.util.List<XmlSuite> xml, java.util.List<ISuite> suites, java.lang.String outdir)
Creates summary of the runvoid
generateSuiteSummaryReport(java.util.List<ISuite> suites)
java.lang.String
getFileName()
private java.util.Collection<ITestNGMethod>
getMethodSet(IResultMap tests, ISuite suite)
Since the methods will be sorted chronologically, we want to return the ITestNGMethod from the invoked methods.private java.lang.String
qualifiedName(ITestNGMethod method)
private void
resultDetail(IResultMap tests)
private void
resultSummary(ISuite suite, IResultMap tests, java.lang.String testname, java.lang.String style, java.lang.String details)
void
setFileName(java.lang.String fileName)
protected void
startHtml(java.io.PrintWriter out)
private void
startResultSummaryTable()
Starts and defines columns result summary tableprivate void
startSummaryRow(java.lang.String label)
private void
summaryCell(int v, int maxexpected)
private void
summaryCell(java.lang.String[] val)
private void
summaryCell(java.lang.String v, boolean isGood)
private void
tableColumnStart(java.lang.String label)
private void
tableStart(java.lang.String cssclass, java.lang.String id)
private void
titleRow(java.lang.String label, int cq)
private void
titleRow(java.lang.String label, int cq, java.lang.String id)
-
-
-
Field Detail
-
L
private static final Logger L
-
m_out
private java.io.PrintWriter m_out
-
m_row
private int m_row
-
m_testIndex
private java.lang.Integer m_testIndex
-
m_methodIndex
private int m_methodIndex
-
fileName
private java.lang.String fileName
-
-
Method Detail
-
getFileName
public java.lang.String getFileName()
-
setFileName
public void setFileName(java.lang.String fileName)
-
generateReport
public void generateReport(java.util.List<XmlSuite> xml, java.util.List<ISuite> suites, java.lang.String outdir)
Creates summary of the run- Specified by:
generateReport
in interfaceIReporter
- Parameters:
xml
- The list ofXmlSuite
suites
- The list ofISuite
outdir
- The output directory
-
createWriter
protected java.io.PrintWriter createWriter(java.lang.String outdir) throws java.io.IOException
- Throws:
java.io.IOException
-
generateMethodSummaryReport
protected void generateMethodSummaryReport(java.util.List<ISuite> suites)
Creates a table showing the highlights of each test method with links to the method details- Parameters:
suites
- The run suites
-
generateMethodDetailReport
protected void generateMethodDetailReport(java.util.List<ISuite> suites)
Creates a section showing known results for each method- Parameters:
suites
- All suites
-
resultSummary
private void resultSummary(ISuite suite, IResultMap tests, java.lang.String testname, java.lang.String style, java.lang.String details)
-
startResultSummaryTable
private void startResultSummaryTable()
Starts and defines columns result summary table
-
qualifiedName
private java.lang.String qualifiedName(ITestNGMethod method)
-
resultDetail
private void resultDetail(IResultMap tests)
-
generateForResult
private void generateForResult(ITestResult ans)
-
generateExceptionReport
protected void generateExceptionReport(java.lang.Throwable exception)
-
getMethodSet
private java.util.Collection<ITestNGMethod> getMethodSet(IResultMap tests, ISuite suite)
Since the methods will be sorted chronologically, we want to return the ITestNGMethod from the invoked methods.
-
generateSuiteSummaryReport
public void generateSuiteSummaryReport(java.util.List<ISuite> suites)
-
summaryCell
private void summaryCell(java.lang.String[] val)
-
summaryCell
private void summaryCell(java.lang.String v, boolean isGood)
-
startSummaryRow
private void startSummaryRow(java.lang.String label)
-
summaryCell
private void summaryCell(int v, int maxexpected)
-
tableStart
private void tableStart(java.lang.String cssclass, java.lang.String id)
-
tableColumnStart
private void tableColumnStart(java.lang.String label)
-
titleRow
private void titleRow(java.lang.String label, int cq)
-
titleRow
private void titleRow(java.lang.String label, int cq, java.lang.String id)
-
startHtml
protected void startHtml(java.io.PrintWriter out)
-
endHtml
protected void endHtml(java.io.PrintWriter out)
-
-