polyspace.project.TestConfigurationRef Class
Namespace: 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 .pscfg file, referenced by a Polyspace® Platform project. Saving your testing and profiling configurations in
.pscfg files and referencing those files from one or more projects
enables you to create a modular project structure that improves sharing and version control
managed 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 .pscfg 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 .pscfg file 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.TestConfigRef object in the same project. After
conversion process, the project references the external configuration saved in
testConfigFile.pscfg. 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.TestConfigRef 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.TestConfigRef object in the same project. After
conversion the project references the external configuration saved in
testConfigFile.pscfg. 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.TestConfigRef object has its
Path property set to testConfigFile and its
Name property is set by the testConfigRefName
argument you provide.
Input Arguments
Properties
Methods
Examples
Version History
Introduced in R2026a