Interface ITestServer

All Superinterfaces:
com.mks.api.CmdRunnerCreator, com.mks.api.IntegrationVersionRequest

public interface ITestServer extends com.mks.api.CmdRunnerCreator
This interface exposes services provided by the Server that may assist in test execution.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    The predefined fields in the system.
    static enum 
    The predefined verdicts in the system.
  • Method Summary

    Modifier and Type
    Method
    Description
    The names of the active test verdicts for this server.
    The name of the server the underlying API session uses.
    int
    The TCP port of the server the underlying API session uses.
    The name of the user the underlying API session uses.
    Lookup the name of a built in field in a language neutral fashion.
    getTestSession(boolean showRichContent, boolean showXHTML, boolean substituteParams)
    Fetch the test session item from the server.
    Get the names of all the types in the server.
    Get all the type properties defined for a type.
    Lookup the name of a built in verdict in a language neutral fashion.
    boolean
    An indication that the API session is secure or not.

    Methods inherited from interface com.mks.api.CmdRunnerCreator

    createCmdRunner, getCmdRunners, getDefaultHostname, getDefaultImpersonationUser, getDefaultPassword, getDefaultPort, getDefaultUsername, release, release, setClientLocale, setDefaultHostname, setDefaultImpersonationUser, setDefaultPassword, setDefaultPort, setDefaultUsername

    Methods inherited from interface com.mks.api.IntegrationVersionRequest

    getAPIRequestVersion
  • Method Details

    • getAPISessionHostname

      String getAPISessionHostname() throws TMAPIException
      The name of the server the underlying API session uses.
      Returns:
      The API session server hostname.
      Throws:
      TMAPIException - Reserved exception.
    • getAPISessionPort

      int getAPISessionPort() throws TMAPIException
      The TCP port of the server the underlying API session uses.
      Returns:
      The API session server TCP port.
      Throws:
      TMAPIException - Reserved exception.
    • isAPISessionSecure

      boolean isAPISessionSecure() throws TMAPIException
      An indication that the API session is secure or not.
      Returns:
      true if the API session is secure, false otherwise.
      Throws:
      TMAPIException - Reserved exception.
    • getAPISessionUsername

      String getAPISessionUsername() throws TMAPIException
      The name of the user the underlying API session uses.
      Returns:
      The API session username.
      Throws:
      TMAPIException - Reserved exception.
    • getFieldName

      String getFieldName(ITestServer.Field field) throws TMAPIException
      Lookup the name of a built in field in a language neutral fashion. Note that the field definitions are fetched and cached at the start of a tests session run for the duration of the test session run.
      Parameters:
      field - The field to find the name for.
      Returns:
      The name of the build in field.
      Throws:
      TMAPIException - Reserved exception.
    • getVerdictName

      String getVerdictName(ITestServer.Verdict verdict) throws TMAPIException
      Lookup the name of a built in verdict in a language neutral fashion. Note that the verdict definitions are fetched and cached at the start of a test session run for the duration of the test session run.
      Parameters:
      verdict - The verdict to find the name for.
      Returns:
      The name of the build in verdict.
      Throws:
      TMAPIException - Reserved exception.
    • getActiveVerdictNames

      Collection<String> getActiveVerdictNames() throws TMAPIException
      The names of the active test verdicts for this server. Note that the verdict definitions are fetched and cached at the start of the test session run for the duration of the test session run.
      Returns:
      The names of the active test verdicts for this server.
      Throws:
      TMAPIException - Reserved exception.
    • getTypeNames

      Collection<String> getTypeNames() throws TMAPIException
      Get the names of all the types in the server. Note that the type names are fetched and cached at the start of the test session run for the duration of the test session run.
      Returns:
      The names of the types for this server.
      Throws:
      TMAPIException - Reserved exception.
    • getTypeProperties

      Properties getTypeProperties(String typeName) throws TMAPIException
      Get all the type properties defined for a type. Note that the type property definitions are fetched and cached at the start of the test session run for the duration of the test session run.
      Parameters:
      typeName - The name of the type.
      Returns:
      The type parameters for the backing type of the item.
      Throws:
      TMAPIException - Reserved exception.
    • getTestSession

      ITestSession getTestSession(boolean showRichContent, boolean showXHTML, boolean substituteParams) throws TMAPIException
      Fetch the test session item from the server.

      This method invokes the 'im viewissue' command via the underlying API session back into the server. The API session user must have ACL permission to Login as well as sufficient workflow permissions to view the test session item.

      Parameters:
      showRichContent - Determine if rich content fields should show the rich test content or plain.
      showXHTML - Determine if rich content (if shown) should be presented as XHTML or not.
      substituteParams - Determine if parameter substitution should be performed for the field values or not.
      Returns:
      The test session.
      Throws:
      TMAPIException - If the test session can not be fetched from the server.