# Class TestExecutionException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.gradle.tooling.GradleConnectionException
org.gradle.tooling.TestExecutionException

All Implemented Interfaces:
  `Serializable`

public class TestExecutionException extends GradleConnectionException
Thrown when the `TestLauncher` cannot run tests, or when one or more tests fail.

Since:
  2.6
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TestExecutionException(String message)`
  Creates a new `TestExecutionException`.
  `TestExecutionException(String message, Throwable throwable)`
  Creates a new `TestExecutionException`.
  `TestExecutionException(String message, Throwable throwable, Supplier<List<Failure>> failures)`
  Constructor.

- ## Method Summary

  ### Methods inherited from class GradleConnectionException

  `getFailures`

  ### Methods inherited from class Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### TestExecutionException

    public TestExecutionException(String message, Throwable throwable)
    Creates a new `TestExecutionException`.
    Since:
      2.6

  - ### TestExecutionException

    @Incubating public TestExecutionException(String message, Throwable throwable, Supplier<List<Failure>> failures)
    Constructor.
    Since:
      8.12

  - ### TestExecutionException

    public TestExecutionException(String message)
    Creates a new `TestExecutionException`.
    Since:
      2.6