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 Details

    • TestResult

      public TestResult(String outcome, String comment, Long durationInMs, String errorMessage)
      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 a TestResult record class.
      Parameters:
      outcome - the value for the outcome record component
      comment - the value for the comment record component
      durationInMs - the value for the durationInMs record component
      errorMessage - the value for the errorMessage record component
      iterationDetails - the value for the iterationDetails record component
  • Method Details

    • withIterationResult

      public TestResultsRecords.TestResult withIterationResult(TestResultsRecords.TestIterationResult iterationResult)
      Creates a new TestResult with an additional iteration.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • outcome

      public String outcome()
      Returns the value of the outcome record component.
      Returns:
      the value of the outcome record component
    • comment

      public String comment()
      Returns the value of the comment record component.
      Returns:
      the value of the comment record component
    • durationInMs

      public Long durationInMs()
      Returns the value of the durationInMs record component.
      Returns:
      the value of the durationInMs record component
    • errorMessage

      public String errorMessage()
      Returns the value of the errorMessage record component.
      Returns:
      the value of the errorMessage record component
    • iterationDetails

      public List<TestResultsRecords.TestIterationResult> iterationDetails()
      Returns the value of the iterationDetails record component.
      Returns:
      the value of the iterationDetails record component