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
COM object representing the currently started test environment.
This environment supports operations to run packages and projects.
-
Field Summary
Fields inherited from class com.jacob.com.Dispatch
fdexNameCaseSensitive, Get, LOCALE_SYSTEM_DEFAULT, m_pDispatch, Method, Put, PutRef -
Constructor Summary
ConstructorsConstructorDescriptionTestEnvironment(com.jacob.com.Dispatch dispatch, boolean useTimeout) Instantiates a newTestEnvironment. -
Method Summary
Modifier and TypeMethodDescriptionexecutePackage(String path) Same asexecutePackage(String, boolean, boolean, Map)but with default parameters.executePackage(String path, boolean runTraceAnalysis, boolean runTest) Same asexecutePackage(String, boolean, boolean, Map)but with default parameters.executePackage(String path, boolean runTraceAnalysis, boolean runTest, Map<String, String> parameters) Starts the execution of the specified package file.executeProject(String path) Same asexecuteProject(String, boolean, int)but with default parameters.executeProject(String path, boolean closeProgressDialog, int jobExecutionMode) Starts the execution of the specified project file.booleangenerateTestReportDocument(String dbFile, String reportDir, String reportConfig, boolean waitUntilFinished) Generates a handler based test report on the file system.booleangenerateTestReportDocumentFromDB(String dbFile, String reportDir, String reportFormat) Same asgenerateTestReportDocumentFromDB(String, String, String, boolean, Map)but with default parameters.booleangenerateTestReportDocumentFromDB(String dbFile, String reportDir, String reportFormat, boolean waitUntilFinished) Same asgenerateTestReportDocumentFromDB(String, String, String, boolean, Map)but with default parameters.booleangenerateTestReportDocumentFromDB(String dbFile, String reportDir, String reportFormat, boolean waitUntilFinished, Map<String, String> parameters) Generates a handler based test report on the file system.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, useTimeoutMethods 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, safeReleaseMethods inherited from class com.jacob.com.JacobObject
debug, getBuildDate, getBuildVersion, isDebugEnabled
-
Constructor Details
-
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 Details
-
getTestExecutionInfo
Description copied from interface:ComTestEnvironmentGets the current test execution info.- Specified by:
getTestExecutionInfoin interfaceComTestEnvironment- Returns:
- the
ComTestExecutionInfodispatch - Throws:
ETComException- in case of a COM exception
-
executePackage
Same asexecutePackage(String, boolean, boolean, Map)but with default parameters.- Parameters:
path- the full path name of the package file to execute- Returns:
- the
ComTestExecutionInfodispatch - Throws:
ETComException- if the package was not opened before or the format of the parameter values is wrong- See Also:
-
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
ComTestExecutionInfodispatch - Throws:
ETComException- if the package was not opened before or the format of the parameter values is wrong- See Also:
-
executePackage
public ComTestExecutionInfo executePackage(String path, boolean runTraceAnalysis, boolean runTest, Map<String, String> parameters) throws ETComExceptionDescription copied from interface:ComTestEnvironmentStarts 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:
executePackagein 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
ComTestExecutionInfodispatch - Throws:
ETComException- if the package was not opened before or the format of the parameter values is wrong
-
executeProject
Same asexecuteProject(String, boolean, int)but with default parameters.- Parameters:
path- the full path name of the project file- Returns:
- the
ComTestExecutionInfodispatch - 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:ComTestEnvironmentStarts 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:
executeProjectin 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
ComTestExecutionInfodispatch - 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:
trueif successful,falseotherwise- Throws:
ETComException- in case of a COM exception or invalid parameters- See Also:
-
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:
trueif successful,falseotherwise- Throws:
ETComException- in case of a COM exception or invalid parameters- See Also:
-
generateTestReportDocumentFromDB
public boolean generateTestReportDocumentFromDB(String dbFile, String reportDir, String reportFormat, boolean waitUntilFinished, Map<String, String> parameters) throws ETComExceptionDescription copied from interface:ComTestEnvironmentGenerates a handler based test report on the file system.- Specified by:
generateTestReportDocumentFromDBin 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:
trueif successful,falseotherwise- 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:ComTestEnvironmentGenerates a handler based test report on the file system.- Specified by:
generateTestReportDocumentin 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:
trueif successful,falseotherwise- Throws:
ETComException- in case of a COM exception or invalid parameters
-