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 aTestResult
record class. -
Method Summary
Modifier and TypeMethodDescriptioncomment()
Returns the value of thecomment
record component.Returns the value of thedurationInMs
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theerrorMessage
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of theiterationDetails
record component.outcome()
Returns the value of theoutcome
record component.final String
toString()
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 aTestResult
record class.- Parameters:
outcome
- the value for theoutcome
record componentcomment
- the value for thecomment
record componentdurationInMs
- the value for thedurationInMs
record componenterrorMessage
- the value for theerrorMessage
record componentiterationDetails
- the value for theiterationDetails
record 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 theoutcome
record component.- Returns:
- the value of the
outcome
record component
-
comment
Returns the value of thecomment
record component.- Returns:
- the value of the
comment
record component
-
durationInMs
Returns the value of thedurationInMs
record component.- Returns:
- the value of the
durationInMs
record component
-
errorMessage
Returns the value of theerrorMessage
record component.- Returns:
- the value of the
errorMessage
record component
-
iterationDetails
Returns the value of theiterationDetails
record component.- Returns:
- the value of the
iterationDetails
record component
-