dotCover 2024.2 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. Select ReSharper | Options from the main menu , then choose dotCover | Continuous Testing on the left.

  2. Specify when you need to rerun tests: after saving the solution, after building it, or after applying a shortcut (not assigned by default).

    dotCover: 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 Unit Test Explorer window to create one.

    dotCover: Code coverage in Unit Test Sessions window
  4. In the opened Unit Test Sessions window, select a continuous testing mode for your session. For example, if you want dotCover to autorun tests and get coverage each time you save or build the solution, or apply a shortcut, select Autostart Tests: Cover New and Outdated Tests. Learn more about continuous testing modes.

    dotCover: Selecting continuous testing mode
  5. If you don't have any coverage data or it is outdated for tests in the scope, dotCover will ask you to perform initial coverage analysis.

    dotCover: Initial coverage
  6. Coverage results will be shown in a separate Unit Tests Coverage window.

    dotCover: Continuous testing coverage
  7. That's it! You can start working as usual: change code, build or save (as needed), and see test results in real time.

    dotCover: Continuous testing workflow
  8. To navigate to a failed test, click the test in Continuous Testing Session window or click the number next to the continuous testing icon in the status bar (bottom right corner of the main Visual Studio window).

    dotCover: Continuous testing status icon
Last modified: 17 July 2024