Interface TptApi

  • All Superinterfaces:
    java.rmi.Remote, TptRemote

    public interface TptApi
    extends TptRemote
    Main entry point for the access to TPT via the Remote API
    • Method Detail

      • closeTpt

        boolean closeTpt()
                  throws java.rmi.RemoteException
        Close the TPT instance represented by this object.
        Returns:
        false if the application cannot be closed. Possible reasons are:
        • the user interrupts the close operation
        • a test is currently running and is not been canceled
        • other blocking operations prevent TPT from closing
        Throws:
        java.rmi.RemoteException - remote communication problem
      • openProject

        OpenResult openProject​(java.io.File f)
                        throws ApiException,
                               java.rmi.RemoteException
        Try to open an already existing project and to return a handle for the project (OpenResult.getProject()). If the project is already open, only the handle will be returned. The project is not re-opened. Changes will not been overwritten.

        Any errors or warnings that occur during the open-operation are stored in the OpenResult.getLogs().

        Parameters:
        f - The path to the TPT-file as File
        Returns:
        A OpenResult containing the handle to the project and the log messages occurred during the open-operation.
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - If f do not exists or if f is not a TPT-file.
      • newProject

        Project newProject​(java.io.File f)
                    throws ApiException,
                           java.rmi.RemoteException
        Create a new TPT Project assigned with the given File. The new Project will not be saved during this operation. The given file is only relevant for later save operations.
        Parameters:
        f - the file to use for this project
        Returns:
        the newly created TPT project
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - If the given File is already opened in TPT
        See Also:
        Project.saveProject(), Project.saveAsProject(File)
      • getOpenProjects

        java.util.Collection<Project> getOpenProjects()
                                               throws java.rmi.RemoteException
        Returns:
        Returns the set of all Projects that are currently open in this TPT instance.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getTptVersion

        java.lang.String getTptVersion()
                                throws java.rmi.RemoteException
        Returns:
        Returns the version name of the TPT instance represented by this API object.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getFileFormatVersion

        int getFileFormatVersion()
                          throws java.rmi.RemoteException
        Returns:
        Returns the version number of file format this TPT version will use to store *.tpt-, *.tptz- and *.tptprj-Files when calling save.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • run

        ExecutionStatus run​(ExecutionConfiguration config)
                     throws ApiException,
                            java.rmi.RemoteException
        Starts a run for the given ExecutionConfiguration. The test run is started asynchronously. The progress of the test run can be monitored via the returned ExecutionStatus object.
        Parameters:
        config - The ExecutionConfiguration to be executed.
        Returns:
        The state of execution for all test cases defined in the ExecutionConfiguration
        Throws:
        ApiException - if there is already a running test execution or if the test execution could not be started
        java.rmi.RemoteException - If config is not part of the TPT instance represented by this object.
      • reGenerateOverviewReport

        ExecutionStatus reGenerateOverviewReport​(ExecutionConfiguration config)
                                          throws ApiException,
                                                 java.rmi.RemoteException
        Start the generation of the overview report. The generation is done asynchronously.

        This function does not execute or asses the test cases specified in config. It uses the existing result data and XML-files to generate a new overview report.

        Parameters:
        config - The ExecutionConfiguration for which the overview report should be generated.
        Returns:
        the current status of report generation
        Throws:
        ApiException - if there is already a running test execution or if the test execution could not be started
        java.rmi.RemoteException - If config is not part of the TPT instance represented by this object.
      • select

        void select​(IdentifiableRemote obj)
             throws java.rmi.RemoteException
        Selects the object given by obj within the TPT GUI - if it is selectable (like a Scenario or an Assessment)
        Parameters:
        obj - A object that implements the IdentifiableRemote interface
        Throws:
        java.rmi.RemoteException - remote communication problem
      • isReady

        boolean isReady()
                 throws java.rmi.RemoteException
        Depending on its configuration, TPT requires some time to load all plugins. Since the API is one of the first plugins that are loaded, it can be accessed before TPT is actually fully loaded.

        This function returns true as soon as all plugins have been completely loaded and TPT is ready for use.

        Returns:
        Whether TPT has finished its startup
        Throws:
        java.rmi.RemoteException - remote communication problem