使用现有工具链设置执行测试
使用您自己的工具链编译以 C/C++ 代码编写的测试
如果您使用 Polyspace® Test™ C/C++ xUnit API 编写测试,则可以使用现有工具链设置在您自己的开发环境中编译这些测试。
然后,您可以运行测试可执行文件,视需要添加命令行标志来更改默认行为。例如,您可以仅执行特定套件中的测试,而不是执行所有测试。
系统命令
polyspace-test -monitor | (System Command) Monitor execution of C/C++ xUnit tests and retrieve test and code profiling results |
polyspace-test -convert | (System Command) Convert test or code profiling results to standard Polyspace Test format |
polyspace-test -generate | (System Command) Generate test registration function from a set of Polyspace Test C/C++ test files |
CMake 函数
pstest_add_convert_target | (CMake) Create target for converting test or code profiling results to standard Polyspace Test format |
pstest_add_report_target | (CMake) Generate XML and HTML reports from test or code profiling results |
主题
测试执行
- Execute C/C++ Tests Written Using Polyspace Test xUnit API
Execute all tests or specific suites, display test results in specific format. - 在 Polyspace 平台用户界面中向工程添加 C/C++ xUnit 测试
使用 Polyspace Test xUnit API 编写测试并从 Polyspace 平台用户界面执行这些测试。 - Use CMake to Execute Tests Authored Using Polyspace Test xUnit API
Use Polyspace Test CMake package to manage test execution workflow.
测试结果格式
- Results Format of Tests Written Using Polyspace Test API
View results of test execution in tabular format, Test Anything Protocol (TAP) format, or another format.
- Compare and Display Values for Complex C/C++ Data Types Using Polyspace Test xUnit API
Write custom comparison and display functions for use in Polyspace Test assessment macros.