Class TestEnvironment
- 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.TestEnvironment
-
- All Implemented Interfaces:
ComTestEnvironment
,AutoCloseable
public class TestEnvironment extends ETComDispatch implements ComTestEnvironment
COM object representing the currently started test environment. This environment supports operations to run packages and projects.
-
-
Constructor Summary
Constructors Constructor Description TestEnvironment(com.jacob.com.Dispatch dispatch, boolean useTimeout)
Instantiates a newTestEnvironment
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComTestExecutionInfo
executePackage(String path)
Same asexecutePackage(String, boolean, boolean, Map)
but with default parameters.ComTestExecutionInfo
executePackage(String path, boolean runTraceAnalysis, boolean runTest)
Same asexecutePackage(String, boolean, boolean, Map)
but with default parameters.ComTestExecutionInfo
executePackage(String path, boolean runTraceAnalysis, boolean runTest, Map<String,String> parameters)
Starts the execution of the specified package file.ComTestExecutionInfo
executeProject(String path)
Same asexecuteProject(String, boolean, int)
but with default parameters.ComTestExecutionInfo
executeProject(String path, boolean closeProgressDialog, int jobExecutionMode)
Starts the execution of the specified project file.boolean
generateTestReportDocument(String dbFile, String reportDir, String reportConfig, boolean waitUntilFinished)
Generates a handler based test report on the file system.boolean
generateTestReportDocumentFromDB(String dbFile, String reportDir, String reportFormat)
Same asgenerateTestReportDocumentFromDB(String, String, String, boolean, Map)
but with default parameters.boolean
generateTestReportDocumentFromDB(String dbFile, String reportDir, String reportFormat, boolean waitUntilFinished)
Same asgenerateTestReportDocumentFromDB(String, String, String, boolean, Map)
but with default parameters.boolean
generateTestReportDocumentFromDB(String dbFile, String reportDir, String reportFormat, boolean waitUntilFinished, Map<String,String> parameters)
Generates a handler based test report on the file system.ComTestExecutionInfo
getTestExecutionInfo()
Gets the current test execution info.-
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
-
TestEnvironment
public TestEnvironment(com.jacob.com.Dispatch dispatch, boolean useTimeout)
Instantiates a newTestEnvironment
.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
-
getTestExecutionInfo
public ComTestExecutionInfo getTestExecutionInfo() throws ETComException
Description copied from interface:ComTestEnvironment
Gets the current test execution info.- Specified by:
getTestExecutionInfo
in interfaceComTestEnvironment
- Returns:
- the
ComTestExecutionInfo
dispatch - Throws:
ETComException
- in case of a COM exception
-
executePackage
public ComTestExecutionInfo executePackage(String path) throws ETComException
Same asexecutePackage(String, boolean, boolean, Map)
but with default parameters.- Parameters:
path
- the full path name of the package file to execute- Returns:
- the
ComTestExecutionInfo
dispatch - Throws:
ETComException
- if the package was not opened before or the format of the parameter values is wrong- See Also:
executePackage(String, boolean, boolean, Map)
-
executePackage
public ComTestExecutionInfo executePackage(String path, boolean runTraceAnalysis, boolean runTest) throws ETComException
Same asexecutePackage(String, boolean, boolean, Map)
but with default parameters.- Parameters:
path
- the full path name of the package file to executerunTraceAnalysis
- the run trace analysisrunTest
- the run test- Returns:
- the
ComTestExecutionInfo
dispatch - Throws:
ETComException
- if the package was not opened before or the format of the parameter values is wrong- See Also:
executePackage(String, boolean, boolean, Map)
-
executePackage
public ComTestExecutionInfo executePackage(String path, boolean runTraceAnalysis, boolean runTest, Map<String,String> parameters) throws ETComException
Description copied from interface:ComTestEnvironment
Starts the execution of the specified package file. The package must be already opened withComApplication.openPackage(java.lang.String)
. If it is not opened a call of this function will raise an error.- Specified by:
executePackage
in interfaceComTestEnvironment
- Parameters:
path
- the full path name of the package file to executerunTraceAnalysis
- specifies whether the trace analysis should be executedrunTest
- specifies whether the test should be executedparameters
- the package parameters to populate as test variables for the test and the trace analysis- Returns:
- the
ComTestExecutionInfo
dispatch - Throws:
ETComException
- if the package was not opened before or the format of the parameter values is wrong
-
executeProject
public ComTestExecutionInfo executeProject(String path) throws ETComException
Same asexecuteProject(String, boolean, int)
but with default parameters.- Parameters:
path
- the full path name of the project file- Returns:
- the
ComTestExecutionInfo
dispatch - Throws:
ETComException
- if the project was not opened before
-
executeProject
public ComTestExecutionInfo executeProject(String path, boolean closeProgressDialog, int jobExecutionMode) throws ETComException
Description copied from interface:ComTestEnvironment
Starts the execution of the specified project file. The project must be already opened withComApplication.openProject(java.lang.String, boolean, java.lang.String)
. If it is not opened a call of this function will raise an error.- Specified by:
executeProject
in interfaceComTestEnvironment
- Parameters:
path
- the full path name of the project filecloseProgressDialog
- determines whether the progress dialog will be closed when finishedjobExecutionMode
- specifies whether and how the analysis jobs should be executed:0 .. no job execution 1 .. sequential job execution (default) 2 .. parallel job execution 5 .. sequential job execution with separate test report 6 .. parallel job execution with separate test report
- Returns:
- the
ComTestExecutionInfo
dispatch - Throws:
ETComException
- if the project was not opened before
-
generateTestReportDocumentFromDB
public boolean generateTestReportDocumentFromDB(String dbFile, String reportDir, String reportFormat) throws ETComException
Same asgenerateTestReportDocumentFromDB(String, String, String, boolean, Map)
but with default parameters.- Parameters:
dbFile
- the full path name of the data base filereportDir
- the full path name of output directoryreportFormat
- name of the report format or handler which should be used- Returns:
true
if successful,false
otherwise- Throws:
ETComException
- in case of a COM exception or invalid parameters- See Also:
generateTestReportDocumentFromDB(String, String, String, boolean, Map)
-
generateTestReportDocumentFromDB
public boolean generateTestReportDocumentFromDB(String dbFile, String reportDir, String reportFormat, boolean waitUntilFinished) throws ETComException
Same asgenerateTestReportDocumentFromDB(String, String, String, boolean, Map)
but with default parameters.- Parameters:
dbFile
- the full path name of the data base filereportDir
- the full path name of output directoryreportFormat
- name of the report format or handler which should be usedwaitUntilFinished
- defines whether the API call should block until generation is finished- Returns:
true
if successful,false
otherwise- Throws:
ETComException
- in case of a COM exception or invalid parameters- See Also:
generateTestReportDocumentFromDB(String, String, String, boolean, Map)
-
generateTestReportDocumentFromDB
public boolean generateTestReportDocumentFromDB(String dbFile, String reportDir, String reportFormat, boolean waitUntilFinished, Map<String,String> parameters) throws ETComException
Description copied from interface:ComTestEnvironment
Generates a handler based test report on the file system.- Specified by:
generateTestReportDocumentFromDB
in interfaceComTestEnvironment
- Parameters:
dbFile
- the full path name of the data base filereportDir
- the full path name of output directoryreportFormat
- the name of the report format or handler which should be usedwaitUntilFinished
- defines whether the API call should block until generation is finishedparameters
- the configuration parameters- Returns:
true
if successful,false
otherwise- Throws:
ETComException
- in case of a COM exception or invalid parameters
-
generateTestReportDocument
public boolean generateTestReportDocument(String dbFile, String reportDir, String reportConfig, boolean waitUntilFinished) throws ETComException
Description copied from interface:ComTestEnvironment
Generates a handler based test report on the file system.- Specified by:
generateTestReportDocument
in interfaceComTestEnvironment
- Parameters:
dbFile
- the full path name of the data base filereportDir
- the full path name of output directoryreportConfig
- the full path to persisted report generator settings file (XML)waitUntilFinished
- defines whether the API call should block until generation is finished- Returns:
true
if successful,false
otherwise- Throws:
ETComException
- in case of a COM exception or invalid parameters
-
-