Common

class Common
AddMappingArtifactReference(mappingReference)

Adds an artifact reference to a mapping file to the list.

Parameters:
mappingReference

Artifact reference to a mapping file

AddMappingFile(filePath, namespace=None)

Adds a mapping file to the list.

Parameters:
filePath : str

Path to the mapping file (absolute or relative to parameter directory)

namespace : str

Identifier of the workspace to which a relative filePath is resolved. If not present or None, the namespace is determined automatically. It is also possible to reference a library workspace using its namespace. A relative filePath is resolved relative to the parameters directory of the given namespace. For example, the namespace parameter ‘myLibrary’ results in ‘<libraries.myLibrary.parameters>/MyMapping.xam’.

ClearMappingFiles()

Clears all entries from the mapping file list.

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:

Common

GetMappingArtifactReferences()

Returns artifact references to mapping files.

Returns:

A list of all artifact references

Return type:

list[ArtifactReference]

GetTesterName()

Returns the name of the tester.

Returns:

Name of tester to show in the test configuration file

Return type:

str

GetTesterNameQueryMode()

Returns the query mode of the tester name.

Returns:

The query mode. Will be one of:

  • ’direct input’

  • ’query on tcf start’

  • ’windows name’

  • ’query on test run’

Return type:

str

IsAutoLoadMapping()

Returns whether mapping files are automatically loaded from model directories.

Returns:

True if mapping files are loaded automatically, else False

Return type:

boolean

RemoveMappingArtifactReference(mappingReference)

Removes an artifact reference to a mapping file from the list.

Parameters:
mappingReference

Artifact reference to a mapping file

RemoveMappingFile(index)

Removes a mapping file from the list.

Parameters:
index : int

The index of the mapping file to remove

SetAutoLoadMapping(value)

Decides whether mapping files are automatically loaded from model directories.

Parameters:
value : boolean

True if the mapping files have to be loaded automatically, else False

SetTesterName(testerName)

Sets the name of the tester. Via API only direct input is possible.

Parameters:
testerName : str

Name of tester to show in the test configuration file

SetTesterNameQueryMode(mode)

Sets the query mode of the tester name. The mode must be one of:

  • ‘direct input’

  • ‘query on tcf start’

  • ‘windows name’

  • ‘query on test run’

Parameters:
mode : str

The query mode.

Raises:

ApiError – If the query mode is invalid.

GetMappingFiles()

Returns the mapping file paths, relative to the workspace directory.

Returns:

A list of all mapping files

Return type:

list[str]

Deprecated since version 2024.2: Use GetMappingArtifactReferences() instead