On this page:
Generally, CLion runs and debugs tests in the same way as other applications, by running the run/debug configurations you have created. When doing so, it passes the specified test classes or methods to the test runner.
In many cases, you can initiate a testing session from a context menu. For this purpose, the Run and Debug commands are provided in certain context menus. For example, these commands are available for a test class, directory, or a package in the Project Tool Window. They are also available for a test class or method you are currently working on in the editor.
The tests run in the background, so you can execute several tests at the same time.
Running or debugging a test
To run or debug a test, follow these general steps:
- Using the main toolbar:
- Using a context menu:
- . Click icon to run a single test, or icon to run all tests from the suit (fixture, in case of Google Test): Note: following the first run of a test, the gutter icons indicate the test state: success ( icon) or failed ( icon), as in below example: