It's recommended to perform some smoke checks on UTBot before raising a pull request
Download an archive with build artifacts on a local machine and unpack it into separate folder locally
-
Check folder contains:
utbot_distr.tar.gz
- UTbot binary/dependenciesutbot_plugin.vsix
- UTBot plugin for VSCodeunpack_and_run_utbot.sh
- setup scriptversion.txt
- version file
-
Perform setup on server side:
Move binary and script into a new separate directory
mkdir utbot-release-version
mv utbot_distr.tar.gz utbot-release-version
mv unpack_and_run_utbot.sh utbot-release-version
and run installation script in it
cd utbot-release-version
./unpack_and_run_utbot.sh
Check process is up and running
ps aux | grep utbot | grep port
PID/port 2121 should be found
If no errors and process is up then
-
Perform client setup:
- In local VSCode look for Install from VSIX command, select early downloaded
utbot_plugin.vsix
and install it - "UnitTestBot for C/C++" plugin should be visible in Extensions - For Win: setup SSH remote connection with server- locally installed UTBot plugin should be available in remote mode (no new installation required)
- Open folder with source code, test connection as proposed, click Next and finish setup configuring project
- In local VSCode look for Install from VSIX command, select early downloaded
On a source code project
- For Current Function:
-
Move to any function in the (as example)
file.c
-
Right mouse click → UTBot: Generate Tests... → for Current Function
-
file_test.cpp
is generated -
"Run Tests with Coverage" generates coverage report shown in a source
file.c
-
For Current File:
- Move to any
file2.c
in the project - Right click → UTBot: Generate Tests... → for Current File
-
file2_test.cpp
is generated -
"Run Tests with Coverage" generates coverage report shown in a source file
-
For Current Line:
- Move to any statement line in the
file3.c
- Right click → UTBot: Generate Tests... → for Current Line
-
file3_test.cpp
is generated -
"Run Tests with Coverage" generates coverage report shown in a source file
-
With Prompted Result:
-
Move to any function in the
file4.c
code -
On statement/assert Right click → UTBot: Generate Tests... → with Prompted Result
-
In appeared dialog select condition and enter some number → Press Enter
-
file4_test.cpp
is generated with selected condition on prompted result -
"Run Tests with Coverage" generates coverage report shown in a source file
-
For Folder:
-
In project navigate to folder with several files
-
Right click → UTBot: Generate Tests for Folder
-
Select needed folder → OK