JetBrains Rider 2021.1 Help

Analyze Coverage of Unity Tests

JetBrains Rider comes with bundled coverage analysis tool based on JetBrains dotCover. For more details on coverage analysis, refer to Analyzing Coverage of .NET Code.

Installation and licensing

dotCover is provided as a bundled plugin for Rider, and installed along with Rider automatically with no additional actions needed. If for some reason you want to disable dotCover, you can do this via Rider's Plugins settings.

dotCover is only available in Rider for the owners of dotUltimate or All Products Pack subscriptions.

Important notes

  • To run coverage analysis, your Unity project must have the 'Rider Editor' and 'Test Framework' packages. Version requirements:

    UnityRider EditorTest Framework
    2018.3 – 2019.1anyany
    2019.2 and later1.2.0 or laterany
    Earlier than 1.2.01.1.1 – 1.1.3
  • To run coverage analysis, Unity Editor must be started in the special mode with enabled coverage support.

  • Only edit-mode tests are supported.

How to analyze coverage of Unity tests

  1. Open your Unity solution in Rider.

  2. On the Unity toolbar, choose Start Unity with Coverage:

    Coverage analysis of Unity tests
    This will run Unity Editor with enabled coverage support (your Unity project will be opened automatically).

  3. Work with Unity tests as you work with regular unit tests. For example, to run tests coverage analysis, open the Unit Tests window, select the desired tests, and click the Cover Selected Unit Tests button.

Last modified: 08 March 2021