复杂测试
在 Polyspace 平台用户界面中,您可以编写调用一个函数的简单测试,并测试该函数的行为是否符合预期。您还可以编写更复杂的测试,例如:
调用一系列函数的测试(多步骤测试)。
使用不同输入多次调用同一函数的测试(参数化测试)。
如果源代码中的某个函数不支持图形化测试编写,您仍然可以在图形化测试内通过 C/C++ 脚本测试该函数。
主题
- Write Multistep Tests in Polyspace Platform User Interface
Write tests with multiple steps, carry over global variables values from one step to the next.
- Run Same Test with Different Inputs in Polyspace Platform User Interface
Iterate test inputs through test data arrays keeping function call sequence fixed.
- Test C/C++ Functions by Using Scripts in Graphical Tests
Enter scripted steps to invoke unsupported functions but add step inputs and assessments graphically.
- Test C++ Member Functions in Polyspace Platform User Interface
Instantiate object in graphical tests and invoke member functions using the object.
- Test C++ Member Functions of Classes with Non-Default Initialization
This example shows how to author graphical tests for C++ member functions when the class default constructor does not initialize all data members.
- C/C++ Test Authoring Tips and Tricks
See how to author C/C++ tests more efficiently in the Polyspace® Platform user interface.