public class SeleniumTestsReporter extends Object implements org.testng.IReporter, org.testng.ITestListener, org.testng.IInvokedMethodListener
Modifier and Type | Class and Description |
---|---|
protected class |
SeleniumTestsReporter.TestMethodSorter<T extends org.testng.ITestNGMethod> |
protected class |
SeleniumTestsReporter.TestResultSorter<T extends org.testng.ITestResult> |
Modifier and Type | Field and Description |
---|---|
protected PrintWriter |
m_out |
Constructor and Description |
---|
SeleniumTestsReporter() |
Modifier and Type | Method and Description |
---|---|
void |
afterInvocation(org.testng.IInvokedMethod method,
org.testng.ITestResult result) |
void |
beforeInvocation(org.testng.IInvokedMethod arg0,
org.testng.ITestResult arg1) |
protected void |
copyResources() |
protected PrintWriter |
createWriter(String outDir) |
protected void |
endHtml(PrintWriter out)
Completes HTML stream.
|
protected static String |
escape(String string) |
void |
executeCmd(String browserPath,
String theUrl) |
protected void |
generateExceptionReport(Throwable exception,
org.testng.ITestNGMethod method,
StringBuffer contentBuffer,
String lastline) |
protected void |
generateExceptionReport(Throwable exception,
org.testng.ITestNGMethod method,
String title,
StringBuffer contentBuffer,
String lastLine) |
protected void |
generateGlobalErrorHTML(org.testng.ITestContext testContext,
StringBuffer errorCountTabs,
StringBuffer errorCountHtmls) |
protected String |
generateHTML(org.testng.ITestContext tc,
boolean envt,
org.testng.ISuite suite,
org.testng.ITestContext ctx) |
protected void |
generatePanel(org.apache.velocity.app.VelocityEngine ve,
org.testng.IResultMap map,
StringBuffer res,
String style,
org.testng.ISuite suite,
org.testng.ITestContext ctx,
boolean envt) |
void |
generateReport(List<org.testng.xml.XmlSuite> xml,
List<org.testng.ISuite> suites,
String outdir) |
protected void |
generateReportDetailsContainer(String name,
int envtp,
int envtf,
int envts,
int testp,
int testf,
int tests,
String envthtml,
String testhtml,
String globalErrorTabs,
String globalErrorHtmls) |
protected void |
generateReportsSection(List<org.testng.ISuite> suites) |
void |
generateSuiteSummaryReport(List<org.testng.ISuite> suites,
String suiteName) |
protected void |
generateTheStackTrace(Throwable exception,
org.testng.ITestNGMethod method,
String title,
StringBuffer contentBuffer,
String lastline) |
protected Collection<org.testng.ITestNGMethod> |
getAllMethods(org.testng.ISuite suite) |
protected int |
getDim(Class<?> cls) |
protected org.testng.ITestResult |
getFailedOrSkippedResult(org.testng.ITestContext ctx,
org.testng.ITestNGMethod method) |
protected com.thoughtworks.qdox.JavaDocBuilder |
getJavaDocBuilder(Class clz) |
protected String |
getJavadocComments(org.testng.ITestNGMethod method) |
protected Collection<org.testng.ITestNGMethod> |
getMethodSet(org.testng.IResultMap tests) |
protected int |
getNbInstanceForGroup(boolean envt,
org.testng.IResultMap tests) |
String |
getOutputDirectory() |
File |
getReportLocation() |
String |
getResources() |
protected Collection<org.testng.ITestResult> |
getResultSet(org.testng.IResultMap tests,
org.testng.ITestNGMethod method) |
protected org.testng.ITestNGMethod |
getTestNGMethod(org.testng.ITestContext ctx,
String method) |
protected String |
getType(Class<?> cls) |
protected boolean |
hasDependencies(org.testng.ITestNGMethod method) |
protected Map<String,org.testng.ITestResult> |
initMethodsByGroup() |
void |
onFinish(org.testng.ITestContext arg0) |
void |
onStart(org.testng.ITestContext arg0) |
void |
onTestFailedButWithinSuccessPercentage(org.testng.ITestResult arg0) |
void |
onTestFailure(org.testng.ITestResult arg0) |
void |
onTestSkipped(org.testng.ITestResult arg0) |
void |
onTestStart(org.testng.ITestResult arg0) |
void |
onTestSuccess(org.testng.ITestResult arg0) |
void |
setOutputDirectory(String outtimestamped) |
void |
setReportId(String uuid) |
void |
setResources(String resources) |
protected void |
startHtml(org.testng.ITestContext ctx,
PrintWriter out)
Begin HTML stream.
|
protected void |
takeCareOfDirectDependencies(org.testng.ISuite suite,
org.testng.ITestNGMethod method,
int indent,
org.testng.ITestContext ctx,
String treeId,
StringBuffer res) |
static void |
writeResourceToFile(File file,
String resourceName,
Class<?> aClass) |
protected PrintWriter m_out
public static void writeResourceToFile(File file, String resourceName, Class<?> aClass) throws IOException
IOException
public void afterInvocation(org.testng.IInvokedMethod method, org.testng.ITestResult result)
afterInvocation
in interface org.testng.IInvokedMethodListener
public void beforeInvocation(org.testng.IInvokedMethod arg0, org.testng.ITestResult arg1)
beforeInvocation
in interface org.testng.IInvokedMethodListener
protected PrintWriter createWriter(String outDir) throws IOException, FileNotFoundException
IOException
FileNotFoundException
protected void endHtml(PrintWriter out)
out
- protected void generateExceptionReport(Throwable exception, org.testng.ITestNGMethod method, String title, StringBuffer contentBuffer, String lastLine)
protected void generateExceptionReport(Throwable exception, org.testng.ITestNGMethod method, StringBuffer contentBuffer, String lastline)
protected void generateGlobalErrorHTML(org.testng.ITestContext testContext, StringBuffer errorCountTabs, StringBuffer errorCountHtmls)
protected String generateHTML(org.testng.ITestContext tc, boolean envt, org.testng.ISuite suite, org.testng.ITestContext ctx)
protected void generatePanel(org.apache.velocity.app.VelocityEngine ve, org.testng.IResultMap map, StringBuffer res, String style, org.testng.ISuite suite, org.testng.ITestContext ctx, boolean envt)
public void generateReport(List<org.testng.xml.XmlSuite> xml, List<org.testng.ISuite> suites, String outdir)
generateReport
in interface org.testng.IReporter
protected void generateReportDetailsContainer(String name, int envtp, int envtf, int envts, int testp, int testf, int tests, String envthtml, String testhtml, String globalErrorTabs, String globalErrorHtmls)
protected void generateReportsSection(List<org.testng.ISuite> suites)
public void generateSuiteSummaryReport(List<org.testng.ISuite> suites, String suiteName)
protected void generateTheStackTrace(Throwable exception, org.testng.ITestNGMethod method, String title, StringBuffer contentBuffer, String lastline)
protected Collection<org.testng.ITestNGMethod> getAllMethods(org.testng.ISuite suite)
protected int getDim(Class<?> cls)
protected org.testng.ITestResult getFailedOrSkippedResult(org.testng.ITestContext ctx, org.testng.ITestNGMethod method)
protected com.thoughtworks.qdox.JavaDocBuilder getJavaDocBuilder(Class clz) throws URISyntaxException
URISyntaxException
protected String getJavadocComments(org.testng.ITestNGMethod method)
protected Collection<org.testng.ITestNGMethod> getMethodSet(org.testng.IResultMap tests)
tests
- protected int getNbInstanceForGroup(boolean envt, org.testng.IResultMap tests)
public String getOutputDirectory()
public File getReportLocation()
public String getResources()
protected Collection<org.testng.ITestResult> getResultSet(org.testng.IResultMap tests, org.testng.ITestNGMethod method)
tests
- protected org.testng.ITestNGMethod getTestNGMethod(org.testng.ITestContext ctx, String method)
protected boolean hasDependencies(org.testng.ITestNGMethod method)
public void onFinish(org.testng.ITestContext arg0)
onFinish
in interface org.testng.ITestListener
public void onStart(org.testng.ITestContext arg0)
onStart
in interface org.testng.ITestListener
public void onTestFailedButWithinSuccessPercentage(org.testng.ITestResult arg0)
onTestFailedButWithinSuccessPercentage
in interface org.testng.ITestListener
public void onTestFailure(org.testng.ITestResult arg0)
onTestFailure
in interface org.testng.ITestListener
public void onTestSkipped(org.testng.ITestResult arg0)
onTestSkipped
in interface org.testng.ITestListener
public void onTestStart(org.testng.ITestResult arg0)
onTestStart
in interface org.testng.ITestListener
public void onTestSuccess(org.testng.ITestResult arg0)
onTestSuccess
in interface org.testng.ITestListener
public void setOutputDirectory(String outtimestamped)
public void setReportId(String uuid)
public void setResources(String resources)
protected void startHtml(org.testng.ITestContext ctx, PrintWriter out)
protected void takeCareOfDirectDependencies(org.testng.ISuite suite, org.testng.ITestNGMethod method, int indent, org.testng.ITestContext ctx, String treeId, StringBuffer res)
Copyright © 2015. All rights reserved.