Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.gradle.api.tasks.testing
[Java] Interface TestResult

    public interface TestResult

Describes a test result.

Nested Class Summary
`enum` | `TestResult.ResultType` The final status of a test.

Method Summary
`long` | `getEndTime()` Returns the time when this test completed execution.
`Throwable` | `getException()` If the test failed with an exception, this will be the exception.
`List` | `getExceptions()` If the test failed with any exceptions, this will contain the exceptions.
`long` | `getFailedTestCount()` Returns the number of failed atomic tests executed for this test.
`TestResult.ResultType` | `getResultType()` Describes a test result.
`long` | `getSkippedTestCount()` Returns the number of skipped atomic tests executed for this test.
`long` | `getStartTime()` Returns the time when this test started execution.
`long` | `getSuccessfulTestCount()` Returns the number of successful atomic tests executed for this test.
`long` | `getTestCount()` Returns the total number of atomic tests executed for this test.

Method Detail

### getEndTime

    public long getEndTime()

  Returns the time when this test completed execution.
  Returns:
    The end t ime, in milliseconds since the epoch.

### getException

    public Throwable getException()

  If the test failed with an exception, this will be the exception. Some test frameworks do not fail without an exception (JUnit), so in those cases this method will never return null.
  Returns:
    The exception, if any, logged for this test. If none, a null is returned.

### getExceptions

    public List getExceptions()

  If the test failed with any exceptions, this will contain the exceptions. Some test frameworks do not fail without an exception (JUnit), so in those cases this method will never return null.
  Returns:
    The exceptions, if any, logged for this test. If none, an empty list is returned.

### getFailedTestCount

    public long getFailedTestCount()

  Returns the number of failed atomic tests executed for this test.
  Returns:
    The number of tests, possibly 0

### getResultType

    public TestResult.ResultType getResultType()

  Describes a test result.

### getSkippedTestCount

    public long getSkippedTestCount()

  Returns the number of skipped atomic tests executed for this test.
  Returns:
    The number of tests, possibly 0

### getStartTime

    public long getStartTime()

  Returns the time when this test started execution.
  Returns:
    The start time, in milliseconds since the epoch.

### getSuccessfulTestCount

    public long getSuccessfulTestCount()

  Returns the number of successful atomic tests executed for this test.
  Returns:
    The number of tests, possibly 0

### getTestCount

    public long getTestCount()

  Returns the total number of atomic tests executed for this test. This will return 1 if this test is itself an atomic test.
  Returns:
    The number of tests, possibly 0

Gradle API 1.10