This is a technical metric for measuring whether the C/C ++ unit testing tool is competent for the actual project based on years of experience. It is for the reference of friends who need to evaluate the unit testing tool.
1. Automatic isolation test target
A. You can set the specified file as the test target based on the test task;
B. For files that are not tested but may be heavily dependent, you can set them to call the actual code;
C. automatically generate a pile of code for files that do not belong to a and B.
2. automatically generate test code
A. automatically generate test files and code frameworks required for testing;
B. automatically generate test classes and test functions for each class and function;
C. You can generate the corresponding Input and Output code based on the specified data.
3. Automatic table formatting
A. You can double-click or perform similar operations to move data to a table;
B. You can create, delete, and edit Use Cases in tables.
4. Solve testability Problems
A. You can directly set the return value of the underlying function, the value of the output parameter, and the value of the global variable modified by the underlying function in the use case;
B. You can set the value of a local variable in the use case;
C. The data set by A and B can be moved to the table and edited and managed with other data;
D. Check whether the calculation result of the local variable meets the expectation.
5. White Box coverage
A. automatically calculates the following coverage rates: statement coverage, condition coverage, branch coverage, C/DC, MC/DC, and path coverage.
B. unoverwritten logical unit labels are clear: unoverwritten statements, condition values, judgment values, MC/DC are marked in the Code; the logical structure of the program is automatically drawn, indicates the branch and path that are not covered.
C. provides the function to help identify missing use cases. For example, for a specified uncovered unit, the system automatically calculates the most recent use cases from the existing use cases and provides modification tips or similar functions, to solve the problem that it is difficult to achieve high-standard coverage.
6. Automatic Use Cases
A. automatically generate a boundary test case to detect extreme errors such as crashes and timeouts.
7. Test report
A. the test report is automatically generated;
B. the test report should include the following content: coverage data of all functions; Use Case code, input and expected output of each use case, actual output of each use case, and case reporting error.
8. support development and testing to improve development efficiency
A. When the product code is modified, the test code is synchronously updated and the test is automatically executed;
B. The test results intuitively describe program behavior: What is input, what code is executed under the input, and what output is generated.