Contenido principal

Importing External C/C++ Tests

Import C/C++ tests authored using GoogleTest or another external test authoring framework

You can import tests authored using GoogleTest or another external test authoring framework into a Polyspace Platform project. 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 with tests authored using Polyspace Test.

Polyspace Options

expand all

External test foldersAdd external test folders to Polyspace Platform project (Since R2024a)
External test filesAdd external test files to Polyspace Platform project (Since R2024a)
Include paths for external testsSpecify paths to folders containing include files for external tests (Since R2023b)
Library paths for external testsSpecify folders containing precompiled libraries for building external tests (Since R2023b)
Libraries for external testsSpecify precompiled libraries for building external tests (Since R2023b)
Use GoogleTestEnable default support for GoogleTest tests (Since R2024b)
Use GoogleTest with non-default optionsEnable support for GoogleTest tests that require additional flags for test execution (Since R2024b)
Use generic test frameworkEnable support for external test frameworks other than GoogleTest (Since R2024b)
Test output optionsSpecify command-line flag for external test output file path (Since R2024b)
Additional optionsSpecify command-line flags for external test execution (except flags for test output path) (Since R2024b)
Specify test output file explicitlyIndicate that you want to specify output path of test execution explicitly (Since R2024b)
Test output fileSpecify test output file name and path (Since R2024b)
Output file is in XML formatSpecify that results of external test execution are in XML format (Since R2024b)
Output file is not in XML formatSpecify that results of external test execution are not in XML format (Since R2024b)
XML file uses Pst-xUnit formatSpecify that external test results use the same XML format as Polyspace Test results (Since R2024b)
Transform output using XSLTConvert external test results to Polyspace Test result format using XSLT transformations (Since R2024b)
XSLT FileSpecify XSLT file for transforming external test results to Polyspace Test result format (Since R2024b)
Transform output using command lineConvert external test results to Polyspace Test result format using command (Since R2024b)
Command lineSpecify command for transforming external test results to Polyspace Test result format (Since R2024b)

Topics

GoogleTest

Generic External Tests

Troubleshooting

Troubleshoot Building GoogleTest Tests from Polyspace Platform Projects

Troubleshoot build errors when building GoogleTest tests in a Polyspace Platform project.