JetBrains Rider 2024.3 Help

Use Continuous Testing

The concept of continuous testing implies that you have actual test results instantly, as soon as you've changed your code. Thus, there's no need to manually rebuild the project and re-run all tests after making changes: the impacted tests are run in the background automatically (the testing session is triggered by some explicit action, for example, saving changes or building the project).

Enable continuous testing in a solution

  1. Press Ctrl+Alt+S or choose File | Settings (Windows and Linux) or JetBrains Rider | Preferences (macOS) from the menu , then choose Build, Execution, Deployment | dotCover | Continuous Testing on the left.

  2. Configure Continuous Testing:

    1. Specify how you want to trigger test runs: by saving the solution, building it, or applying a shortcut. To do this, select the corresponding option in Trigger Continuous Testing on.

    2. Specify Continuous Testing Mode: For example, if you want JetBrains Rider to autorun tests and get coverage each time you save or build the solution or apply a shortcut, select Cover New and Affected Tests. Learn more about continuous testing modes.

    JetBrains Rider: Continuous Testing settings
  3. Create a new unit testing session or open one that has the scope you want to cover by continuous testing. If you don't have any sessions yet, you can use the Tests window to create one.

    Unit test session
  4. In the session tab, enable continuous testing.

    Continuous Testing Session

    This will create a separate Continuous Testing Session.

    Continuous Testing Session
  5. If you don't have any coverage data, or it is outdated for tests in the scope, perform initial coverage analysis, e.g., with the Cover All Tests action.

  6. That's it! You can start working as usual: change code, build or save (to trigger continuous testing), and see test results in real time.

    Coverage results of the Continuous Testing Session will be shown in the Test Coverage window.

    Continuous testing coverage

    If coverage highlighting is enabled, you will see the coverage status of each code line right in the editor.

    Code coverage editor
  7. To quickly turn continuous testing on or off and see the test status, you can use the dotCover icon in the status bar.

    dotCover status icon
Last modified: 17 October 2024