ProjectFolder

class ProjectFolder

Returned by

GlobalConstants

Returns access to the global constants specified on the project component.

Returns:

Global constants interface of the project component

Return type:

GlobalConstants

MappingFiles

Returns access to the mapping file list

Returns:

Mapping file list object

Return type:

MappingFiles

PackageParameters

Returns access to the package parameters specified on the project component.

Returns:

Package parameters interface of the project component

Return type:

PackageParameters

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.

AppendComponent(component)

Adds a previously created component at the end of the folder.

Parameters:
component

The project component to be appended

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:

ProjectFolder

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.

GetComponents()

Returns all direct children of the folder.

Returns:

List with all children components

Return type:

list[ProjectComponent]

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 executed

This 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:

ProjectComponent

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

HasComponents()

Returns whether the folder has children.

Returns:

True if there are children, False otherwise.

Return type:

boolean

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

InsertComponent(component, index)

Inserts a previously created component into the folder at the given index.

Parameters:
component

The project component to be inserted

index : int

Zero based index to insert the project component

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

RemoveComponent(component)

Removes a component from the folder.

Parameters:
component

The project component to be removed

Raises:

ApiError – When the given component is not part of the project

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 executed

This 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

SetName(name)

Sets the name of the project component.

Parameters:
name : str

Name of the component

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.

GetPosition()

Returns the position in the parent project.

Returns:

parent position

Return type:

int

Deprecated since version 2024.4: Please use method GetLineNo instead.