Package org.eclipse.unittest.model
Interface ITestRunSession
- All Superinterfaces:
- ITestElement,- ITestSuiteElement
Represents a test run session.
 
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 SummaryNested classes/interfaces inherited from interface org.eclipse.unittest.model.ITestElementITestElement.FailureTrace, ITestElement.Result
- 
Method SummaryModifier and TypeMethodDescriptionReturns theILaunchfrom which this test run session has been started, ornullif not available.getTestElement(String id) Returns a test element by its identifiernewTestCase(String testId, String testName, ITestSuiteElement parent, String displayName, String data) Creates a new Test Case and adds it to the modelnewTestSuite(String testId, String testName, Integer testCount, ITestSuiteElement parent, String displayName, String data) Creates a new Test Suite and adds it to the modelvoidnotifyTestEnded(ITestElement test, boolean isIgnored) Notifies on an individual test ended.voidnotifyTestFailed(ITestElement test, ITestElement.Result status, boolean isAssumptionFailed, ITestElement.FailureTrace failureTrace) Notifies on an individual test failed with a stack trace.voidnotifyTestSessionAborted(Duration duration, Exception cause) Notifies on a test run aborted, abnormally.voidnotifyTestSessionCompleted(Duration duration) Notifies on a test run ended normally.voidnotifyTestSessionStarted(Integer count) Notifies on a test run started.voidNotifies on an individual test started.Methods inherited from interface org.eclipse.unittest.model.ITestElementgetData, getDisplayName, getDuration, getFailureTrace, getId, getParent, getTestName, getTestRunSessionMethods inherited from interface org.eclipse.unittest.model.ITestSuiteElementgetChildren
- 
Method Details- 
getLaunchILaunch getLaunch()Returns theILaunchfrom which this test run session has been started, ornullif not available.- Returns:
- the ILaunchobject instance, ornullis not available.
 
- 
getTestElementReturns a test element by its identifier- Parameters:
- id- a test element identifier
- Returns:
- a ITestElementfound ornull
 
- 
newTestCaseITestCaseElement newTestCase(String testId, String testName, ITestSuiteElement parent, String displayName, String data) Creates a new Test Case and adds it to the model- Parameters:
- testId- a unique id for the test
- testName- the name of the test
- parent- the parent, can be- null
- displayName- the display name of the test
- data- runner specific data
- Returns:
- the new test case element
 
- 
newTestSuiteITestSuiteElement newTestSuite(String testId, String testName, Integer testCount, ITestSuiteElement parent, String displayName, String data) Creates a new Test Suite and adds it to the model- Parameters:
- testId- a unique id for the test
- testName- the name of the test
- testCount- the number of tests this suite will run,- nullif unknown.
- parent- the parent
- displayName- the display name of the test
- data- runner specific data
- Returns:
- the new test case element
 
- 
notifyTestSessionCompletedNotifies on a test run ended normally. Individual test success don't matter. If the test session failed to complete for some reason, usenotifyTestSessionAborted(Duration, Exception).- Parameters:
- duration- the total elapsed time of the test run, can be- null.
- See Also:
 
- 
notifyTestSessionAbortedNotifies on a test run aborted, abnormally.- Parameters:
- duration- duration of the test run session until abortion, can be- null.
- cause- the cause of the abortion, can be shown in log or to user, can be- null.
- See Also:
 
- 
notifyTestEndedNotifies on an individual test ended.- Parameters:
- test- a unique Id identifying the test
- isIgnored-- trueindicates that the specified test was ignored, otherwise -- false
 
- 
notifyTestStartedNotifies on an individual test started.- Parameters:
- test- the test
 
- 
notifyTestSessionStartedNotifies on a test run started.- Parameters:
- count- the number of individual tests that will be run,- nullif unknown
 
- 
notifyTestFailedvoid notifyTestFailed(ITestElement test, ITestElement.Result status, boolean isAssumptionFailed, ITestElement.FailureTrace failureTrace) throws IllegalArgumentException Notifies on an individual test failed with a stack trace.- Parameters:
- test- the test
- status- the outcome of the test; one of- ITestElement.Result.ERRORor- ITestElement.Result.FAILURE. An exception is thrown otherwise
- isAssumptionFailed- indicates that an assumption is failed
- failureTrace- The failure trace
- Throws:
- IllegalArgumentException- if status doesn't indicate ERROR or FAILURE.
 
 
-