Eclipse JDT
Release 3.3

org.eclipse.jdt.junit.model
Interface ITestElement

All Known Subinterfaces:
ITestCaseElement, ITestElementContainer, ITestRunSession, ITestSuiteElement

public interface ITestElement

Common protocol for test elements. This set consists of ITestCaseElement , ITestSuiteElement and ITestRunSession

This interface is not intended to be implemented by clients.

Since:
3.3

Nested Class Summary
static class ITestElement.FailureTrace
          A failure trace of a test.
static class ITestElement.ProgressState
          Running states of a test.
static class ITestElement.Result
          Result states of a test.
 
Method Summary
 ITestElement.FailureTrace getFailureTrace()
          Returns the failure trace of this test element or null if the test has not resulted in an error or failure.
 ITestElementContainer getParentContainer()
          Returns the parent test element container or null if the test element is the test run session.
 ITestElement.ProgressState getProgressState()
          Returns the progress state of this test element.
 ITestElement.Result getTestResult(boolean includeChildren)
          Returns the result of the test element.
 ITestRunSession getTestRunSession()
          Returns the test run session.
 

Method Detail

getProgressState

public ITestElement.ProgressState getProgressState()
Returns the progress state of this test element.
  • ITestElement.ProgressState.NOT_STARTED: the test has not yet started
  • ITestElement.ProgressState.RUNNING: the test is currently running
  • ITestElement.ProgressState.STOPPED: the test has stopped before being completed
  • ITestElement.ProgressState.COMPLETED: the test (and all its children) has completed
  • Returns:
    returns one of ITestElement.ProgressState.NOT_STARTED, ITestElement.ProgressState.RUNNING, ITestElement.ProgressState.STOPPED or ITestElement.ProgressState.COMPLETED.

    getTestResult

    public ITestElement.Result getTestResult(boolean includeChildren)
    Returns the result of the test element.
  • ITestElement.Result.UNDEFINED: the result is not yet evaluated
  • ITestElement.Result.OK: the test has succeeded
  • ITestElement.Result.ERROR: the test has returned an error
  • ITestElement.Result.FAILURE: the test has returned an failure
  • ITestElement.Result.IGNORED: the test has been ignored (skipped)
  • Parameters:
    includeChildren - if true, the returned result is the combined result of the test and its children (if it has any). If false, only the test's result is returned.
    Returns:
    returns one of ITestElement.Result.UNDEFINED, ITestElement.Result.OK, ITestElement.Result.ERROR, ITestElement.Result.FAILURE or ITestElement.Result.IGNORED. Clients should also prepare for other, new values.

    getFailureTrace

    public ITestElement.FailureTrace getFailureTrace()
    Returns the failure trace of this test element or null if the test has not resulted in an error or failure.

    Returns:
    the failure trace of this test or null.

    getParentContainer

    public ITestElementContainer getParentContainer()
    Returns the parent test element container or null if the test element is the test run session.

    Returns:
    the parent test suite

    getTestRunSession

    public ITestRunSession getTestRunSession()
    Returns the test run session.

    Returns:
    the parent test run session.

    Eclipse JDT
    Release 3.3

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