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
Modifier and TypeInterfaceDescriptionstatic final class
A failure trace of a test.static enum
Result states of a test. -
Method Summary
Modifier and TypeMethodDescriptiongetData()
Returns some runner-specific data, such as complete test description or other data allowing further operations not covered by the generic test model.Returns the display name of the test.Returns the estimated total time elapsed while executing this test element.Returns the failure trace of this test element ornull
if the test has not resulted in an error or failure.getId()
Returns an identifier of the test elementReturns parent test suite element of this test elementReturns the name of the test elementReturns the test run session.
-
Method Details
-
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 notProgressState.COMPLETED
-
getFailureTrace
ITestElement.FailureTrace getFailureTrace()Returns the failure trace of this test element ornull
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 benull
. In that case, usegetTestName()
.- Returns:
- the test display name, can be
null
-