ProjectCall¶
- class ProjectCall¶
Returned by
- ActivateAbortOnSubprojectAbort()¶
Activates abort of whole project on abort of subprojects.
- ActivateAutomaticValueRestore()¶
Activates value restore of test quantities after the execution of every Package.
- ActivateIndependentSubprojectExecution()¶
Activates independent execution of subprojects.
- 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:
- DeactivateAbortOnSubprojectAbort()¶
Deactivate abort of whole project on abort of subprojects.
- DeactivateAutomaticValueRestore()¶
Deactivate value restore of test quantities after the execution of every Package.
- DeactivateIndependentSubprojectExecution()¶
Deactivate independent execution of subprojects.
- GetAbsolutePath()¶
Returns the absolute path to referenced project.
- Returns:
absolute path to referenced project
- Return type:
str
- GetCustomRetryCondition()¶
Returns the condition of the custom retries. Returns one of the following:
‘ERROR’
‘FAILED’
‘ERROR/FAILED’
- Returns:
The condition of the custom retry
- Return type:
str
- GetCustomRetryCount()¶
Returns the number of the retries defined on the project component.
- Returns:
Number of the custom retries
- Return type:
integer
- GetErrorRecoveryPkgLevel()¶
Returns the conditions under which the error recovery package (configured via
SetErrorRecoveryPkgPath()) will be executedThis overrides settings from the parent element or from the test configuration.
- Returns:
-1 = disabled
0 = on abort only
1 = on ERROR and on abort
2 = on FAILED, ERROR and abort.
None: use inherited setting from parent element or test configuration
- Return type:
int
- GetErrorRecoveryPkgPath()¶
Returns the path of the error recovery Package to be executed upon abort of test execution or ERROR/FAILED, if this element has a custom setting which overrides inherited settings from the parent element or from the test configuration.
see also
GetErrorRecoveryPkgLevel()- Returns:
Absolute path to Package file; None if inherited or explicitly disabled
- Return type:
str
- GetIndex()¶
Returns the zero based index in the parent.
- Returns:
Zero based index
- Return type:
int
- GetLineNo()¶
Returns the line number within its project.
- Returns:
Line number
- Return type:
int
- GetName()¶
Returns the name of the project component.
- Returns:
Name of the component
- Return type:
str
- GetParent()¶
Returns the parent project component.
- Returns:
Parent component
- Return type:
- GetProject()¶
Returns the referenced project.
- Returns:
Referenced project
- Return type:
- Raises:
ApiError – If the referenced project file (*.prj) does not exist.
- GetProjectRelativePath()¶
Returns the path of the referenced project, relative to its containing project.
The returned path is a relative path, its base is the folder where the calling project is located.
- Returns:
File name with relative path of the project to be called.
- Return type:
str
- Raises:
ProjectNotSavedError – If this method is called before project is saved.
- GetRandomExecutionOrderState()¶
Returns the random execution state of this container.
- Returns:
True if activated, False if deactivated or None if it is inherit from parent.
- Return type:
boolean
- GetType()¶
- Returns the type (class name) of the project component, e.g.
“ConfigChange”
“ParameterSet”
“PackageCall”
“Project”
“PackageGenerator”
- Returns:
Type (class name) of the project component
- Return type:
str
- HasCustomErrorRecoveryPackageSettings()¶
Returns whether the Package execution settings in case of test abort or ERROR/FAILED of the parent element are overridden
- Returns:
True if this element has custom error recovery package settings that override the parent element’s settings or those from the test configuration
- Return type:
boolean
- HasCustomRestoreSettings()¶
Returns if the value restore settings of the parent element are used or overridden by custom settings
- Returns:
True if custom settings used, False if parent settings used
- Return type:
boolean
- HasCustomRetrySettings()¶
Returns if the retry settings of the parent element are used
- Returns:
True if parent settings used, False if custom settings defined
- Return type:
boolean
- HasCustomSubprojectAbortSettings()¶
Returns if the subprojects abort settings of the parent element are used or overridden by custom settings
- Returns:
True if custom settings used, False if parent settings used
- Return type:
boolean
- HasCustomSubprojectExecutionSettings()¶
Returns if the subprojects execution settings of the parent element are used or overridden by custom settings
- Returns:
True if custom settings used, False if parent settings used
- Return type:
boolean
- IsAbortOnSubprojectAbortActivated()¶
Returns if the abort of whole project on abort of subprojects is activated
- Returns:
True if activated, else False
- Return type:
boolean
- IsAbortOnSubprojectAbortDeactivated()¶
Returns if abort of whole project on abort of subprojects is deactivated
- Returns:
True if deactivated, else False
- Return type:
boolean
- IsAutomaticValueRestoreActivated()¶
Returns if the automatic value restore is activated
- Returns:
True if activated, else False
- Return type:
boolean
- IsAutomaticValueRestoreDeactivated()¶
Returns if the automatic value restore is deactivated
- Returns:
True if deactivated, else False
- Return type:
boolean
- IsEnabled()¶
Returns the state of the test step.
- Returns:
True if test step is enabled, otherwise False
- Return type:
bool
- IsIndependentSubprojectExecutionActivated()¶
Returns if the independent execution of subprojects is activated
- Returns:
True if activated, else False
- Return type:
boolean
- IsIndependentSubprojectExecutionDeactivated()¶
Returns if the independent execution of subprojects is deactivated
- Returns:
True if deactivated, else False
- Return type:
boolean
- IsReported()¶
Returns whether the test step will be reported. If it has a parent test step, this function will only return true if both this test step and the parent test step should be reported.
- Returns:
True if test step will be reported, otherwise False
- Return type:
bool
- RemoveFromProject()¶
Removes this component from the project.
- Raises:
ApiError – if the component is not part of any project
- SetCustomRetryCondition(condition)¶
Sets the condition of the custom retry. Must be one of the following:
‘ERROR’
‘FAILED’
‘ERROR/FAILED’
- Parameters:
- condition : str¶
The condition of the custom retry
- SetCustomRetryCount(count)¶
Sets the number of the retries for all Packages within the project component.
- Parameters:
- count : integer¶
Number of the custom retries
-
SetEnabled(state=
True)¶ Enable or disable the test step.
- Parameters:
- state : bool¶
True (=Default) to enable, False to disable the test step.
- SetErrorRecoveryPkgLevel(level)¶
Sets the conditions under which the error recovery package (configured via
SetErrorRecoveryPkgPath()) will be executedThis overrides settings from the parent element or from the test configuration.
- Parameters:
- level : int¶
- -1
disabled
0 on abort only
1 on ERROR and on abort
2 on FAILED, ERROR and abort.
- SetErrorRecoveryPkgPath(packagePath)¶
Sets the path for a Package to be executed upon abort of test execution or ERROR/FAILED.
This overrides settings from the parent element or from the test configuration.
See also
SetErrorRecoveryPkgLevel()- Parameters:
- packagePath : str¶
Absolute path to Package file
- SetRandomExecutionState(state)¶
Sets the random execution state of this container.
- Parameters:
- state : boolean¶
True to activate, False to deactivate or None for inheritance from parent.
-
SetReported(state=
True)¶ Enable or disable the reporting of the test step. If it has a parent test step, its reporting must also be enabled in order to have this test step appear in the report.
- Parameters:
- state : bool¶
True (=Default) to enable, False to disable the reporting of the test step.
- UseParentErrorRecoveryPackageSettings()¶
Sets that the Package execution settings in case of test abort or ERROR/FAILED of the parent element are used. Existing custom settings are deleted.
- UseParentRetrySettings()¶
Sets that the retry settings of the parent element are used. Existing custom settings are deleted.
- UseParentSubprojectAbortSettings()¶
Sets that the settings whether to cancel or end the whole project execution on abort of a separately executed subproject of the parent element are used. Existing custom settings are deleted.
- UseParentSubprojectExecutionSettings()¶
Sets that the settings whether to execute subprojects independently of the parent element are used. Existing custom settings are deleted.
- UseParentValueRestoreSettings()¶
Sets that the settings whether to restore the value of test quantities after the execution of every Package of the parent element are used. Existing custom settings are deleted.
- GetPath()¶
Returns the file system path of the referenced project.
If this method returns a relative path, its base is the folder where the calling project is located, just like the path is shown in the project call project step’s dialog.
If this method returns an empty string, the parent project has not been saved yet.
- Returns:
File name with relative path of the project to be called.
- Return type:
str
Deprecated since version 2024.3.0: Use
GetProjectRelativePath()orGetAbsolutePath()instead.