Skip to content

vscode fine tune

Olga Naumenko edited this page May 17, 2023 · 3 revisions

Fine-tune test generation

You have already configured some settings with the UTBot: Quickstart wizard, and you may change them later. You can also adjust additional settings for your testing purposes.

Go to File > Preferences > Settings and navigate to Extensions > UnitTestBot.

Adjust the settings, if necessary:

Setting Default value Comments
Deployment
UTBot Host 127.0.0.1 Your host name or IP address.
UTBot Port 2121 The port used by the client to connect to a server via a gRPC channel.
Remote Path The relative path to your project on the server host.
Paths
Build Directory build Contains compile_commands.json and link_commands.json.
CMake options -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_EXPORT_LINK_COMMANDS=ON
Options passed to CMake command to automatically build your project.
Source Directories Relative paths to the projects you would like to generate tests for.
Test Directory tests Relative path to a directory to store your test code.
Test Generation
Generate for Static Functions True Set to True to generate tests for the C static functions.
Verbose formatting False Set to True to generate structured tests with more detail.
Error Mode Failing Failing error tests fail then run.
Passing error tests pass the checks.
Stubs
Use Stubs False Set to True to use autogenerated stubs.
Visual
Show Test Results True Set to True to display the results of test runs on the left side of the test headers.
Set to False if you use a separate test run extension for Visual Studio Code.
Advanced
Enable Developer Mode False Enable hidden developer commands useful for debug.
Use Deterministic Searcher False Use deterministic searcher to traverse bitcode in the same way every time.
It may significantly slow down test generation.
Timeout Per Function (s) 30 Set timeout to generate tests for a given function.
Set to 0 to disable it.
Timeout Per Test (s) 0 To prevent hanging tests, set timeout to run a single test. As soon as timeout exceeds,
the test is automatically cancelled. Set to 0 to disable it.
Clone this wiki locally