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
-
Restriction:
- This interface is not intended to be implemented by clients.
-
Restriction:
- This interface is not intended to be extended by clients.
getProgressState
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
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
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
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
ITestRunSession getTestRunSession()
- Returns the test run session.
-
-
Returns:
- the parent test run session.
getElapsedTimeInSeconds
double getElapsedTimeInSeconds()
- Returns the estimated total time elapsed in seconds 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
ITestElement.ProgressState.COMPLETED
test elements.
-
-
Returns:
- total execution time for the test element in seconds, or
Double.NaN
if the state of the element is not
ITestElement.ProgressState.COMPLETED
-
Since:
- 3.4
Copyright (c) IBM Corp. and others 2000, 2008. All Rights Reserved.