Interface ITestRunSession

  • All Superinterfaces:
    ITestElement, ITestSuiteElement

    public interface ITestRunSession
    extends 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.
    • Method Detail

      • getLaunch

        ILaunch getLaunch()
        Returns the ILaunch from which this test run session has been started, or null if not available.
        Returns:
        the ILaunch object instance, or null is not available.
      • getTestElement

        ITestElement getTestElement​(java.lang.String id)
        Returns a test element by its identifier
        Parameters:
        id - a test element identifier
        Returns:
        a ITestElement found or null
      • newTestCase

        ITestCaseElement newTestCase​(java.lang.String testId,
                                     java.lang.String testName,
                                     ITestSuiteElement parent,
                                     java.lang.String displayName,
                                     java.lang.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
      • newTestSuite

        ITestSuiteElement newTestSuite​(java.lang.String testId,
                                       java.lang.String testName,
                                       java.lang.Integer testCount,
                                       ITestSuiteElement parent,
                                       java.lang.String displayName,
                                       java.lang.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, null if unknown.
        parent - the parent
        displayName - the display name of the test
        data - runner specific data
        Returns:
        the new test case element
      • notifyTestSessionAborted

        void notifyTestSessionAborted​(java.time.Duration duration,
                                      java.lang.Exception cause)
        Notifies 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:
        notifyTestRunAborted to use for normal completion.
      • notifyTestEnded

        void notifyTestEnded​(ITestElement test,
                             boolean isIgnored)
        Notifies on an individual test ended.
        Parameters:
        test - a unique Id identifying the test
        isIgnored - true indicates that the specified test was ignored, otherwise - false
      • notifyTestStarted

        void notifyTestStarted​(ITestElement test)
        Notifies on an individual test started.
        Parameters:
        test - the test
      • notifyTestSessionStarted

        void notifyTestSessionStarted​(java.lang.Integer count)
        Notifies on a test run started.
        Parameters:
        count - the number of individual tests that will be run, null if unknown
      • notifyTestFailed

        void notifyTestFailed​(ITestElement test,
                              ITestElement.Result status,
                              boolean isAssumptionFailed,
                              ITestElement.FailureTrace failureTrace)
                       throws java.lang.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.ERROR or ITestElement.Result.FAILURE. An exception is thrown otherwise
        isAssumptionFailed - indicates that an assumption is failed
        failureTrace - The failure trace
        Throws:
        java.lang.IllegalArgumentException - if status doesn't indicate ERROR or FAILURE.