Package org.apache.maven.surefire.report
Class SimpleReportEntry
java.lang.Object
org.apache.maven.surefire.report.SimpleReportEntry
- All Implemented Interfaces:
ReportEntry
,TestSetReportEntry
- Direct Known Subclasses:
CategorizedReportEntry
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionSimpleReportEntry
(String source, String sourceText, String name, String nameText) SimpleReportEntry
(String source, String sourceText, String name, String nameText, Map<String, String> systemProperties) private
SimpleReportEntry
(String source, String sourceText, String name, String nameText, StackTraceWriter stackTraceWriter) SimpleReportEntry
(String source, String sourceText, String name, String nameText, StackTraceWriter stackTraceWriter, Integer elapsed) SimpleReportEntry
(String source, String sourceText, String name, String nameText, StackTraceWriter stackTraceWriter, Integer elapsed, String message, Map<String, String> systemProperties) SimpleReportEntry
(String source, String sourceText, String name, String nameText, StackTraceWriter stackTraceWriter, Integer elapsed, Map<String, String> systemProperties) -
Method Summary
Modifier and TypeMethodDescriptionstatic SimpleReportEntry
boolean
Gets the runtime for the item.int
getElapsed
(int fallback) Returns same value asReportEntry.getElapsed()
and fallbacks tofallback
for null elapsed timed.getGroup()
The group/category of the testcaseA message relating to a non-successful termination.getName()
The name of the test caseHuman readabletest case
.A source name of the test case together with the group or category (if any exists).A source text of the test case together with the group or category (if any exists).The class name of the testHuman readabletest class
.The group/category of the testcaseint
hashCode()
static SimpleReportEntry
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private static String
safeGetMessage
(StackTraceWriter stackTraceWriter) toString()
static SimpleReportEntry
withException
(String source, String sourceText, String name, String nameText, StackTraceWriter stackTraceWriter)
-
Field Details
-
systemProperties
-
source
-
sourceText
-
name
-
nameText
-
stackTraceWriter
-
elapsed
-
message
-
-
Constructor Details
-
SimpleReportEntry
-
SimpleReportEntry
-
SimpleReportEntry
private SimpleReportEntry(String source, String sourceText, String name, String nameText, StackTraceWriter stackTraceWriter) -
SimpleReportEntry
-
SimpleReportEntry
-
SimpleReportEntry
-
SimpleReportEntry
-
SimpleReportEntry
-
-
Method Details
-
assumption
-
ignored
-
withException
public static SimpleReportEntry withException(String source, String sourceText, String name, String nameText, StackTraceWriter stackTraceWriter) -
safeGetMessage
-
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
Description copied from interface:ReportEntry
Human readabletest class
.- Specified by:
getSourceText
in interfaceReportEntry
- Returns:
- source text
-
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
Description copied from interface:ReportEntry
Human readabletest case
.- Specified by:
getNameText
in interfaceReportEntry
- Returns:
- name text
-
getGroup
Description copied from interface:ReportEntry
The group/category of the testcase- Specified by:
getGroup
in interfaceReportEntry
- Returns:
- A string
-
getStackTraceWriter
Description copied from interface:ReportEntry
The group/category of the testcase- Specified by:
getStackTraceWriter
in interfaceReportEntry
- Returns:
- A string
-
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
-
toString
-
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
-
equals
-
hashCode
public int hashCode() -
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
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
- Specified by:
getSystemProperties
in interfaceTestSetReportEntry
-
isElapsedTimeEqual
-
isNameTextEqual
-
isNameEqual
-
isSourceEqual
-
isSourceTextEqual
-
isStackEqual
-
isSystemPropertiesEqual
-
isMessageEqual
-