Class TestExecutionInfo
- 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.TestExecutionInfo
-
- All Implemented Interfaces:
ComTestExecutionInfo
,AutoCloseable
public class TestExecutionInfo extends ETComDispatch implements ComTestExecutionInfo
COM object providing operations to obtain informations of the currently running test.
-
-
Constructor Summary
Constructors Constructor Description TestExecutionInfo(com.jacob.com.Dispatch dispatch, boolean useTimeout)
Instantiates a newTestExecutionInfo
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
abort()
Aborts the current test execution.boolean
abortAfterCurrentProjectStep(int timeout)
Aborts the current project test execution but waits for report generation.String
getLogFolder()
Folder where trace and log files of the currently executed package are stored.String
getReportDb()
Queries the path to report database of current (or most recent) test run.String
getResult()
Returns the result of the project execution or package execution, depending on which method (TestEnvironment.executeProject(String path)
orTestEnvironment.executePackage(String path)
) has called before.String
getReturnValue(String varName)
Returns the final value of a package variable.String
getState()
Returns the state of the current test execution.-
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
-
TestExecutionInfo
public TestExecutionInfo(com.jacob.com.Dispatch dispatch, boolean useTimeout)
Instantiates a newTestExecutionInfo
.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
-
abort
public boolean abort() throws ETComException
Description copied from interface:ComTestExecutionInfo
Aborts the current test execution.- Specified by:
abort
in interfaceComTestExecutionInfo
- Returns:
true
if the abortion succeeded,false
, if the test execution has already finished or aborted- Throws:
ETComException
- in case of a COM exception
-
abortAfterCurrentProjectStep
public boolean abortAfterCurrentProjectStep(int timeout) throws ETComException
Description copied from interface:ComTestExecutionInfo
Aborts the current project test execution but waits for report generation.- Specified by:
abortAfterCurrentProjectStep
in interfaceComTestExecutionInfo
- Parameters:
timeout
- the timeout in seconds to wait for aborting the current step- Returns:
true
if the abortion succeeded,false
, if the test execution has already finished or aborted- Throws:
ETComException
- in case of a COM exception
-
getReportDb
public String getReportDb() throws ETComException
Description copied from interface:ComTestExecutionInfo
Queries the path to report database of current (or most recent) test run.- Specified by:
getReportDb
in interfaceComTestExecutionInfo
- Returns:
- the path to report database
- Throws:
ETComException
- in case of a COM exception
-
getLogFolder
public String getLogFolder() throws ETComException
Description copied from interface:ComTestExecutionInfo
Folder where trace and log files of the currently executed package are stored. If there is no test execution in progress the log folder of the most recent package run is returned. Please note, each package run has got a separate log folder.- Specified by:
getLogFolder
in interfaceComTestExecutionInfo
- Returns:
- the log folder
- Throws:
ETComException
- in case of a COM exception or when using this method on project executions
-
getResult
public String getResult() throws ETComException
Description copied from interface:ComTestExecutionInfo
Returns the result of the project execution or package execution, depending on which method (TestEnvironment.executeProject(String path)
orTestEnvironment.executePackage(String path)
) has called before. If the test execution has not finished yet, the result equates the test result at calling time.- Specified by:
getResult
in interfaceComTestExecutionInfo
- Returns:
- the current overall test result. One of:
- NONE
- SUCCESS
- FAILED
- ERROR
- Throws:
ETComException
- in case of a COM exception
-
getState
public String getState() throws ETComException
Description copied from interface:ComTestExecutionInfo
Returns the state of the current test execution.- Specified by:
getState
in interfaceComTestExecutionInfo
- Returns:
- the state current test execution. One of:
- IDLE
- RUNNING
- ABORTED
- FINISHED
- Throws:
ETComException
- in case of a COM exception
-
getReturnValue
public String getReturnValue(String varName) throws ETComException
Description copied from interface:ComTestExecutionInfo
Returns the final value of a package variable.- Specified by:
getReturnValue
in interfaceComTestExecutionInfo
- Parameters:
varName
- the variable name- Returns:
- the final variable value
- Throws:
ETComException
- in case of a COM exception
-
-