Package testUtils
Record Class TestResultsRecords.TestResult
java.lang.Object
java.lang.Record
testUtils.TestResultsRecords.TestResult
- Enclosing class:
TestResultsRecords
public static record TestResultsRecords.TestResult(String outcome, String comment, Long durationInMs, String errorMessage, List<TestResultsRecords.TestIterationResult> iterationDetails)
extends Record
Represents the complete test result for a test case.
-
Constructor Summary
ConstructorsConstructorDescriptionTestResult(String outcome, String comment, Long durationInMs, String errorMessage) Constructor for single test execution (no iterations).TestResult(String outcome, String comment, Long durationInMs, String errorMessage, List<TestResultsRecords.TestIterationResult> iterationDetails) Creates an instance of aTestResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncomment()Returns the value of thecommentrecord component.Returns the value of thedurationInMsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorMessagerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theiterationDetailsrecord component.outcome()Returns the value of theoutcomerecord component.final StringtoString()Returns a string representation of this record class.withIterationResult(TestResultsRecords.TestIterationResult iterationResult) Creates a new TestResult with an additional iteration.
-
Constructor Details
-
TestResult
Constructor for single test execution (no iterations). -
TestResult
public TestResult(String outcome, String comment, Long durationInMs, String errorMessage, List<TestResultsRecords.TestIterationResult> iterationDetails) Creates an instance of aTestResultrecord class.- Parameters:
outcome- the value for theoutcomerecord componentcomment- the value for thecommentrecord componentdurationInMs- the value for thedurationInMsrecord componenterrorMessage- the value for theerrorMessagerecord componentiterationDetails- the value for theiterationDetailsrecord component
-
-
Method Details
-
withIterationResult
public TestResultsRecords.TestResult withIterationResult(TestResultsRecords.TestIterationResult iterationResult) Creates a new TestResult with an additional iteration. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
outcome
Returns the value of theoutcomerecord component.- Returns:
- the value of the
outcomerecord component
-
comment
Returns the value of thecommentrecord component.- Returns:
- the value of the
commentrecord component
-
durationInMs
Returns the value of thedurationInMsrecord component.- Returns:
- the value of the
durationInMsrecord component
-
errorMessage
Returns the value of theerrorMessagerecord component.- Returns:
- the value of the
errorMessagerecord component
-
iterationDetails
Returns the value of theiterationDetailsrecord component.- Returns:
- the value of the
iterationDetailsrecord component
-