Class TestManagement
- 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 Summary
Constructors Constructor Description TestManagement(com.jacob.com.Dispatch dispatch, boolean useTimeout)
Instantiates a newTestManagement
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
exportPackage(String filePath, String exportPath)
Same asexportPackage(String, String, boolean, int)
but without timeout.boolean
exportPackage(String filePath, String exportPath, boolean createNewPath, int timeout)
Exports the given package to test management system.boolean
exportPackage(String filePath, String exportPath, int timeout)
Same asexportPackage(String, String, boolean, int)
but without timeout and default optional parameter.boolean
exportPackageAttributes(String filePath)
Same asexportPackageAttributes(String, int)
but without timeout.boolean
exportPackageAttributes(String filePath, int timeout)
Exports the attributes of given package to test management system.boolean
exportProject(String filePath, String exportPath)
Same asexportProject(String, String, boolean, int)
but without timeout.boolean
exportProject(String filePath, String exportPath, boolean createNewPath, int timeout)
Exports the given project to test management system.boolean
exportProject(String filePath, String exportPath, int timeout)
Same asexportProject(String, String, boolean, int)
but without timeout and default optional parameter.boolean
exportProjectAttributes(String filePath)
Same asexportProjectAttributes(String, int)
but without timeout.boolean
exportProjectAttributes(String filePath, int timeout)
Exports the attributes of given project to test management system.boolean
exportReport(String filePath, int timeout)
Same asexportReport(String, String, int)
but without archive path.boolean
exportReport(String filePath, String archivePath)
Same asexportReport(String, String, int)
but without timeout.boolean
exportReport(String filePath, String archivePath, int timeout)
Exports the given project report file to test management system.boolean
importPackage(String tmProjectPath, String importPath)
Same asimportPackage(String, String, int)
but without timeout.boolean
importPackage(String tmProjectPath, String importPath, int timeout)
Imports a package from a test management system.boolean
importPackageAttributes(String filePath)
Same asimportPackageAttributes(String, int)
but without timeout.boolean
importPackageAttributes(String filePath, int timeout)
Imports the attributes of given package to test management system.boolean
importPackageDirectory(String tmDirectoryPath, String importPath)
Same asimportPackageDirectory(String, String, int)
but without timeout.boolean
importPackageDirectory(String tmDirectoryPath, String importPath, int timeout)
Imports a directory from a test management system with all sub directories and package.boolean
importProject(String tmProjectPath, String importPath)
Same asimportProject(String, String, boolean, int)
but without timeout.boolean
importProject(String tmProjectPath, String importPath, boolean importMissingPackages, int timeout)
Imports a project from a test management system.boolean
importProject(String tmProjectPath, String importPath, int timeout)
Same asimportProject(String, String, boolean, int)
but with time out and default optional parameter.boolean
importProjectAttributes(String filePath)
Same asimportProjectAttributes(String, int)
but without timeout.boolean
importProjectAttributes(String filePath, int timeout)
Imports the attributes of given project to test management system.boolean
importProjectById(String tmProjectId, String importPath)
Same asimportProjectById(String, String, boolean, int)
, but without importMissingPackages and no timeout (= 0).boolean
importProjectById(String tmProjectId, String importPath, boolean importMissingPackages, int timeout)
Dispatches the function call to the ecu.test COM-API method ImportProjectById.boolean
importProjectById(String tmProjectId, String importPath, int timeout)
Same asimportProjectById(String, String, boolean, int)
, but without importMissingPackages.boolean
importProjectDirectory(String tmDirectoryPath, String importPath)
Same asimportProjectDirectory(String, String, int)
but without timeout.boolean
importProjectDirectory(String tmDirectoryPath, String importPath, int timeout)
Imports a directory from a test management system with all sub directories and projects.boolean
isAvailable()
Checks if the test management service can be started.boolean
login(String user, String password)
Performs a login to the preconfigured test management service.boolean
logout()
Performs a logout to the preconfigured test management service.-
Methods inherited from class de.tracetronic.jenkins.plugins.ecutest.wrapper.com.ETComDispatch
close, finalize, isAttached, performDirectRequest, performDirectRequest, performRequest, performRequest, performRequest, performRequest, useTimeout
-
Methods inherited from class com.jacob.com.Dispatch
call, call, call, call, callN, callN, callN_CaseSensitive, callSub, callSub, callSub, callSub, callSubN, callSubN, coCreateInstance, get, get, get_CaseSensitive, getActiveInstance, getIDOfName, getIDsOfNames, getIDsOfNames, getProgramId, hasExited, hasExited, invoke, invoke, invoke, invokeSub, invokeSub, invokeSub, invokeSubv, invokeSubv, invokeSubv, invokev, invokev, invokev, invokev, put, put, put_Casesensitive, putRef, putRef, QueryInterface, safeRelease
-
-
-
-
Constructor Detail
-
TestManagement
public TestManagement(com.jacob.com.Dispatch dispatch, boolean useTimeout)
Instantiates a newTestManagement
.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 dispatchuseTimeout
- specifies whether to apply timeout
-
-
Method Detail
-
isAvailable
public boolean isAvailable() throws ETComException
Description copied from interface:ComTestManagement
Checks if the test management service can be started.- Specified by:
isAvailable
in interfaceComTestManagement
- 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 interfaceComTestManagement
- Parameters:
user
- the user namepassword
- 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 interfaceComTestManagement
- 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 asimportPackage(String, String, int)
but without timeout.- Parameters:
tmProjectPath
- the path specifying the package in the test management systemimportPath
- 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 interfaceComTestManagement
- Parameters:
tmProjectPath
- the path specifying the package in the test management systemimportPath
- 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 asimportPackageDirectory(String, String, int)
but without timeout.- Parameters:
tmDirectoryPath
- the path specifying the package in the test management systemimportPath
- 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 interfaceComTestManagement
- Parameters:
tmDirectoryPath
- the path specifying the package in the test management systemimportPath
- 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 asimportProject(String, String, boolean, int)
but without timeout.- Parameters:
tmProjectPath
- the path specifying the project in the test management systemimportPath
- 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 asimportProject(String, String, boolean, int)
but with time out and default optional parameter.- Parameters:
tmProjectPath
- the path specifying the project in the test management systemimportPath
- 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 interfaceComTestManagement
- Parameters:
tmProjectPath
- the path specifying the project in the test management systemimportPath
- the directory to save the project (relative to package directory or absolute)importMissingPackages
- specifies whether missing packages will be automatically importedtimeout
- 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 asimportProjectById(String, String, boolean, int)
, but without importMissingPackages and no timeout (= 0).- Parameters:
tmProjectId
- the project ID in test management systemimportPath
- 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 asimportProjectById(String, String, boolean, int)
, but without importMissingPackages.- Parameters:
tmProjectId
- the project ID in test management systemimportPath
- 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 interfaceComTestManagement
- Parameters:
tmProjectId
- the project ID in test management systemimportPath
- the directory to save the project (relative to package directory or absolute)importMissingPackages
- specifies whether to import missing packagestimeout
- 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 asimportProjectDirectory(String, String, int)
but without timeout.- Parameters:
tmDirectoryPath
- the path specifying the project in the test management systemimportPath
- 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 interfaceComTestManagement
- Parameters:
tmDirectoryPath
- the path specifying the project in the test management systemimportPath
- 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 asimportPackageAttributes(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 interfaceComTestManagement
- 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 asimportProjectAttributes(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 interfaceComTestManagement
- 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 asexportPackage(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 asexportPackage(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 attimeout
- 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 interfaceComTestManagement
- 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 atcreateNewPath
- if the exportPath does not exist, it will be createdtimeout
- 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 asexportProject(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 asexportProject(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 attimeout
- 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 interfaceComTestManagement
- 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 atcreateNewPath
- if the exportPath does not exist, it will be createdtimeout
- 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 asexportPackageAttributes(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 interfaceComTestManagement
- 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 asexportProjectAttributes(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 interfaceComTestManagement
- 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 asexportReport(String, String, int)
but without archive path.- Parameters:
filePath
- the file path of the report file to be exportedtimeout
- 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 asexportReport(String, String, int)
but without timeout.- Parameters:
filePath
- the file path of the report file to be exportedarchivePath
- 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 interfaceComTestManagement
- Parameters:
filePath
- the file path of the project report file to be exportedarchivePath
- if the exportPath does not exist, it will be createdtimeout
- 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
-
-