Class WrappedReportEntry
- java.lang.Object
-
- org.apache.maven.plugin.surefire.report.WrappedReportEntry
-
- All Implemented Interfaces:
ReportEntry
,TestSetReportEntry
public class WrappedReportEntry extends java.lang.Object implements TestSetReportEntry
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Integer
elapsed
private ReportEntry
original
private ReportEntryType
reportEntryType
private Utf8RecodingDeferredFileOutputStream
stdErr
private Utf8RecodingDeferredFileOutputStream
stdout
private java.util.Map<java.lang.String,java.lang.String>
systemProperties
-
Constructor Summary
Constructors Constructor Description WrappedReportEntry(ReportEntry original, ReportEntryType reportEntryType, java.lang.Integer estimatedElapsed, Utf8RecodingDeferredFileOutputStream stdout, Utf8RecodingDeferredFileOutputStream stdErr)
WrappedReportEntry(ReportEntry original, ReportEntryType reportEntryType, java.lang.Integer estimatedElapsed, Utf8RecodingDeferredFileOutputStream stdout, Utf8RecodingDeferredFileOutputStream stdErr, java.util.Map<java.lang.String,java.lang.String> systemProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
elapsedTimeAsString()
java.lang.String
getClassMethodName()
java.lang.Integer
getElapsed()
Gets the runtime for the item.int
getElapsed(int fallback)
Returns same value asReportEntry.getElapsed()
and fallbacks tofallback
for null elapsed timed.java.lang.String
getElapsedTimeSummary()
java.lang.String
getElapsedTimeVerbose()
java.lang.String
getGroup()
The group/category of the testcasejava.lang.String
getMessage()
A message relating to a non-successful termination.java.lang.String
getName()
The name of the test casejava.lang.String
getNameText()
Human readabletest case
.java.lang.String
getNameWithGroup()
A source name of the test case together with the group or category (if any exists).java.lang.String
getOutput(boolean trimStackTrace)
ReportEntryType
getReportEntryType()
(package private) java.lang.String
getReportName()
java.lang.String
getReportNameWithGroup()
A source text of the test case together with the group or category (if any exists).(package private) java.lang.String
getReportSourceName()
(package private) java.lang.String
getReportSourceName(java.lang.String suffix)
java.lang.String
getSourceName()
The class name of the test(package private) java.lang.String
getSourceName(java.lang.String suffix)
java.lang.String
getSourceText()
Human readabletest class
.java.lang.String
getStackTrace(boolean trimStackTrace)
StackTraceWriter
getStackTraceWriter()
The group/category of the testcaseUtf8RecodingDeferredFileOutputStream
getStdErr()
Utf8RecodingDeferredFileOutputStream
getStdout()
java.util.Map<java.lang.String,java.lang.String>
getSystemProperties()
boolean
isErrorOrFailure()
boolean
isSkipped()
boolean
isSucceeded()
-
-
-
Field Detail
-
original
private final ReportEntry original
-
reportEntryType
private final ReportEntryType reportEntryType
-
elapsed
private final java.lang.Integer elapsed
-
stdout
private final Utf8RecodingDeferredFileOutputStream stdout
-
stdErr
private final Utf8RecodingDeferredFileOutputStream stdErr
-
systemProperties
private final java.util.Map<java.lang.String,java.lang.String> systemProperties
-
-
Constructor Detail
-
WrappedReportEntry
public WrappedReportEntry(ReportEntry original, ReportEntryType reportEntryType, java.lang.Integer estimatedElapsed, Utf8RecodingDeferredFileOutputStream stdout, Utf8RecodingDeferredFileOutputStream stdErr, java.util.Map<java.lang.String,java.lang.String> systemProperties)
-
WrappedReportEntry
public WrappedReportEntry(ReportEntry original, ReportEntryType reportEntryType, java.lang.Integer estimatedElapsed, Utf8RecodingDeferredFileOutputStream stdout, Utf8RecodingDeferredFileOutputStream stdErr)
-
-
Method Detail
-
getElapsed
public java.lang.Integer getElapsed()
Description copied from interface:ReportEntry
Gets the runtime for the item. Optional parameter. If the value is not set, it will be determined within the reporting subsystem. Some providers like to calculate this value themselves, and it gets the most accurate value.- Specified by:
getElapsed
in interfaceReportEntry
- Returns:
- duration of a test in milli seconds
-
getElapsed
public int getElapsed(int fallback)
Description copied from interface:ReportEntry
Returns same value asReportEntry.getElapsed()
and fallbacks tofallback
for null elapsed timed.- Specified by:
getElapsed
in interfaceReportEntry
- Parameters:
fallback
- usually 0- Returns:
- elapsed time if
ReportEntry.getElapsed()
is not null; otherwise returnsfallback
-
getReportEntryType
public ReportEntryType getReportEntryType()
-
getStdout
public Utf8RecodingDeferredFileOutputStream getStdout()
-
getStdErr
public Utf8RecodingDeferredFileOutputStream getStdErr()
-
getSourceName
public java.lang.String getSourceName()
Description copied from interface:ReportEntry
The class name of the test- Specified by:
getSourceName
in interfaceReportEntry
- Returns:
- A string with the class name
-
getSourceText
public java.lang.String getSourceText()
Description copied from interface:ReportEntry
Human readabletest class
.- Specified by:
getSourceText
in interfaceReportEntry
- Returns:
- source text
-
getName
public java.lang.String getName()
Description copied from interface:ReportEntry
The name of the test case- Specified by:
getName
in interfaceReportEntry
- Returns:
- A string describing the test case
-
getNameText
public java.lang.String getNameText()
Description copied from interface:ReportEntry
Human readabletest case
.- Specified by:
getNameText
in interfaceReportEntry
- Returns:
- name text
-
getClassMethodName
public java.lang.String getClassMethodName()
-
getGroup
public java.lang.String getGroup()
Description copied from interface:ReportEntry
The group/category of the testcase- Specified by:
getGroup
in interfaceReportEntry
- Returns:
- A string
-
getStackTraceWriter
public StackTraceWriter getStackTraceWriter()
Description copied from interface:ReportEntry
The group/category of the testcase- Specified by:
getStackTraceWriter
in interfaceReportEntry
- Returns:
- A string
-
getMessage
public java.lang.String getMessage()
Description copied from interface:ReportEntry
A message relating to a non-successful termination. May be the "message" from an exception or the reason for a test being ignored- Specified by:
getMessage
in interfaceReportEntry
- Returns:
- A string that explains an anomaly
-
getStackTrace
public java.lang.String getStackTrace(boolean trimStackTrace)
-
elapsedTimeAsString
public java.lang.String elapsedTimeAsString()
-
getReportSourceName
java.lang.String getReportSourceName()
-
getReportSourceName
java.lang.String getReportSourceName(java.lang.String suffix)
-
getSourceName
java.lang.String getSourceName(java.lang.String suffix)
-
getReportName
java.lang.String getReportName()
-
getOutput
public java.lang.String getOutput(boolean trimStackTrace)
-
getElapsedTimeVerbose
public java.lang.String getElapsedTimeVerbose()
-
getElapsedTimeSummary
public java.lang.String getElapsedTimeSummary()
-
isErrorOrFailure
public boolean isErrorOrFailure()
-
isSkipped
public boolean isSkipped()
-
isSucceeded
public boolean isSucceeded()
-
getNameWithGroup
public java.lang.String getNameWithGroup()
Description copied from interface:ReportEntry
A source name of the test case together with the group or category (if any exists).- Specified by:
getNameWithGroup
in interfaceReportEntry
- Returns:
- A string with the test case name and group/category, or just the name.
-
getReportNameWithGroup
public java.lang.String getReportNameWithGroup()
Description copied from interface:ReportEntry
A source text of the test case together with the group or category (if any exists).- Specified by:
getReportNameWithGroup
in interfaceReportEntry
- Returns:
- A string with the test case text and group/category, or just the source text.
-
getSystemProperties
public java.util.Map<java.lang.String,java.lang.String> getSystemProperties()
- Specified by:
getSystemProperties
in interfaceTestSetReportEntry
-
-