Polyspace xUnit test files
Add Polyspace xUnit test files to Polyspace Platform project
Since R2024a
Description
Add files containing C/C++ xUnit tests to a Polyspace Platform project or see xUnit test files explicitly added to the project. An xUnit test is a test written using the Polyspace® Test C/C++ xUnit API. For more information on the API, see Test Authoring Using C/C++ xUnit API.
Set Option
In your Polyspace Platform project configuration, enter file paths for this option on the Project tab.
Why Use This Option
You typically need this option to see test files explicitly added to a project.
In a regular workflow, you might be adding test files using one of these methods:
Option Import Tests > Add Polyspace xUnit Test Files on the Polyspace Platform toolstrip.
Right-click option Add Polyspace xUnit Test Files on the root node of a Polyspace Platform project.
You see each test file as a new row listed under the Polyspace xUnit test files option. The test file path is added relative to the project path. For more information, see Add C/C++ xUnit Tests to Projects in Polyspace Platform User Interface.
You can also use this option to add test files by absolute path, or to add test files using a project or system environment variable. These features are not available when adding files using the other methods.
Settings
Specify Polyspace xUnit test files by absolute or relative path.
Add the absolute path to a test file by clicking the Add file button
.Add the relative path to a test file by clicking the Add file as relative path button
.Add multiple test files by clicking the Add/edit multiple rows button
. Then, type or paste one path per line in the
Add/edit multiple rows dialog box. Leading and trailing spaces
are trimmed, and empty lines are ignored.
You can also edit existing paths. Editing existing paths is useful when you use
a project variable or a system environment variable as a shorthand in your paths. After
entering an absolute path using the Add file button
, replace part of the path with a project variable or system
environment variable. Alternatively, use the Add/edit multiple rows button
to edit multiple rows at once. For more information, see
Project variables.
To remove a test file, select the corresponding row and click the Remove selected button
.
Version History
Introduced in R2024a