Package org.testng.reporters
Class TestHTMLReporter
- java.lang.Object
-
- org.testng.TestListenerAdapter
-
- org.testng.reporters.TestHTMLReporter
-
- All Implemented Interfaces:
IConfigurationListener
,IConfigurationListener2
,IResultListener
,IResultListener2
,ITestListener
,ITestNGListener
public class TestHTMLReporter extends TestListenerAdapter
This class implements an HTML reporter for individual tests.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
TestHTMLReporter.ConfigurationComparator
private static class
TestHTMLReporter.NameComparator
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Comparator<ITestResult>
CONFIGURATION_COMPARATOR
private static java.lang.String
HEAD
private ITestContext
m_testContext
private static java.util.Comparator<ITestResult>
NAME_COMPARATOR
-
Constructor Summary
Constructors Constructor Description TestHTMLReporter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.String
arrayToString(java.lang.String[] array)
static void
generateLog(ITestContext testContext, java.lang.String host, java.lang.String outputDirectory, java.util.Collection<ITestResult> failedConfs, java.util.Collection<ITestResult> skippedConfs, java.util.Collection<ITestResult> passedTests, java.util.Collection<ITestResult> failedTests, java.util.Collection<ITestResult> skippedTests, java.util.Collection<ITestResult> percentageTests)
static void
generateTable(java.io.PrintWriter pw, java.lang.String title, java.util.Collection<ITestResult> tests, java.lang.String cssClass, java.util.Comparator<ITestResult> comparator)
private static java.lang.String
getOutputFile(ITestContext context)
void
onFinish(ITestContext context)
Invoked after all the tests have run and all their Configuration methods have been called.void
onStart(ITestContext context)
Invoked after the test class is instantiated and before any configuration method is called.private static void
ppp(java.lang.String s)
-
Methods inherited from class org.testng.TestListenerAdapter
beforeConfiguration, getAllTestMethods, getConfigurationFailures, getConfigurationSkips, getFailedButWithinSuccessPercentageTests, getFailedTests, getPassedTests, getSkippedTests, getTestContexts, onConfigurationFailure, onConfigurationSkip, onConfigurationSuccess, onTestFailedButWithinSuccessPercentage, onTestFailure, onTestSkipped, onTestStart, onTestSuccess, setAllTestMethods, setFailedButWithinSuccessPercentageTests, setFailedTests, setPassedTests, setSkippedTests, toString
-
-
-
-
Field Detail
-
NAME_COMPARATOR
private static final java.util.Comparator<ITestResult> NAME_COMPARATOR
-
CONFIGURATION_COMPARATOR
private static final java.util.Comparator<ITestResult> CONFIGURATION_COMPARATOR
-
m_testContext
private ITestContext m_testContext
-
HEAD
private static final java.lang.String HEAD
- See Also:
- Constant Field Values
-
-
Method Detail
-
onStart
public void onStart(ITestContext context)
Description copied from interface:ITestListener
Invoked after the test class is instantiated and before any configuration method is called.- Specified by:
onStart
in interfaceITestListener
- Overrides:
onStart
in classTestListenerAdapter
-
onFinish
public void onFinish(ITestContext context)
Description copied from interface:ITestListener
Invoked after all the tests have run and all their Configuration methods have been called.- Specified by:
onFinish
in interfaceITestListener
- Overrides:
onFinish
in classTestListenerAdapter
-
getOutputFile
private static java.lang.String getOutputFile(ITestContext context)
-
generateTable
public static void generateTable(java.io.PrintWriter pw, java.lang.String title, java.util.Collection<ITestResult> tests, java.lang.String cssClass, java.util.Comparator<ITestResult> comparator)
-
arrayToString
private static java.lang.String arrayToString(java.lang.String[] array)
-
generateLog
public static void generateLog(ITestContext testContext, java.lang.String host, java.lang.String outputDirectory, java.util.Collection<ITestResult> failedConfs, java.util.Collection<ITestResult> skippedConfs, java.util.Collection<ITestResult> passedTests, java.util.Collection<ITestResult> failedTests, java.util.Collection<ITestResult> skippedTests, java.util.Collection<ITestResult> percentageTests)
-
ppp
private static void ppp(java.lang.String s)
-
-