-
Notifications
You must be signed in to change notification settings - Fork 27
vscode get use of results
You can read the resulting tests, run them, and view coverage. The SARIF reports are also available.
You can find the resulting tests in the default tests
directory unless you have
changed it manually.
Test names look like test_%filename%.cpp
.
Tests are grouped into regression or error regions with the passing or failing tests correspondingly.
Regression region:
Error region:
Test structure follows the Google Test format.
According to settings, tests may have short or verbose descriptions:
- Verbose descriptions include parameter declarations, expected and actual values, and the function call (as in the examples above).
- Short descriptions are concise checks suitable for utility functions with many branches to cover (see below).
To run the given test right from the Editor, use the Run Test With Coverage CodeLens above it.
To run all the tests in the file, use the Run Tests With Coverage CodeLens located above namespace UTBot
.
You can also go to View > Command Palette... and enter Run All Tests and Show Coverage.
After the test run, the line coverage information appears in the Visual Studio Code gutter near the source code:
- green — covered
- yellow — partially covered
- red — uncovered
If the Show Test Results setting is activated, UnitTestBot C/C++ displays the test run results near the test headers. The green dots mark the passing tests, while the red triangles mark the failing tests.
You can find the SARIF reports in the utbot_report
directory.
SARIF is the Static Analysis Results Interchange Format — a standard, JSON-based format for the output of static analysis tools. For more information, please refer to SARIF Tutorials.
To get the most out of the .sarif
files right in Visual Studio Code, install the
SARIF Viewer.