Package org.testng.reporters
Class TestHTMLReporter
java.lang.Object
org.testng.reporters.TestHTMLReporter
- All Implemented Interfaces:
ITestListener,ITestNGListener
This class implements an HTML reporter for individual tests.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Comparator<ITestResult> private static final Stringprivate ITestContextprivate static final Comparator<ITestResult> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringarrayToString(String[] array) static voidgenerateLog(ITestContext testContext, String host, String outputDirectory, Collection<ITestResult> failedConfs, Collection<ITestResult> skippedConfs, Collection<ITestResult> passedTests, Collection<ITestResult> failedTests, Collection<ITestResult> skippedTests, Collection<ITestResult> percentageTests) static voidgenerateTable(PrintWriter pw, String title, Collection<ITestResult> tests, String cssClass, Comparator<ITestResult> comparator) private static StringgetOutputFile(ITestContext context) private static voidvoidonFinish(ITestContext context) Invoked after all the test methods belonging to the classes inside the <test> tag have run and all their Configuration methods have been called.voidonStart(ITestContext context) Invoked before running all the test methods belonging to the classes inside the <test> tag and calling all their Configuration methods.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.testng.ITestListener
onTestFailedButWithinSuccessPercentage, onTestFailedWithTimeout, onTestFailure, onTestSkipped, onTestStart, onTestSuccess
-
Field Details
-
NAME_COMPARATOR
-
CONFIGURATION_COMPARATOR
-
m_testContext
-
HEAD
- See Also:
-
-
Constructor Details
-
TestHTMLReporter
public TestHTMLReporter()
-
-
Method Details
-
onStart
Description copied from interface:ITestListenerInvoked before running all the test methods belonging to the classes inside the <test> tag and calling all their Configuration methods.- Specified by:
onStartin interfaceITestListener- Parameters:
context- The test context
-
onFinish
Description copied from interface:ITestListenerInvoked after all the test methods belonging to the classes inside the <test> tag have run and all their Configuration methods have been called.- Specified by:
onFinishin interfaceITestListener- Parameters:
context- The test context
-
getOutputFile
-
generateTable
public static void generateTable(PrintWriter pw, String title, Collection<ITestResult> tests, String cssClass, Comparator<ITestResult> comparator) -
arrayToString
-
generateLog
public static void generateLog(ITestContext testContext, String host, String outputDirectory, Collection<ITestResult> failedConfs, Collection<ITestResult> skippedConfs, Collection<ITestResult> passedTests, Collection<ITestResult> failedTests, Collection<ITestResult> skippedTests, Collection<ITestResult> percentageTests) -
log
-