polyspace.project.OwnedTestConfiguration Class
Namespace: polyspace.project
(Python) Testing and profiling configurations attached to specific project
Since R2024a
Description
The properties of the polyspace.project.OwnedTestConfiguration class
contain the testing and profiling configuration options attached to a specific Polyspace® Platform project. These object properties correspond to the options related to
code profiling in Polyspace
Test™. See Code Profiling in Polyspace Platform User Interface.
To create modular projects, where project components like configurations and graphical
tests are saved in separate files, consider using external configurations. An external
configuration is a build, static analysis, or testing and profiling configuration that is
saved in a separate .pscfg file that is referenced by the project. To work
with external testing and profiling configurations in the Polyspace
Python® API see polyspace.project.TestConfigurationRef and polyspace.project.TestConfiguration. For more information about project structure,
see Modularize Project by Using External Configurations, Test References, and External Stub Files.
Creation
Syntax
Description
Create Testing and Profiling Configuration
testConfig = proj.TestConfigurations.create(
creates a new configName)polyspace.project.OwnedTestConfiguration object with the
Name property set to configName and all other
properties set to their default values. The resulting testConfig
object is attached to the polyspace.project.Project object proj.
Load Testing and Profiling Configuration
testConfig = proj.TestConfigurations[
loads the existing configName]polyspace.project.OwnedTestConfiguration object with
the Name property set to configName from the
polyspace.project.Project object proj.
Create Copy of Testing and Profiling Configuration
testConfig = proj.TestConfigurations.createFrom(
creates a new existingConfigObj)polyspace.project.OwnedTestConfiguration object by copying
an existing owned test configuration existingConfigObj and attaches
this copied object to the polyspace.project.Project object
proj. To assign a unique name to testConfig,
Polyspace uses the Name property of
existingConfigObj and appends the next available numeric
suffix.
testConfig = proj.TestConfigurations.createFrom(
creates a new existingConfigObj, configName)polyspace.project.OwnedTestConfiguration object by copying
an existing owned test configuration existingConfigObj and attaches
this copied object to the polyspace.project.Project object
proj. Use the configName argument to set the
Name property of the resulting object.
testConfig = proj.TestConfigurations.createFrom(
creates a new existingConfigFile)polyspace.project.OwnedTestConfiguration object by copying
the testing and profiling configuration defined in the file
existingConfigFile.pscfg and attaches this object to the
polyspace.project.Project object proj.
testConfig = proj.TestConfigurations.createFrom(
creates a new existingConfigFile, configName)polyspace.project.OwnedTestConfiguration object by copying
the testing and profiling configuration saved in the file
existingConfigFile.pscfg and attaches this object to the
polyspace.project.Project object proj. Use the
configName argument to set the Name property
of the resulting object.
Convert Testing and Profiling Configuration
testConfig = proj.TestConfigurations.moveAsOwned(
converts the testing and profiling configuration that the project
existingConfigRefObj)proj references through existingConfigRefObj
to a polyspace.project.OwnedTestConfiguration object and removes
existingConfigRefObj from the project.