主要内容

导入外部 C/C++ 测试

导入使用 GoogleTest 或其他外部测试编写框架编写的 C/C++ 测试

您可以将使用 GoogleTest 或其他外部测试编写框架编写的测试导入 Polyspace 平台工程中。导入外部测试使您可以:

  • 编译这些现有测试以及您添加到工程中的任何新测试(图形化测试或使用 Polyspace® Test™ xUnit API 编写的测试)。

  • 运行这些测试并在 Polyspace 平台用户界面中审查测试结果,就像对使用 Polyspace Test 编写的测试进行这些操作一样。

Polyspace 选项

全部展开

外部测试文件夹Add external test folders to Polyspace Platform project (自 R2024a 起)
外部测试文件Add external test files to Polyspace Platform project (自 R2024a 起)
包括外部测试的路径Specify paths to folders containing include files for external tests (自 R2023b 起)
外部测试的库路径Specify folders containing precompiled libraries for building external tests (自 R2023b 起)
用于外部测试的库Specify precompiled libraries for building external tests (自 R2023b 起)
使用 GoogleTestEnable default support for GoogleTest tests (自 R2024b 起)
使用带非默认选项的 GoogleTestEnable support for GoogleTest tests that require additional flags for test execution (自 R2024b 起)
使用通用测试框架Enable support for external test frameworks other than GoogleTest (自 R2024b 起)
测试输出选项Specify command-line flag for external test output file path (自 R2024b 起)
附加选项Specify command-line flags for external test execution (except flags for test output path) (自 R2024b 起)
显式指定输出文件路径Indicate that you want to specify output path of test execution explicitly (自 R2024b 起)
测试输出文件Specify test output file name and path (自 R2024b 起)
输出文件为 XML 格式Specify that results of external test execution are in XML format (自 R2024b 起)
输出文件不是 XML 格式Specify that results of external test execution are not in XML format (自 R2024b 起)
XML 使用 Pst-xUnit 格式Specify that external test results use the same XML format as Polyspace Test results (自 R2024b 起)
使用 XSLT 转换输出Convert external test results to Polyspace Test result format using XSLT transformations (自 R2024b 起)
XSLT 文件Specify XSLT file for transforming external test results to Polyspace Test result format (自 R2024b 起)
使用命令行转换输出Convert external test results to Polyspace Test result format using command (自 R2024b 起)
命令行Specify command for transforming external test results to Polyspace Test result format (自 R2024b 起)

主题

GoogleTest

通用外部测试

疑难解答

Troubleshoot Building GoogleTest Tests from Polyspace Platform Projects

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