-
Notifications
You must be signed in to change notification settings - Fork 27
clion install and configure
To install the plugin from the ZIP file:
- Download a ZIP archive with the release artifact. You can choose the release on GitHub. Unarchive this ZIP file.
- In your CLion, go to File > Settings.
- Select Plugins, click the gear icon and then Install Plugin from Disk.
- In the folder with the unarchived files from the release artifact, select the
clion_plugin.zip
file an and click OK. - On Plugins, click OK to apply the changes and restart your IDE if prompted.
To check if the plugin is enabled, go to File > Settings > Plugins and choose Installed.
Go to File > Open... and select the project to generate tests for.
The UnitTestBot C/C++ server and the client can be installed on the same or on different machines. WSL and Docker also behave differently: WSL automatically forwards the source paths to the server host, while Docker requires establishing an SSH connection.
Choose one of two paths in the wizard to start using UnitTestBot C/C++:
- On the same machine or via WSL
- On different machines or via Docker
To launch the UTBot Quickstart wizard, go to Navigate > Search Everywhere and enter UTBot Quickstart. Click on it.
You can also find the wizard in the Status Bar (lower right): select the UTBot widget and choose Quickstart wizard.
If the UnitTestBot C/C++ server and the client are installed on the same machine, or the server is installed via WSL (without using Docker), make sure the Default server configuration on localhost (or WSL2) checkbox in the wizard is selected.
The default settings are:
-
Host:
localhost
-
Port:
2121
- Remote Path: autofilled
-
Build Directory:
build
-
CMake options:
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_EXPORT_LINK_COMMANDS=ON
Follow the default procedure — press Next until configuration is complete and proceed to generating tests.
If the UnitTestBot C/C++ server and the CLion plugin are installed on different machines, or the server is installed via Docker, you have to use the Deployment feature.
Go to Settings > Build, Execution, Deployment > Deployment.
- On the Connection tab, select the plus sign to create an SFTP connection (
UTBot server
):- For Type, choose SFTP.
- For SSH configuration, select a browse button.
-
In SSH Configurations, enter your information:
-
Host:
127.0.0.1
-
Username:
utbot
-
Port:
5522
- Authentication type: OpenSSH config and authentication agent
-
Host:
- For the Root path, select Autodetect (e.g., you get
/home/utbot
).
- On the Mappings tab, specify the path to your project on the remote machine:
In the Project tool window, right-click on your project root folder, select Deployment > Upload to... and
choose the name of your SFTP configuration (e.g., UTBot server
).
Launch the UTBot Quickstart wizard: go to Navigate > Search Everywhere and enter UTBot Quickstart. Click on it. Make sure the Default server configuration on localhost (or WSL2) checkbox is cleared.
The default settings are:
-
Host:
127.0.0.1
-
Port:
5521
-
Remote Path:
/home/utbot/remote/c-example
-
Build Directory:
build
-
CMake options:
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_EXPORT_LINK_COMMANDS=ON
Follow the default procedure — press Next until configuration is complete.
The UnitTestBot C/C++ plugin builds and configures the project under test automatically — see notifications.