Represents a detailed result of the execution of a particular test.

See also TestRunResult

no subtypes hierarchy

Initializer
TestResult(TestDescription description, TestState state, Boolean combined = false, Throwable? exception = null, Integer elapsedTime = 0)
Parameters:
  • description

    The test this is the result for.

  • state

    The result state of this test.

  • combined = false

    The flag if this is result of one test, or combined result from multiple tests (eg. result for test class).

  • exception = null

    The exception thrown during this test, if any.

  • elapsedTime = 0

    The total elapsed time in milliseconds.

Attributes
combinedshared Boolean combined

The flag if this is result of one test, or combined result from multiple tests (eg. result for test class).

descriptionshared TestDescription description

The test this is the result for.

elapsedTimeshared Integer elapsedTime

The total elapsed time in milliseconds.

exceptionshared Throwable? exception

The exception thrown during this test, if any.

stateshared TestState state

The result state of this test.

stringshared actual String string

A developer-friendly string representing the instance. Concatenates the name of the concrete class of the instance with the hash of the instance. Subclasses are encouraged to refine this implementation to produce a more meaningful representation.

Refines Object.string
Inherited Attributes
Attributes inherited from: Object
hash, string
Inherited Methods
Methods inherited from: Object
equals