Use GoogleTest
Enable default support for GoogleTest tests
Since R2024b
Description
Enable support for GoogleTest 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
When you create a Polyspace Platform project, this option is selected by default. This means that you can:
Import any existing C++ test authored using the GoogleTest framework into a Polyspace Platform project.
Build these tests along with any other test you might have added 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.
Collect code coverage with respect to all tests in your project including GoogleTest tests.
For more information on the workflow, see Run GoogleTest Tests Using Polyspace Platform Projects.
Settings
On (default)You can build and run GoogleTest tests in a Polyspace Platform project along with tests authored using Polyspace Test. When you run GoogleTest tests imported in a Polyspace Platform project, the tests are executed without any additional command-line flags.
You can review the results of test execution in the Polyspace Platform user interface, just as you would review results of tests authored using Polyspace Test.
OffDisabling this option indicates that the default support for GoogleTest is not sufficient to cover your existing external tests. You might want to import external tests using one of these frameworks:
GoogleTest tests, that require additional command-line flags for test execution.
In this case, enable the option
Use GoogleTest with non-default options, and then specify command-line flags for test execution.Tests written using an xUnit framework other than Polyspace Test or GoogleTest.
In this case, enable the option
Use generic test framework, and then specify command-line flags for test execution and provide more information on the test result format.
Version History
Introduced in R2024b