Execution¶
- class Execution¶
- Clone()¶
Call this method if you want to use API-objects in multiple contexts, e.g. if you want to insert a specific test step in multiple blocks.
- Returns:
A copy of this object
- Return type:
- DisableDefaultRecordingPackage()¶
Disables the default recording configuration.
- DisableDefaultRecordingPackageUseAllGroups()¶
Disables the ‘Always use signal groups and signals in test case packages and stimulation package steps’ option.
- DisableErrorRecoveryPkg()¶
Sets that no package shall be executed on FAILED/ERROR/abort.
- DisableGlobalPostconditionPkg()¶
Disables the global postcondition package.
- DisableGlobalPreconditionPkg()¶
Disables the global precondition package.
- EnableDefaultRecordingPackage(packagePath)¶
Sets the package whose recording configuration will be used as default.
- Parameters:
- packagePath : str¶
Path to package.
- EnableDefaultRecordingPackageUseAllGroups()¶
Enables the ‘Always use signal groups and signals in test case packages and stimulation package steps’ option.
- EnableGlobalPostconditionPkg(packagePath)¶
Sets the package that shall be executed as postcondition for every executed package.
- Parameters:
- packagePath : str¶
Path to postcondition-package.
- EnableGlobalPreconditionPkg(packagePath)¶
Sets the package that shall be executed as precondition for every executed package.
- Parameters:
- packagePath : str¶
Path to precondition-package.
- GetDefaultRecordingPackage()¶
Gets the package whose recording configuration will be used as default.
- Returns:
Path to package
- Return type:
str
- GetDefaultRecordingPackageUseAllGroups()¶
Returns the current state of the ‘Always use signal groups and signals in test case packages and stimulation package steps’ option.
- Returns:
True if the option is enabled, False otherwise.
- Return type:
bool
- GetErrorRecoveryPkg()¶
Gets the package that will be executed on FAILED/ERROR/Abort.
- Returns:
Path to package.
- Return type:
str
- GetErrorRecoveryPkgLevel()¶
Gets the conditions under which the error recovery package will be executed
- Returns:
0 = on abort only; 1 = on ERROR and on abort; 2 = on FAILED, ERROR and abort.
- Return type:
int
- GetExecutionBehaviorOnError()¶
Gets the behavior if an error occurs during package execution.
- Returns:
“Continue” or “Abort”
- Return type:
str
- GetGlobalPostconditionPkg()¶
Gets the package that will be executed as postcondition for every executed package.
- Returns:
Path to postcondition-package.
- Return type:
str
- GetGlobalPreconditionPkg()¶
Gets the package that will be executed as precondition for every executed package.
- Returns:
Path to precondition-package.
- Return type:
str
- GetGlobalRetry()¶
Returns the state of the global retry.
- Returns:
Whether or not the global retry is activated
- Return type:
boolean
- GetGlobalRetryCondition()¶
Returns the condition of the global retries. Returns one of the following:
‘SUCCESS’
‘INCONCLUSIVE’
‘ERROR’
‘FAILED’
‘ERROR/FAILED’
‘ERROR/FAILED/INCONCLUSIVE’
- Returns:
The condition of the global retry
- Return type:
str
- GetGlobalRetryCount()¶
Returns the number of the global retries.
- Returns:
Number of the global retries
- Return type:
integer
- GetRestoreAfterUserConfirmation()¶
Gets the state of restoring test quantities after user confirmation.
- Returns:
State of restoring test quantities after user confirmation.
- Return type:
bool
- GetRestoreTestQuantitiesMode()¶
Returns the mode with which the test quantities will be restored after test execution.
- Returns:
The restore mode. Possible values are “NEVER”, “ALWAYS”, “PORTS”
- Return type:
str
- GetRestoreTestQuantitiesPorts()¶
Returns the ports whose test quantities will be restored after test execution if the restoration mode is set to “PORTS”. Use
SetRestoreTestQuantitiesMode()to configure the restoration mode.- Returns:
The list of ports whose test quantities will be restored after test execution.
- Return type:
list[str]
- GetSimulationMode()¶
Returns the simulation mode to be used when the configuration is started. The simulation mode might either be ‘AUTO’, ‘STEPWISE’ or ‘CONTINUOUS’.
- Returns:
The simulation mode
- Return type:
str
- GetTimeSource()¶
Returns the configured value for the time source to be used when the configuration is started. The time source might either be ‘AUTO’, ‘REALTIME’ or a port name.
- Returns:
The time source
- Return type:
str
- GetWaitTimeAfterIOTeststep()¶
Gets the wait time after every every I/O test step in ms.
- Returns:
Wait time in ms
- Return type:
float
- SetErrorRecoveryPkg(pkg)¶
Sets the package that shall be executed on FAILED/ERROR/abort. See also
SetErrorRecoveryPkgLevel()- Parameters:
- pkg : str¶
Path to package
- SetErrorRecoveryPkgLevel(level)¶
Sets the conditions under which the error recovery package will be executed
- Parameters:
- level : int¶
0 = on abort only
1 = on ERROR and on abort
2 = on FAILED, ERROR and abort.
- SetExecutionBehaviorOnError(errorHandling)¶
Sets the behavior if an error occurs during package execution.
- Parameters:
- errorHandling : str¶
“Continue” or “Abort”
- SetGlobalRetry(globalRetry)¶
Sets the state of the global retry.
- Parameters:
- globalRetry : boolean¶
Whether or not the global retry is activated
- SetGlobalRetryCondition(condition)¶
Sets the condition of the global retry. Must be one of the following:
‘SUCCESS’
‘INCONCLUSIVE’
‘ERROR’
‘FAILED’
‘ERROR/FAILED’
‘ERROR/FAILED/INCONCLUSIVE’
- Parameters:
- condition : str¶
The condition of the global retry
- SetGlobalRetryCount(count)¶
Sets the number of the global retries.
- Parameters:
- count : integer¶
Number of the global retries
- SetRestoreAfterUserConfirmation(confirmationState)¶
Enable or disable the option to restore test quantities only after user confirmation. The state of “RestoreTestQuantitiesMode” will be automatically set to “ALWAYS” if it was set to “NEVER” before calling this method.
- Parameters:
- confirmationState : bool¶
State of restoring test quantities after user confirmation.
- SetRestoreTestQuantitiesMode(mode)¶
Sets the mode with which the test quantities will be restored after test execution. With the modes “ALWAYS” and “NEVER” the automatic restoration can be turned on or off for all test quantities. With the mode “PORTS” only test quantities of specific ports will be restored. Use
SetRestoreTestQuantitiesPorts()to configure the ports whose test quantities should be reset.- Parameters:
- mode : str¶
The mode for restoring test quantities. Possible values: “NEVER”, “ALWAYS”, “PORTS”
- SetRestoreTestQuantitiesPorts(ports)¶
Sets the list of ports whose test quantities will be restored after test execution if the restoration mode is set to “PORTS”. Use
SetRestoreTestQuantitiesMode()to configure the restoration mode.- Parameters:
- ports : list[str]¶
The list of ports whose test quantities should be restored after test execution.
- SetSimulationMode(simulationMode)¶
Sets the simulation mode to be used when starting the configuration. Valid values for the simulation mode are ‘AUTO’, ‘STEPWISE’ and ‘CONTINUOUS’.
- Parameters:
- simulationMode : str¶
The simulation mode
- SetTimeSource(timeSource)¶
Sets the time source to be used when starting the configuration. The time source might either be ‘AUTO’, ‘REALTIME’ or a port name.
- Attention:
The timeSource argument will not be validated. Setting a port name that is not connected in the TCF will not cause an Exception here, but when saving the TCF later on.
- Parameters:
- timeSource : str¶
The time source