Package org.eclipse.unittest.model

## Interface ITestElement

All Known Subinterfaces:
  `ITestCaseElement`, `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.

Restriction:
  This interface is not intended to be implemented by clients.
Restriction:
  This interface is not intended to be extended by clients.

### Nested Class Summary

Nested Classes
`static class` `ITestElement.FailureTrace` A failure trace of a test.
`static class` `ITestElement.Result` Result states of a test.

### Method Summary

All Methods Instance Methods Abstract Methods
`String` `getData()` Returns some runner-specific data, such as complete test description or other data allowing further operations not covered by the generic test model.
`String` `getDisplayName()` Returns the display name of the test.
`Duration` `getDuration()` Returns the estimated total time elapsed while executing this test element.
`ITestElement.FailureTrace` `getFailureTrace()` Returns the failure trace of this test element or `null` if the test has not resulted in an error or failure.
`String` `getId()` Returns an identifier of the test element
`ITestSuiteElement` `getParent()` Returns parent test suite element of this test element
`String` `getTestName()` Returns the name of the test element
`ITestRunSession` `getTestRunSession()` Returns the test run session.

### Method Detail

#### getId

    String getId()

Returns an identifier of the test element

Returns:
  a test element identifier

#### getData

    String getData()

Returns some runner-specific data, such as complete test description or other data allowing further operations not covered by the generic test model.

Returns:
  some runner-specific data, such as complete test description or other data allowing further operations not covered by the generic test model.

#### getTestRunSession

    ITestRunSession getTestRunSession()

Returns the test run session.

Returns:
  the parent test run session.

#### getDuration

    Duration getDuration()

Returns the estimated total time elapsed while executing this test element. The total time for a test suite includes the time used for all tests in that suite. The total time for a test session includes the time used for all tests in that session.

Note: The elapsed time is only valid for `ProgressState.COMPLETED` test elements.

Returns:
  total execution duration for the test element, or `null` if the state of the element is not `ProgressState.COMPLETED`

#### getFailureTrace

    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`.

#### getParent

    ITestSuiteElement getParent()

Returns parent test suite element of this test element

Returns:
  a parent test suite element

#### getTestName

    String getTestName()

Returns the name of the test element

Returns:
  a name of test element

#### getDisplayName

    String getDisplayName()

Returns the display name of the test. Can be `null`. In that case, use `getTestName()`.

Returns:
  the test display name, can be `null`