polyspace.project.TestConfigurationRef Class
R2026bNamespace: polyspace.project
(Python) Manage references from project to external testing and profiling configurations
Since R2026a
Description
This Python® class contains information about an external testing and profiling configuration
that is saved in a separate file, referenced by a Polyspace® Platform project. Polyspace supports two file formats for external configurations: the native JSON-based
format (.pscfg) and the human-readable TOML format (.toml.pscfg). Saving your testing and profiling
configurations in external files and referencing those files from one or more projects enables
you to create a modular project structure that improves sharing and version control workflows.
For more information about project structure, see Modularize Project by Using External Configurations, Test References, and External Stub Files.
To work with external testing and profiling configurations, use this class, which contains
the name of the configuration and the path to the external configuration file, together
with the polyspace.project.TestConfiguration class, which contains the testing and profiling
configuration.
To work with testing and profiling configurations that are attached to a specific project,
see polyspace.project.OwnedTestConfiguration.
Creation
Syntax
Description
Import Configuration by Reference
testConfigRef = proj.TestConfigurationRefs.add(
adds a reference from the project to the testing and profiling configuration
testConfig, testConfigRefName)testConfig, which is an existing external configuration file
(.pscfg or .toml.pscfg) or a polyspace.project.TestConfiguration object. The Name
property of the resulting polyspace.project.TestConfigurationRef
object is set to testConfigRefName.
testConfigRef = proj.TestConfigurationRefs.add(
adds a reference from the project to an existing
testConfigRefObj)polyspace.project.TestConfigurationRef object
testConfigRefObj and inherits the configuration name.
testConfigRef = proj.TestConfigurationRefs.add(
adds a reference from the project to an existing
testConfigRefObj, testConfigRefName)polyspace.project.TestConfigurationRef object
testConfigRefObj. Use the testConfigRefName
argument to set the Name property of the resulting
testConfigRef object.
Convert Configuration
testConfigRef = proj.TestConfigurationRefs.moveAsRef(
converts the existing ownedTestConfigObj,testConfigFile)ownedTestConfigObj to a
polyspace.project.TestConfigurationRef object in the same project. After
conversion, the project references the external configuration saved in
testConfigFile. You can specify
testConfigFile as an absolute or relative path, where relative
paths are considered relative to the location of the .psprjx project
file. The resulting polyspace.project.TestConfigurationRef object has its
Path property set to testConfigFile and its
Name property is inherited from the owned testing and profiling
configuration.
testConfigRef = proj.TestConfigurationRefs.moveAsRef(
converts the existing ownedTestConfigObj,testConfigFile, testConfigRefName)ownedTestConfigObj to a
polyspace.project.TestConfigurationRef object in the same project. After
conversion, the project references the external configuration saved in
testConfigFile. You can specify
testConfigFile as an absolute or relative path, where relative
paths are considered relative to the location of the .psprjx project
file. The resulting polyspace.project.TestConfigurationRef object has its
Path property set to testConfigFile and its
Name property is set by the testConfigRefName
argument you provide.
testConfigRef = proj.TestConfigurationRefs.moveAsRef(
converts the existing ownedTestConfigObj,testConfigFile, configFileFormat)ownedTestConfigObj to a
polyspace.project.TestConfigurationRef object in the same project
and saves the external configuration in the format specified by
configFileFormat.
Input Arguments
Properties
Methods
Examples
Version History
Introduced in R2026aSee Also
polyspace.project.Project | polyspace.project.CodeInfo | polyspace.project.TestConfiguration | polyspace.project.OwnedTestConfiguration | polyspace.project.BuildConfigurationRef | polyspace.project.StaticAnalysisConfigurationRef
Topics
- Get Started with Python API for Polyspace
- Create Easily Shareable Projects for Version Control
- Share and Reuse Configuration Variants
- Modularize Project by Using External Configurations, Test References, and External Stub Files
- Modularize Existing Project by Using Polyspace Python API
- Create Project Dynamically by Using Polyspace Python API