java.lang.Object
com.jacob.com.JacobObject
com.jacob.com.Dispatch
de.tracetronic.jenkins.plugins.ecutest.wrapper.com.ETComDispatch
de.tracetronic.jenkins.plugins.ecutest.wrapper.com.TestManagement
All Implemented Interfaces:
ComTestManagement, AutoCloseable

public class TestManagement extends ETComDispatch implements ComTestManagement
COM object providing operations to offer access to the test management interface.
  • Constructor Details

    • TestManagement

      public TestManagement(com.jacob.com.Dispatch dispatch, boolean useTimeout)
      Instantiates a new TestManagement.

      This constructor is used instead of a case operation to turn a Dispatch object into a wider object - it must exist in every wrapper class whose instances may be returned from method calls wrapped in VT_DISPATCH Variants.

      Parameters:
      dispatch - the dispatch
      useTimeout - specifies whether to apply timeout
  • Method Details

    • isAvailable

      public boolean isAvailable() throws ETComException
      Description copied from interface: ComTestManagement
      Checks if the test management service can be started.
      Specified by:
      isAvailable in interface ComTestManagement
      Returns:
      true if the service could be started, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • login

      public boolean login(String user, String password) throws ETComException
      Description copied from interface: ComTestManagement
      Performs a login to the preconfigured test management service.
      Specified by:
      login in interface ComTestManagement
      Parameters:
      user - the user name
      password - the password
      Returns:
      true if login succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • logout

      public boolean logout() throws ETComException
      Description copied from interface: ComTestManagement
      Performs a logout to the preconfigured test management service.
      Specified by:
      logout in interface ComTestManagement
      Returns:
      true if logout succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • importPackage

      public boolean importPackage(String tmProjectPath, String importPath) throws ETComException
      Same as importPackage(String, String, int) but without timeout.
      Parameters:
      tmProjectPath - the path specifying the package in the test management system
      importPath - the directory to save the package (relative to package directory or absolute)
      Returns:
      true if import succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • importPackage

      public boolean importPackage(String tmProjectPath, String importPath, int timeout) throws ETComException
      Description copied from interface: ComTestManagement
      Imports a package from a test management system. The tmProjectPath specifies the package in the test management system. The package will be imported into directory given by importPath.
      Specified by:
      importPackage in interface ComTestManagement
      Parameters:
      tmProjectPath - the path specifying the package in the test management system
      importPath - the directory to save the package (relative to package directory or absolute)
      timeout - the timeout in seconds to wait for import to be finished
      Returns:
      true if import succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • importPackageDirectory

      public boolean importPackageDirectory(String tmDirectoryPath, String importPath) throws ETComException
      Same as importPackageDirectory(String, String, int) but without timeout.
      Parameters:
      tmDirectoryPath - the path specifying the package in the test management system
      importPath - the directory to save the package (relative to package directory or absolute)
      Returns:
      true if import succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • importPackageDirectory

      public boolean importPackageDirectory(String tmDirectoryPath, String importPath, int timeout) throws ETComException
      Description copied from interface: ComTestManagement
      Imports a directory from a test management system with all sub directories and package. The tmDirectoryPath specifies the directory in the test management system. The directory will be imported into the directory given by importPath.
      Specified by:
      importPackageDirectory in interface ComTestManagement
      Parameters:
      tmDirectoryPath - the path specifying the package in the test management system
      importPath - the directory to save the package (relative to package directory or absolute)
      timeout - the timeout in seconds to wait for import to be finished
      Returns:
      true if import succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • importProject

      public boolean importProject(String tmProjectPath, String importPath) throws ETComException
      Same as importProject(String, String, boolean, int) but without timeout.
      Parameters:
      tmProjectPath - the path specifying the project in the test management system
      importPath - the directory to save the project (relative to package directory or absolute)
      Returns:
      true if import succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • importProject

      public boolean importProject(String tmProjectPath, String importPath, int timeout) throws ETComException
      Same as importProject(String, String, boolean, int) but with time out and default optional parameter.
      Parameters:
      tmProjectPath - the path specifying the project in the test management system
      importPath - the directory to save the project (relative to package directory or absolute)
      timeout - the timeout in seconds to wait for import to be finished
      Returns:
      true if import succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • importProject

      public boolean importProject(String tmProjectPath, String importPath, boolean importMissingPackages, int timeout) throws ETComException
      Description copied from interface: ComTestManagement
      Imports a project from a test management system. The tmProjectPath specifies the project in the test management system. The project will be imported into directory given by importPath.
      Specified by:
      importProject in interface ComTestManagement
      Parameters:
      tmProjectPath - the path specifying the project in the test management system
      importPath - the directory to save the project (relative to package directory or absolute)
      importMissingPackages - specifies whether missing packages will be automatically imported
      timeout - the timeout in seconds to wait for import to be finished
      Returns:
      true if import succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • importProjectById

      public boolean importProjectById(String tmProjectId, String importPath) throws ETComException
      Same as importProjectById(String, String, boolean, int), but without importMissingPackages and no timeout (= 0).
      Parameters:
      tmProjectId - the project ID in test management system
      importPath - the directory to save the project (relative to package directory or absolute)
      Returns:
      true if import succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • importProjectById

      public boolean importProjectById(String tmProjectId, String importPath, int timeout) throws ETComException
      Same as importProjectById(String, String, boolean, int), but without importMissingPackages.
      Parameters:
      tmProjectId - the project ID in test management system
      importPath - the directory to save the project (relative to package directory or absolute)
      timeout - the timeout in seconds to wait for import to be finished (timeout = 0: no timeout)
      Returns:
      true if import succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • importProjectById

      public boolean importProjectById(String tmProjectId, String importPath, boolean importMissingPackages, int timeout) throws ETComException
      Dispatches the function call to the ecu.test COM-API method ImportProjectById.
      Specified by:
      importProjectById in interface ComTestManagement
      Parameters:
      tmProjectId - the project ID in test management system
      importPath - the directory to save the project (relative to package directory or absolute)
      importMissingPackages - specifies whether to import missing packages
      timeout - the timeout in seconds to wait for import to be finished (timeout = 0: no timeout)
      Returns:
      true if import succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • importProjectDirectory

      public boolean importProjectDirectory(String tmDirectoryPath, String importPath) throws ETComException
      Same as importProjectDirectory(String, String, int) but without timeout.
      Parameters:
      tmDirectoryPath - the path specifying the project in the test management system
      importPath - the directory to save the project (relative to package directory or absolute)
      Returns:
      true if import succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • importProjectDirectory

      public boolean importProjectDirectory(String tmDirectoryPath, String importPath, int timeout) throws ETComException
      Description copied from interface: ComTestManagement
      Imports a directory from a test management system with all sub directories and projects. The tmDirectoryPath specifies the directory in the test management system. The directory will be imported into the directory given by importPath.
      Specified by:
      importProjectDirectory in interface ComTestManagement
      Parameters:
      tmDirectoryPath - the path specifying the project in the test management system
      importPath - the directory to save the project (relative to package directory or absolute)
      timeout - the timeout in seconds to wait for import to be finished
      Returns:
      true if import succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • importPackageAttributes

      public boolean importPackageAttributes(String filePath) throws ETComException
      Same as importPackageAttributes(String, int) but without timeout.
      Parameters:
      filePath - the file path of the package whose attributes have to be imported (relative to package directory or absolute)
      Returns:
      true if import succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • importPackageAttributes

      public boolean importPackageAttributes(String filePath, int timeout) throws ETComException
      Description copied from interface: ComTestManagement
      Imports the attributes of given package to test management system.
      Specified by:
      importPackageAttributes in interface ComTestManagement
      Parameters:
      filePath - the file path of the package whose attributes have to be imported (relative to package directory or absolute)
      timeout - the timeout in seconds to wait for export to be finished
      Returns:
      true if import succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • importProjectAttributes

      public boolean importProjectAttributes(String filePath) throws ETComException
      Same as importProjectAttributes(String, int) but without timeout.
      Parameters:
      filePath - the file path of the project whose attributes have to be imported (relative to package directory or absolute)
      Returns:
      true if import succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • importProjectAttributes

      public boolean importProjectAttributes(String filePath, int timeout) throws ETComException
      Description copied from interface: ComTestManagement
      Imports the attributes of given project to test management system.
      Specified by:
      importProjectAttributes in interface ComTestManagement
      Parameters:
      filePath - the file path of the project whose attributes have to be imported (relative to package directory or absolute)
      timeout - the timeout in seconds to wait for export to be finished
      Returns:
      true if import succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • exportPackage

      public boolean exportPackage(String filePath, String exportPath) throws ETComException
      Same as exportPackage(String, String, boolean, int) but without timeout.
      Parameters:
      filePath - the file path of the package to be exported (relative to package directory or absolute)
      exportPath - the path specifying where the package should be placed at
      Returns:
      true if export succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • exportPackage

      public boolean exportPackage(String filePath, String exportPath, int timeout) throws ETComException
      Same as exportPackage(String, String, boolean, int) but without timeout and default optional parameter.
      Parameters:
      filePath - the file path of the package to be exported (relative to package directory or absolute)
      exportPath - the path specifying where the package should be placed at
      timeout - the timeout in seconds to wait for export to be finished
      Returns:
      true if export succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • exportPackage

      public boolean exportPackage(String filePath, String exportPath, boolean createNewPath, int timeout) throws ETComException
      Description copied from interface: ComTestManagement
      Exports the given package to test management system. The exportPath is needed to specify where the package should be placed at.
      Specified by:
      exportPackage in interface ComTestManagement
      Parameters:
      filePath - the file path of the package to be exported (relative to package directory or absolute)
      exportPath - the path specifying where the package should be placed at
      createNewPath - if the exportPath does not exist, it will be created
      timeout - the timeout in seconds to wait for export to be finished
      Returns:
      true if export succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • exportProject

      public boolean exportProject(String filePath, String exportPath) throws ETComException
      Same as exportProject(String, String, boolean, int) but without timeout.
      Parameters:
      filePath - the file path of the project to be exported (relative to package directory or absolute)
      exportPath - the path specifying where the project should be placed at
      Returns:
      true if export succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • exportProject

      public boolean exportProject(String filePath, String exportPath, int timeout) throws ETComException
      Same as exportProject(String, String, boolean, int) but without timeout and default optional parameter.
      Parameters:
      filePath - the file path of the project to be exported (relative to package directory or absolute)
      exportPath - the path specifying where the project should be placed at
      timeout - the timeout in seconds to wait for export to be finished
      Returns:
      true if export succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • exportProject

      public boolean exportProject(String filePath, String exportPath, boolean createNewPath, int timeout) throws ETComException
      Description copied from interface: ComTestManagement
      Exports the given project to test management system. The exportPath is needed to specify where the project should be placed at.
      Specified by:
      exportProject in interface ComTestManagement
      Parameters:
      filePath - the file path of the project to be exported (relative to package directory or absolute)
      exportPath - the path specifying where the project should be placed at
      createNewPath - if the exportPath does not exist, it will be created
      timeout - the timeout in seconds to wait for export to be finished
      Returns:
      true if export succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • exportPackageAttributes

      public boolean exportPackageAttributes(String filePath) throws ETComException
      Same as exportPackageAttributes(String, int) but without timeout.
      Parameters:
      filePath - the file path of the package whose attributes have to be exported (relative to package directory or absolute)
      Returns:
      true if export succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • exportPackageAttributes

      public boolean exportPackageAttributes(String filePath, int timeout) throws ETComException
      Description copied from interface: ComTestManagement
      Exports the attributes of given package to test management system.
      Specified by:
      exportPackageAttributes in interface ComTestManagement
      Parameters:
      filePath - the file path of the package whose attributes have to be exported (relative to package directory or absolute)
      timeout - the timeout in seconds to wait for export to be finished
      Returns:
      true if export succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • exportProjectAttributes

      public boolean exportProjectAttributes(String filePath) throws ETComException
      Same as exportProjectAttributes(String, int) but without timeout.
      Parameters:
      filePath - the file path of the project whose attributes have to be exported (relative to package directory or absolute)
      Returns:
      true if export succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • exportProjectAttributes

      public boolean exportProjectAttributes(String filePath, int timeout) throws ETComException
      Description copied from interface: ComTestManagement
      Exports the attributes of given project to test management system.
      Specified by:
      exportProjectAttributes in interface ComTestManagement
      Parameters:
      filePath - the file path of the project whose attributes have to be exported (relative to package directory or absolute)
      timeout - the timeout in seconds to wait for export to be finished
      Returns:
      true if export succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • exportReport

      public boolean exportReport(String filePath, int timeout) throws ETComException
      Same as exportReport(String, String, int) but without archive path.
      Parameters:
      filePath - the file path of the report file to be exported
      timeout - the timeout in seconds to wait for export to be finished
      Returns:
      true if export succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • exportReport

      public boolean exportReport(String filePath, String archivePath) throws ETComException
      Same as exportReport(String, String, int) but without timeout.
      Parameters:
      filePath - the file path of the report file to be exported
      archivePath - if the exportPath does not exist, it will be created
      Returns:
      true if export succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception
    • exportReport

      public boolean exportReport(String filePath, String archivePath, int timeout) throws ETComException
      Description copied from interface: ComTestManagement
      Exports the given project report file to test management system. The archive path may be used to copy the report to another directory and to reference it from the test management entry.
      Specified by:
      exportReport in interface ComTestManagement
      Parameters:
      filePath - the file path of the project report file to be exported
      archivePath - if the exportPath does not exist, it will be created
      timeout - the timeout in seconds to wait for export to be finished
      Returns:
      true if export succeeded, false otherwise
      Throws:
      ETComException - in case of a COM exception