Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse JDT Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.jdt.junit
Interface ITestRunListener

public interface ITestRunListener

A listener interface for observing the execution of a test run.

Clients contributing to the `org.eclipse.jdt.junit.testRunListener` extension point implement this interface.

Since:
  2.1

Field Summary
`static int` | `STATUS_ERROR` Status constant indicating that a test had an error an unanticipated exception (constant value 1).
`static int` | `STATUS_FAILURE` Status constant indicating that a test failed an assertion (constant value 2).
`static int` | `STATUS_OK` Status constant indicating that a test passed (constant value 0).

Method Summary
`void` | `testEnded(String testId, String testName)` An individual test has ended.
`void` | `testFailed(int status, String testId, String testName, String trace)` An individual test has failed with a stack trace.
`void` | `testReran(String testId, String testClass, String testName, int status, String trace)` An individual test has been rerun.
`void` | `testRunEnded(long elapsedTime)` A test run has ended.
`void` | `testRunStarted(int testCount)` A test run has started.
`void` | `testRunStopped(long elapsedTime)` A test run has been stopped prematurely.
`void` | `testRunTerminated()` The VM instance performing the tests has terminated.
`void` | `testStarted(String testId, String testName)` An individual test has started.

Field Detail

### STATUS_OK

    public static final int STATUS_OK

  Status constant indicating that a test passed (constant value 0).

  See Also:
    `testFailed(int, String, String, String)`, Constant Field Values

### STATUS_ERROR

    public static final int STATUS_ERROR

  Status constant indicating that a test had an error an unanticipated exception (constant value 1).

  See Also:
    `testFailed(int, String, String, String)`, Constant Field Values

### STATUS_FAILURE

    public static final int STATUS_FAILURE

  Status constant indicating that a test failed an assertion (constant value 2).

  See Also:
    `testFailed(int, String, String, String)`, Constant Field Values

Method Detail

### testRunStarted

    public void testRunStarted(int testCount)

  A test run has started.

  Parameters:
    `testCount` - the number of individual tests that will be run

### testRunEnded

    public void testRunEnded(long elapsedTime)

  A test run has ended.

  Parameters:
    `elapsedTime` - the total elapsed time of the test run

### testRunStopped

    public void testRunStopped(long elapsedTime)

  A test run has been stopped prematurely.

  Parameters:
    `elapsedTime` - the time elapsed before the test run was stopped

### testStarted

    public void testStarted(String testId,
                            String testName)

  An individual test has started.

  Parameters:
    `testId` - a unique Id identifying the test
    `testName` - the name of the test that started

### testEnded

    public void testEnded(String testId,
                          String testName)

  An individual test has ended.

  Parameters:
    `testId` - a unique Id identifying the test
    `testName` - the name of the test that ended

### testFailed

    public void testFailed(int status,
                           String testId,
                           String testName,
                           String trace)

  An individual test has failed with a stack trace.

  Parameters:
    `testId` - a unique Id identifying the test
    `testName` - the name of the test that failed
    `status` - the outcome of the test; one of `STATUS_ERROR` or `STATUS_FAILURE`
    `trace` - the stack trace

### testRunTerminated

    public void testRunTerminated()

  The VM instance performing the tests has terminated.

### testReran

    public void testReran(String testId,
                          String testClass,
                          String testName,
                          int status,
                          String trace)

  An individual test has been rerun.

  Parameters:
    `testId` - a unique Id identifying the test
    `testClass` - the name of the test class that was rerun
    `testName` - the name of the test that was rerun
    `status` - the outcome of the test that was rerun; one of `STATUS_OK`, `STATUS_ERROR`, or `STATUS_FAILURE`
    `trace` - the stack trace in the case of abnormal termination, or the empty string if none

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse JDT Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) IBM Corp. and others 2000, 2004. All Rights Reserved.