主要内容

Polyspace xUnit test folders

Add Polyspace xUnit test folders to Polyspace Platform project

Since R2024a

Description

Add folders containing C/C++ xUnit tests to a Polyspace Platform project or see xUnit test folders 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 folder paths for this option on the Project tab.

Why Use This Option

You typically need this option to see test folders explicitly added to a project.

In a regular workflow, you might be adding test folders using one of these methods:

  • Option Import Tests > Add Polyspace xUnit Test Folder on the Polyspace Platform toolstrip.

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

You see each test folder as a new row listed under the Polyspace xUnit test folder option. The test folder 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 folders by absolute path, or to add test folders using a project or system environment variable. These features are not available when adding folders using the other methods.

Settings

You can add a test folder by absolute or relative path:

  • Select Add folder button to add the absolute path to a test folder.

  • Select Add folder as relative path button to add a test folder relative to the project path.

You can also edit an existing path. Editing an existing path is useful when you use a project variable or a system environment variable as a shorthand in your paths. You can first enter an absolute path using the Add folder button button and replace part of the path with a project variable or system environment variable. For more information, see Project variables.

To remove a test folder, select the corresponding row and click Remove selected button.

Version History

Introduced in R2024a