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 classEmailableReporter.TestSorterArranges methods by classname and method name
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringfileNameprivate static LoggerLprivate intm_methodIndexprivate java.io.PrintWriterm_outprivate intm_rowprivate java.lang.Integerm_testIndex
-
Constructor Summary
Constructors Constructor Description EmailableReporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.io.PrintWritercreateWriter(java.lang.String outdir)protected voidendHtml(java.io.PrintWriter out)protected voidgenerateExceptionReport(java.lang.Throwable exception)private voidgenerateForResult(ITestResult ans)protected voidgenerateMethodDetailReport(java.util.List<ISuite> suites)Creates a section showing known results for each methodprotected voidgenerateMethodSummaryReport(java.util.List<ISuite> suites)Creates a table showing the highlights of each test method with links to the method detailsvoidgenerateReport(java.util.List<XmlSuite> xml, java.util.List<ISuite> suites, java.lang.String outdir)Creates summary of the runvoidgenerateSuiteSummaryReport(java.util.List<ISuite> suites)java.lang.StringgetFileName()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.StringqualifiedName(ITestNGMethod method)private voidresultDetail(IResultMap tests)private voidresultSummary(ISuite suite, IResultMap tests, java.lang.String testname, java.lang.String style, java.lang.String details)voidsetFileName(java.lang.String fileName)protected voidstartHtml(java.io.PrintWriter out)private voidstartResultSummaryTable()Starts and defines columns result summary tableprivate voidstartSummaryRow(java.lang.String label)private voidsummaryCell(int v, int maxexpected)private voidsummaryCell(java.lang.String[] val)private voidsummaryCell(java.lang.String v, boolean isGood)private voidtableColumnStart(java.lang.String label)private voidtableStart(java.lang.String cssclass, java.lang.String id)private voidtitleRow(java.lang.String label, int cq)private voidtitleRow(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:
generateReportin interfaceIReporter- Parameters:
xml- The list ofXmlSuitesuites- The list ofISuiteoutdir- 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)
-
-