TestBenchConfiguration

class TestBenchConfiguration

Returned by

CreateToolHost(toolHostUrl)

Creates a new tool host with the given URL. E.g.:

  • ‘local’

  • ‘tsp:127.0.0.1:5017’

  • ‘tsp:hostname:5017’

Parameters:
toolHostUrl : str

The URL of the created tool host

Returns:

The newly created tool host object

Return type:

ToolHost

GetFilename()

Returns the absolute path to the test bench configuration file. If empty, the file has not been saved yet.

Returns:

filename with extension

Return type:

str

GetPort(portId)

Returns the port with the given portId.

Parameters:
portId : str

Name of the port

Returns:

The port object.

Return type:

Port

Raises:

ApiError – If there is no port with this Id.

GetTool(toolId)

Returns the tool with the given toolId.

Parameters:
toolId : str

ID of the tool

Returns:

The tool object.

Return type:

Tool

Raises:

ApiError – If there is no tool with this Id.

GetToolHost(url)

Returns the tool host with the given URL.

Parameters:
url : str

URL of the tool host

Returns:

The tool host object.

Return type:

ToolHost

Raises:

ApiError – If there is no host using this URL.

GetToolHosts()

Returns a list of all tool hosts belonging to this testbench configuration.

Returns:

The list of all tool host objects

Return type:

list[ToolHost]

Refresh()

Refreshes all hosts, tools and ports in the configuration

RemoveToolHost(toolHost)

Removes the tool host and all configured tools and ports connected to it.

Parameters:
toolHost

The tool host object to be removed

Save(filename=None)

Saves the test bench configuration. Appends file ending if needed.

Parameters:
filename : str

The file name used for storing the test bench configuration file; Either absolute or relative to the ‘Configuration’ directory. Leave out to save the configuration to its existing file (from a previous call of Save() or from ConfigurationApi.OpenTestBenchConfiguration())