Package org.gradle.api.tasks.testing

## Interface TestFailureDetails

-     @Incubating
      public interface TestFailureDetails

  Contains serializable structural information about a test failure.
  Since:
    7.6

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `getActual()` | Returns a string representation of the actual value for an assertion failure.
    `java.lang.String` | `getClassName()` | The fully-qualified name of the underlying exception type.
    `java.lang.String` | `getExpected()` | Returns a string representation of the expected value for an assertion failure.
    `java.lang.String` | `getMessage()` | Returns the failure message.
    `java.lang.String` | `getStacktrace()` | Returns the stacktrace of the failure.
    `boolean` | `isAssertionFailure()` | Returns true if the represented failure is recognized as an assertion failure.

- - ### Method Detail

    - #### getMessage

          @Nullable
          java.lang.String getMessage()

      Returns the failure message.
      Returns:
        the failure message

    - #### getClassName

          java.lang.String getClassName()

      The fully-qualified name of the underlying exception type.
      Returns:
        the class name

    - #### getStacktrace

          java.lang.String getStacktrace()

      Returns the stacktrace of the failure.

      The instances are created on the test worker side allowing the clients not to deal with non-serializable exceptions.

      Returns:
        the stacktrace string

    - #### isAssertionFailure

          boolean isAssertionFailure()

      Returns true if the represented failure is recognized as an assertion failure.
      Returns:
        `true` for assertion failures

    - #### getExpected

          @Nullable
          java.lang.String getExpected()

      Returns a string representation of the expected value for an assertion failure.

      If the current instance does not represent an assertion failure, or the test failure doesn't provide any information about expected and actual values then the method returns `null`.

      Returns:
        The expected value

    - #### getActual

          @Nullable
          java.lang.String getActual()

      Returns a string representation of the actual value for an assertion failure.

      If the current instance does not represent an assertion failure, or the test failure doesn't provide any information about expected and actual values then the method returns `null`.

      Returns:
        The actual value value