In the [Code-Based Test View], CT executes tests based on user-defined test code and displays the results.
Toolbar menu in the [Code-Based Test View]
Pull-down menu in the [Code-Based Test View]
Menu name | Description |
---|---|
Check Integrity | Check integrity about functions and stubs. Then, reset test if it needs. |
Show Code-Based Tests Macro Guides | Show the guide to using macros in code-based tests. |
External Test Code on Top | Sort external test code on top. |
Coverage Scope | All: Display the coverage summed over the entire scope on the dashboard of the view. Directly Called Functions: Display only the function coverage directly called in the test code on the dashboard of the view. |
Dashboard in [Code-Based Test View]
Search
The [Code-Based Test View] provides search functionality for code-based test files, suites, and test cases by code-based test file name, suite name, test case name, related source file, or status (Success, Failure, Error, or Source File Not Linked).
Status search keyword
In the [Code-Based Test View], CT filters the displayed tests by status keyword. The view provides keyword suggestions and an auto-complete function.
Keyword | Description |
---|---|
%TEST_SUCCESS% |
Test success |
%TEST_FAILURE% %TEST_ERROR% |
Test failure/error |
%TEST_FAILURE% |
Test failure |
%TEST_ERROR% |
Test error |
%TEST_SOURCE_FILE_NOT_LINKED% |
Source file not linked |
Structure of [Code-Based Test View]
[Code-Based Test View] presents the hierarchy structure of [Code-Based Test file] > [Suite] > [Test case]. External test code is displayed identically under [External Tests].
Item icons in [Code-Based Test View]
Item icon | Description |
---|---|
None | Code-Based Test file or External Tests |
Suite | |
Test case |
Item status color in [Code-Based Test View]
The execution information of code-based test files, suites, and test cases in [Code-Based Test View] is represented by colors.
Color | Description |
---|---|
Green | Code-Based Test file/Suite: If the execution result of all the test cases under it is success. Test case: If the result of execution is success. |
Blue | Code-Based Test file/Suite: If only test cases with failure and no test cases with errors exist under it. Test case: If the result of execution is failure. |
Red | Code-Based Test file/Suite: If test cases with error exist under it. Test case: If the result of execution is error. |
Black | Code-Based Test file/Suite: All test cases under it have not been executed. Test case: Not been executed |
Context menu in [Code-Based Test View]
[Code-Based Test View] provides context menu for code-based test file, suite, test case, external test code list.
Context menu of Code-Based Test file
Context menu | Description |
---|---|
Select | Checks the selected file along with all its sub-suites and test cases for execution |
Deselect | Unchecks the selected file along with all its sub-suites and test cases for execution |
Delete | Deletes the selected file along with all its sub-suites and test cases |
Rename | Modifies the file name |
Show In System Explorer | Opens the location of file in system explorer |
Open with VS Code | Opens the file with VS Code |
Open Target Source File | Opens the target source file for testing in [Source Code Editor] |
Change Target Source File… | Changes the target source file for testing |
Generate coverage report | Exports coverage information for the suites and test cases corresponding to the file |
Rename
To rename a file name, use either [Rename…] option from the context menu or F2
shortcut.
The file extension must be .cpp
.
Change Target Source File
You can change the target source file of a code-based test file.
Context menu of Code-Based Test suite
Context menu | Description |
---|---|
Select | Checks the selected suite along with all its test cases for execution |
Deselect | Unchecks the selected suite along with all its test cases for execution |
Generate coverage report | Exports coverage information for the suite and test cases |
Context menu of Code-Based Test test case
Context menu | Description |
---|---|
Select | Checks the test case for execution |
Deselect | Unchecks the test case for execution |
Generate function call flow contents by test case | Generate Function Call Flow Contents by test case |
Show Result Log | Show the result logs of the selected test cases in [Console View] |
Open Host Error Location | Open the error location of the test case where an error occurred |
Debug in VS Code | Debug the test case in VS Code |
Generate coverage report | Exports coverage information for the test case |
Generate function call flow contents by test case
Export the function call information of the selected test case as a .csv
file.
After the export is complete, open the directory to check the function call information.
Open Host Error Location
Open the error location of the test case in [Source Code Editor].
Debug in VS Code
Debug test cases using VS Code.
For detailed instructions, refer to [Debug Guide in VS Code] in the User Guide.
Need more help with this?
Don’t hesitate to contact us here.