API for Packages¶
Part of the Object based program API.
- class PackageApi¶
API to access Packages
Returned by
- ExpectationApi¶
Returns the ExpectationApi namespace.
- Returns:
ExpectationApi namespace
- Return type:
- ExpressionApi¶
Returns the ExpressionApi namespace.
- Returns:
ExpressionApi namespace
- Return type:
- MappingApi¶
Returns the MappingApi namespace.
- Returns:
MappingApi namespace
- Return type:
- SignalRecordingApi¶
Returns the SignalRecordingApi namespace.
- Returns:
SignalRecordingApi namespace
- Return type:
- TestStepApi¶
Returns the TestStepApi namespace.
- Returns:
TestStepApi namespace
- Return type:
- TraceAnalysisApi¶
Returns the TraceAnalysisApi namespace.
- Returns:
TraceAnalysisApi namespace
- Return type:
- VariableApi¶
Returns the VariableApi namespace.
- Returns:
VariableApi namespace
- Return type:
- CreateAnalysisPackage()¶
Creates a new analysis package.
- Returns:
New empty analysis package
- Return type:
- GetAnalysisPackageByTestManagementId(testManagementId)¶
Returns an existing analysis package holding the given test management id or None, if no matching analysis package exists in the workspace. If found, the analysis package will be opened.
- Parameters:
- testManagementId : str¶
The test management id identifying the analysis package
- Returns:
the analysis package or None, if no matching item exists within the workspace
- Return type:
- GetAnalysisPackageChanges(oldPackage, newPackage)¶
Get the changes that exist between two given analysis packages.
- GetAnalysisPackagePathsByTestscriptId(testscriptId)¶
Returns paths of packages which holding the given test script id.
- Parameters:
- testscriptId : str¶
The test management id identifying the package
- Returns:
list of file paths
- Return type:
list[str]
- GetChanges(oldPackage, newPackage)¶
Get the changes that exist between two given packages.
- GetPackageByTestManagementId(testManagementId)¶
Returns an existing package holding the given test management id or None, if no matching package exists in the workspace. If found, the package will be opened.
- GetPackagePathsByTestscriptId(testscriptId)¶
Returns paths of packages which holding the given test script id.
- Parameters:
- testscriptId : str¶
The test management id identifying the package
- Returns:
list of file paths
- Return type:
list[str]
- GetTestManagementIdByPath(filename)¶
Returns the test script id for a given Package or Analysis Package filename. If the corresponding item has no id or if it does not exist, an empty string is returned.
- Parameters:
- filename : str¶
Absolute path to the package or analysis package file or relative path in regard to the package directory
- Returns:
The test script id of an empty string
- Return type:
str
- OpenAnalysisPackage(filename)¶
Opens an existing analysis package. The analysis package may not be opened in ecu.test.
- Parameters:
- filename : str¶
Absolute path to the analysis package file or relative path in regard to the package directory
- Returns:
Existing package
- Return type:
-
SearchAnalysisPackages(searchCriteria, useExtendedMode=
False)¶ - Searches the current workspace and library workspaces for analysis packages matching
the given search criteria.
- Parameters:
- searchCriteria : str¶
The search criteria expressed in the ecu.test filter syntax. See section “Handling” => “Filter” of the ecu.test User Documentation.
- useExtendedMode : boolean¶
If True, extended search strings are enabled. The default is False, meaning each word in the searchCriteria will be enclosed by wildcards and mapped to the filename. (e.g. “hello world” => “Name = ‘*hello*’ and Name = ‘*world*’”)
- Returns:
All matching analysis packages. If no item matches, an empty list is returned.
- Return type:
list[
AnalysisPackage]- Raises:
ApiError – If the searchCriteria has an illegal syntax.
-
SearchPackages(searchCriteria, useExtendedMode=
False)¶ Searches the current workspace and library workspaces for packages matching the given search criteria.
- Parameters:
- searchCriteria : str¶
The search criteria expressed in the ecu.test filter syntax. See section “Handling” => “Filter” of the ecu.test User Documentation.
- useExtendedMode : boolean¶
If True, extended search strings are enabled. The default is False, meaning each word in the searchCriteria will be enclosed by wildcards and mapped to the filename. (e.g. “hello world” => “Name = ‘*hello*’ and Name = ‘*world*’”)
- Returns:
All matching packages. If no package matches, an empty list is returned.
- Return type:
list[
Package]- Raises:
ApiError – If the searchCriteria has an illegal syntax.