主要内容

Use generic test framework

Enable support for external test frameworks other than GoogleTest

Since R2024b

Description

Enable support for running external C/C++ tests in the current Polyspace® Platform project.

Set Option

In your Polyspace Platform project configuration, on the Project tab, select the External Tests node and then select this option.

Why Use This Option

If you have existing tests authored in a framework other than Polyspace Test™, you can import them into a Polyspace Platform project while you transition to test authoring using Polyspace Test. Importing external tests allows you to:

  • Build these existing tests along with any new test you add to the project (graphical tests or tests authored using the Polyspace Test xUnit API).

  • Run these tests and review the test results in the Polyspace Platform user interface, just as you would run and review results of tests authored using Polyspace Test.

For more information on the full workflow, see Run GoogleTest Tests Using Polyspace Platform Projects.

Settings

On

You can import external tests written using any testing framework.

If you choose this option, you have to explicitly specify the following:

  • Options to append to the test executable. For more information, see Test output options and Additional options.

  • More information on the test result format, specifically:

    • Whether the format is XML or not.

    • How to convert the results to the XML format supported with Polyspace Test.

    For more information, see Output file is in XML format.

Off (default)

Disabling this option means that your Polyspace Platform project only supports external tests written using GoogleTest. For more information, see:

Version History

Introduced in R2024b