Interface ITestSessionRun


public interface ITestSessionRun
This interface serves as the root context for the test session run and is provided to each of the methods that are invoked on the test session adapter implementations.
  • Method Summary

    Modifier and Type
    Method
    Description
    The name of the adapter that was requested to process the test session run.
    The properties defined for the adapter in the tm.properties file.
    The hostname of the server requesting the test session run.
    int
    The TCP port of the server requesting the test session run.
    int
    The ID of the PTC RV&S item which is the test session.
    Get the agent that this test session run is being executed via.
    Get the test server, establishing an underlying API Session using the default API session username and password defined for the adapter in the tm.properties file.
    getTestServer(String username, String password)
    Get the test server, establishing an underlying API Session overriding the default API session username and password defined for the adapter in the tm.properties file.
    Get the thread used for the initialize, execute and uninitialize operations.
    boolean
    Determine if this test session has been cancelled.
    boolean
    An indication that the server TCP port provided is secure or not.
  • Method Details

    • getServerHostname

      String getServerHostname()
      The hostname of the server requesting the test session run.
      Returns:
      The hostname of the server requesting the test session run.
    • getServerPort

      int getServerPort()
      The TCP port of the server requesting the test session run.
      Returns:
      The TCP port of the server requesting the test session run.
    • isServerPortSecure

      boolean isServerPortSecure()
      An indication that the server TCP port provided is secure or not.
      Returns:
      true if the server TCP port provided is secure, false otherwise.
    • getSessionID

      int getSessionID()
      The ID of the PTC RV&S item which is the test session.
      Returns:
      The ID test session item.
    • getAdapterName

      String getAdapterName()
      The name of the adapter that was requested to process the test session run.
      Returns:
      The name of the adapter.
    • getAdapterProperties

      Properties getAdapterProperties()
      The properties defined for the adapter in the tm.properties file. Keys will have the 'tm.adapter.<adapterName>.property' prefix already removed. Note that adapter properties can be overridden by properties provided via the server when the test session run is requested.
      Returns:
      The adapter properties.
    • getTestServer

      ITestServer getTestServer() throws TMAPIException
      Get the test server, establishing an underlying API Session using the default API session username and password defined for the adapter in the tm.properties file.

      The username and password provided and the host the Agent is running on must satisfy the API Session connection requirements set out in the IntegrityClientSite.rc file defined on the server.

      Returns:
      The test server object that represents an wrapped API session back into the server which is used to lookup item data and for recording test results back into the repository.
      Throws:
      TMAPIException - If the API session back to the server could not be established.
    • getTestServer

      ITestServer getTestServer(String username, String password) throws TMAPIException
      Get the test server, establishing an underlying API Session overriding the default API session username and password defined for the adapter in the tm.properties file.

      The username and password provided and the host the Agent is running on must satisfy the API Session connection requirements set out in the IntegrityClientSite.rc file defined on the server.

      Parameters:
      username - The name of the user to establish an API session back into the server.
      password - The password for the user to establish an API session back into the server.
      Returns:
      The test server object that represents an wrapped API session back into the server which is used to lookup item data and for recording test results back into the repository.
      Throws:
      TMAPIException - If the API session back to the server could not be established.
    • getTestAgent

      ITestAgent getTestAgent()
      Get the agent that this test session run is being executed via.
      Returns:
      The agent that this test session run is being executed via.
    • isCancelled

      boolean isCancelled()
      Determine if this test session has been cancelled. Note this is a thread safe operation.
      Returns:
      true if this test session has been cancelled, false otherwise.
    • getThread

      Thread getThread()
      Get the thread used for the initialize, execute and uninitialize operations.
      Returns:
      The thread used for the initialize, execute and uninitialize operations. A value of null will be returned if the thread is no longer running.