Top Inners Constructors Methods
org.testng.reporters

public Class JUnitReportReporter

extends Object
implements IReporter
Class Inheritance
All Implemented Interfaces
org.testng.IReporter, org.testng.ITestNGListener
Imports
java.io.File, .PrintWriter, .StringWriter, java.net.InetAddress, .UnknownHostException, java.text.DecimalFormat, .DecimalFormatSymbols, java.util.ArrayList, .Collection, .Collections, .Comparator, .List, .Map, .Properties, .Set, org.testng.IReporter, .ISuite, .ISuiteResult, .ITestContext, .ITestNGMethod, .ITestResult, .Reporter, org.testng.collections.ListMultiMap, .Lists, .Maps, .SetMultiMap, .Sets, org.testng.internal.Utils, org.testng.xml.XmlSuite

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
private void
addResults(Set<ITestResult> allResults, Map<Class<?>, Set<ITestResult>> out)

private JUnitReportReporter.TestTag
private JUnitReportReporter.TestTag
private String
formatTime(float time)

public void
generateReport(List<XmlSuite>
The list of XmlSuite
xmlSuites
,
List<ISuite>
The list of ISuite
suites
,
String
The output directory
defaultOutputDirectory
)

Overrides default org.testng.IReporter.generateReport.

Generate a report for the given suites into the specified output directory.
private static int
protected String
private static String
private long
getNextConfiguration(ListMultiMap<Object, ITestResult> configurations, ITestResult tr)

Add the time of the configuration method to this test method.

protected String
private static void
private boolean
putElement(XMLStringBuffer xsb, String tagName, Properties attributes, boolean hasChildElements)

Put a XML start or empty tag to the XMLStringBuffer depending on hasChildElements parameter

private void
safeSetProperty(Properties p, String key, String value)

Set property if value is non-null

private static Collection<ITestResult>
sort(Set<ITestResult> results)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

JUnitReportReporterback to summary
public JUnitReportReporter()

Method Detail

addMappingback to summary
private void addMapping(SetMultiMap<Class<?>, ITestNGMethod> mapping, Collection<ITestNGMethod> methods)
addResultsback to summary
private void addResults(Set<ITestResult> allResults, Map<Class<?>, Set<ITestResult>> out)
createIgnoredTestTagForback to summary
private JUnitReportReporter.TestTag createIgnoredTestTagFor(ITestNGMethod method)
createTestTagForback to summary
private JUnitReportReporter.TestTag createTestTagFor(ITestResult tr, Class<?> cls)
formatTimeback to summary
private String formatTime(float time)
generateReportback to summary
public void generateReport(List<XmlSuite> xmlSuites, List<ISuite> suites, String defaultOutputDirectory)

Overrides default org.testng.IReporter.generateReport.

Doc from org.testng.IReporter.generateReport.

Generate a report for the given suites into the specified output directory.

Parameters
xmlSuites:List<XmlSuite>

The list of XmlSuite

suites:List<ISuite>

The list of ISuite

defaultOutputDirectory:String

The output directory

Annotations
@Override
getDisabledTestCountback to summary
private static int getDisabledTestCount(Set<ITestNGMethod> methods)
getFileNameback to summary
protected String getFileName(Class<T> cls)
getHostNameback to summary
private static String getHostName()
getNextConfigurationback to summary
private long getNextConfiguration(ListMultiMap<Object, ITestResult> configurations, ITestResult tr)

Add the time of the configuration method to this test method.

The only problem with this method is that the timing of a test method might not be added to the time of the same configuration method that ran before it but since they should all be equivalent, this should never be an issue.

getTestNameback to summary
protected String getTestName(ITestResult tr)
handleFailureback to summary
private static void handleFailure(JUnitReportReporter.TestTag testTag, Throwable t)
putElementback to summary
private boolean putElement(XMLStringBuffer xsb, String tagName, Properties attributes, boolean hasChildElements)

Put a XML start or empty tag to the XMLStringBuffer depending on hasChildElements parameter

safeSetPropertyback to summary
private void safeSetProperty(Properties p, String key, String value)

Set property if value is non-null

sortback to summary
private static Collection<ITestResult> sort(Set<ITestResult> results)
org.testng.reporters back to summary

private Class JUnitReportReporter.TestTag

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv String
pack-priv String
pack-priv Properties
pack-priv String
pack-priv String
pack-priv String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

childTagback to summary
pack-priv String childTag
messageback to summary
pack-priv String message
propertiesback to summary
pack-priv Properties properties
stackTraceback to summary
pack-priv String stackTrace
sysOutback to summary
pack-priv String sysOut
typeback to summary
pack-priv String type

Constructor Detail

TestTagback to summary
private TestTag()