Class SimpleReportEntry
java.lang.Object
org.apache.maven.surefire.api.report.SimpleReportEntry
- All Implemented Interfaces:
ReportEntry,TestSetReportEntry
- Direct Known Subclasses:
CategorizedReportEntry
Basic implementation of
TestSetReportEntry (immutable and thread-safe object).- Author:
- Kristian Rosenvold
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleReportEntry(RunMode runMode, Long testRunId, String source, String sourceText, String name, String nameText) SimpleReportEntry(RunMode runMode, Long testRunId, String source, String sourceText, String name, String nameText, Integer elapsed) SimpleReportEntry(RunMode runMode, Long testRunId, String source, String sourceText, String name, String nameText, String message) SimpleReportEntry(RunMode runMode, Long testRunId, String source, String sourceText, String name, String nameText, Map<String, String> systemProperties) SimpleReportEntry(RunMode runMode, Long testRunId, String source, String sourceText, String name, String nameText, StackTraceWriter stackTraceWriter, Integer elapsed) SimpleReportEntry(RunMode runMode, Long testRunId, String source, String sourceText, String name, String nameText, StackTraceWriter stackTraceWriter, Integer elapsed, String message, Map<String, String> systemProperties) SimpleReportEntry(RunMode runMode, Long testRunId, String source, String sourceText, String name, String nameText, StackTraceWriter stackTraceWriter, Integer elapsed, Map<String, String> systemProperties) -
Method Summary
Modifier and TypeMethodDescriptionstatic SimpleReportEntryassumption(RunMode runMode, Long testRunId, String source, String sourceText, String name, String nameText, String message) booleanGets the runtime for the item.intgetElapsed(int fallback) 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).final RunModeRun mode.The class name of the testHuman readabletest class.The group/category of the testcasefinal LongThis represents a reference pointing to a literal representation of test description or literal unique id.inthashCode()static SimpleReportEntryignored(RunMode runMode, Long testRunId, String source, String sourceText, String name, String nameText, String message) toString()static SimpleReportEntrywithException(RunMode runMode, Long testRunId, String source, String sourceText, String name, String nameText, StackTraceWriter stackTraceWriter)
-
Constructor Details
-
SimpleReportEntry
-
SimpleReportEntry
-
SimpleReportEntry
-
SimpleReportEntry
-
SimpleReportEntry
-
SimpleReportEntry
-
SimpleReportEntry
-
-
Method Details
-
assumption
-
ignored
-
withException
public static SimpleReportEntry withException(RunMode runMode, Long testRunId, String source, String sourceText, String name, String nameText, StackTraceWriter stackTraceWriter) -
getSourceName
Description copied from interface:ReportEntryThe class name of the test- Specified by:
getSourceNamein interfaceReportEntry- Returns:
- A string with the class name
-
getSourceText
Description copied from interface:ReportEntryHuman readabletest class.- Specified by:
getSourceTextin interfaceReportEntry- Returns:
- source text
-
getName
Description copied from interface:ReportEntryThe name of the test case- Specified by:
getNamein interfaceReportEntry- Returns:
- A string describing the test case
-
getNameText
Description copied from interface:ReportEntryHuman readabletest case.- Specified by:
getNameTextin interfaceReportEntry- Returns:
- name text
-
getGroup
Description copied from interface:ReportEntryThe group/category of the testcase- Specified by:
getGroupin interfaceReportEntry- Returns:
- A string
-
getStackTraceWriter
Description copied from interface:ReportEntryThe group/category of the testcase- Specified by:
getStackTraceWriterin interfaceReportEntry- Returns:
- stack trace object
-
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 milliseconds
-
getElapsed
public int getElapsed(int fallback) Description copied from interface:ReportEntry- Specified by:
getElapsedin interfaceReportEntry- Parameters:
fallback- usually 0- Returns:
- elapsed time if
ReportEntry.getElapsed()is not null; otherwise returnsfallback
-
toString
-
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
-
equals
-
hashCode
public int hashCode() -
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
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. If no source text is provided, then this will return null.
-
getRunMode
Description copied from interface:ReportEntryRun mode.- Specified by:
getRunModein interfaceReportEntry- Returns:
- a normal run, or re-run.
-
getTestRunId
Description copied from interface:ReportEntryThis represents a reference pointing to a literal representation of test description or literal unique id.- Specified by:
getTestRunIdin interfaceReportEntry- Returns:
- id
-
getSystemProperties
- Specified by:
getSystemPropertiesin interfaceTestSetReportEntry
-