Package org.uncommons.reportng
Class ReportMetadata
- java.lang.Object
-
- org.uncommons.reportng.ReportMetadata
-
public final class ReportMetadata extends java.lang.ObjectProvides access to static information useful when generating a report.
-
-
Constructor Summary
Constructors Constructor Description ReportMetadata()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowSkippedTestsInXML()If the XML dialect has been set to "junit", we will render all skipped tests as failed tests in the XML.java.lang.StringgetCoverageLink()java.lang.StringgetJavaInfo()static java.util.LocalegetLocale()java.lang.StringgetPlatform()java.lang.StringgetReportDate()java.lang.StringgetReportTime()java.lang.StringgetReportTitle()java.io.FilegetStylesheetPath()If a custom CSS file has been specified, returns the path.java.lang.StringgetUser()booleanshouldEscapeOutput()Returns true (the default) if log text should be escaped when displayed in a report.booleanshouldShowExpectedExceptions()Returns false (the default) if stack traces should not be shown for expected exceptions.
-
-
-
Method Detail
-
getReportDate
public java.lang.String getReportDate()
- Returns:
- A String representation of the report date.
- See Also:
getReportTime()
-
getReportTime
public java.lang.String getReportTime()
- Returns:
- A String representation of the report time.
- See Also:
getReportDate()
-
getReportTitle
public java.lang.String getReportTitle()
-
getCoverageLink
public java.lang.String getCoverageLink()
- Returns:
- The URL (absolute or relative) of an HTML coverage report associated with the name run. Null if there is no coverage report.
-
getStylesheetPath
public java.io.File getStylesheetPath()
If a custom CSS file has been specified, returns the path. Otherwise returns null.- Returns:
- A
Filepointing to the stylesheet, or null if no stylesheet is specified.
-
shouldShowExpectedExceptions
public boolean shouldShowExpectedExceptions()
Returns false (the default) if stack traces should not be shown for expected exceptions.- Returns:
- True if stack traces should be shown even for expected exceptions, false otherwise.
-
shouldEscapeOutput
public boolean shouldEscapeOutput()
Returns true (the default) if log text should be escaped when displayed in a report. Turning off escaping allows you to do something link inserting link tags into HTML reports, but it also means that other output could accidentally corrupt the mark-up.- Returns:
- True if reporter log output should be escaped when displayed in a report, false otherwise.
-
allowSkippedTestsInXML
public boolean allowSkippedTestsInXML()
If the XML dialect has been set to "junit", we will render all skipped tests as failed tests in the XML. Otherwise we use TestNG's extended version of the XML format that allows for<skipped>
elements.- Returns:
- True all skipped tests would be reden
-
getUser
public java.lang.String getUser() throws java.net.UnknownHostException- Returns:
- The user account used to run the tests and the host name of the name machine.
- Throws:
java.net.UnknownHostException- If there is a problem accessing the machine's host name.
-
getJavaInfo
public java.lang.String getJavaInfo()
-
getPlatform
public java.lang.String getPlatform()
-
getLocale
public static java.util.Locale getLocale()
- Returns:
- The locale specified by the System properties, or the platform default locale if none is specified.
-
-