Record Class ReportTest

java.lang.Object
java.lang.Record
org.apache.juneau.terminal.report.ReportTest
Record Components:
suite - The suite name (a class name or a file path).
name - The test name.
status - The test status.
ms - The duration in milliseconds, or null.
msg - The failure message, or null.
trace - The stack trace, or null.

public record ReportTest(String suite, String name, TerminalEvent.TestStatus status, Long ms, String msg, String trace) extends Record
One test recovered from a report.

A reader cannot build a TerminalEvent directly because a test event needs a step id, which the caller supplies later through ReportResult.toEvents(String).

  • Constructor Details

    • ReportTest

      public ReportTest(String suite, String name, TerminalEvent.TestStatus status, Long ms, String msg, String trace)
      Creates an instance of a ReportTest record class.
      Parameters:
      suite - the value for the suite record component
      name - the value for the name record component
      status - the value for the status record component
      ms - the value for the ms record component
      msg - the value for the msg record component
      trace - the value for the trace record component
  • Method Details

    • 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.
    • suite

      public String suite()
      Returns the value of the suite record component.
      Returns:
      the value of the suite record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • status

      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • ms

      public Long ms()
      Returns the value of the ms record component.
      Returns:
      the value of the ms record component
    • msg

      public String msg()
      Returns the value of the msg record component.
      Returns:
      the value of the msg record component
    • trace

      public String trace()
      Returns the value of the trace record component.
      Returns:
      the value of the trace record component