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.Integerelapsedprivate ReportEntryoriginalprivate ReportEntryTypereportEntryTypeprivate Utf8RecodingDeferredFileOutputStreamstdErrprivate Utf8RecodingDeferredFileOutputStreamstdoutprivate 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.StringelapsedTimeAsString()java.lang.StringgetClassMethodName()java.lang.IntegergetElapsed()Gets the runtime for the item.intgetElapsed(int fallback)Returns same value asReportEntry.getElapsed()and fallbacks tofallbackfor null elapsed timed.java.lang.StringgetElapsedTimeSummary()java.lang.StringgetElapsedTimeVerbose()java.lang.StringgetGroup()The group/category of the testcasejava.lang.StringgetMessage()A message relating to a non-successful termination.java.lang.StringgetName()The name of the test casejava.lang.StringgetNameText()Human readabletest case.java.lang.StringgetNameWithGroup()A source name of the test case together with the group or category (if any exists).java.lang.StringgetOutput(boolean trimStackTrace)ReportEntryTypegetReportEntryType()(package private) java.lang.StringgetReportName()java.lang.StringgetReportNameWithGroup()A source text of the test case together with the group or category (if any exists).(package private) java.lang.StringgetReportSourceName()(package private) java.lang.StringgetReportSourceName(java.lang.String suffix)java.lang.StringgetSourceName()The class name of the test(package private) java.lang.StringgetSourceName(java.lang.String suffix)java.lang.StringgetSourceText()Human readabletest class.java.lang.StringgetStackTrace(boolean trimStackTrace)StackTraceWritergetStackTraceWriter()The group/category of the testcaseUtf8RecodingDeferredFileOutputStreamgetStdErr()Utf8RecodingDeferredFileOutputStreamgetStdout()java.util.Map<java.lang.String,java.lang.String>getSystemProperties()booleanisErrorOrFailure()booleanisSkipped()booleanisSucceeded()
-
-
-
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:ReportEntryGets 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:
getElapsedin interfaceReportEntry- Returns:
- duration of a test in milli seconds
-
getElapsed
public int getElapsed(int fallback)
Description copied from interface:ReportEntryReturns same value asReportEntry.getElapsed()and fallbacks tofallbackfor null elapsed timed.- Specified by:
getElapsedin 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:ReportEntryThe class name of the test- Specified by:
getSourceNamein interfaceReportEntry- Returns:
- A string with the class name
-
getSourceText
public java.lang.String getSourceText()
Description copied from interface:ReportEntryHuman readabletest class.- Specified by:
getSourceTextin interfaceReportEntry- Returns:
- source text
-
getName
public java.lang.String getName()
Description copied from interface:ReportEntryThe name of the test case- Specified by:
getNamein interfaceReportEntry- Returns:
- A string describing the test case
-
getNameText
public java.lang.String getNameText()
Description copied from interface:ReportEntryHuman readabletest case.- Specified by:
getNameTextin interfaceReportEntry- Returns:
- name text
-
getClassMethodName
public java.lang.String getClassMethodName()
-
getGroup
public java.lang.String getGroup()
Description copied from interface:ReportEntryThe group/category of the testcase- Specified by:
getGroupin interfaceReportEntry- Returns:
- A string
-
getStackTraceWriter
public StackTraceWriter getStackTraceWriter()
Description copied from interface:ReportEntryThe group/category of the testcase- Specified by:
getStackTraceWriterin interfaceReportEntry- Returns:
- A string
-
getMessage
public java.lang.String getMessage()
Description copied from interface:ReportEntryA message relating to a non-successful termination. May be the "message" from an exception or the reason for a test being ignored- Specified by:
getMessagein 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:ReportEntryA source name of the test case together with the group or category (if any exists).- Specified by:
getNameWithGroupin 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:ReportEntryA source text of the test case together with the group or category (if any exists).- Specified by:
getReportNameWithGroupin 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:
getSystemPropertiesin interfaceTestSetReportEntry
-
-