Contenuto principale

External test files

Add external test files to Polyspace Platform project

Since R2024a

Description

Add files containing external C/C++ tests to a Polyspace Platform project or see external test files explicitly added to the project. An external test is a test authored using a framework other than the Polyspace® Test™ API, for instance, GoogleTest.

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 External Test Files on the Polyspace Platform toolstrip.

  • Right-click option Add External Test Files on the root node of a Polyspace Platform project.

You see each test file as a new row listed under the External test files option. The test file path is added relative to the project path. For more information, see Run GoogleTest Tests Using Polyspace Platform Projects.

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 external test files by absolute or relative path.

  • Add the absolute path to an external test file by clicking the Add file button .

  • Add the relative path to an external test file by clicking the Add file as relative path button .

  • Add multiple external 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