JetBrains Rider 2021.2 Help

Unit testing

JetBrains Rider helps discover and run, debug, cover, or profile unit tests. The following unit testing frameworks are supported:

  • NUnit — JetBrains Rider installation includes 2 bundled test runners that support versions up to 2.6.4 and up to 3.11.1 correspondingly.

  • MSTest V1 (Windows only, requires Visual Studio installed), V2 (.NET Core, cross platform)

  • xUnit

  • Custom test frameworks that use Visual Studio test adapter extensibility.

    To enable VSTest adapters support, select the corresponding checkbox on the Build, Execution, Deployment | Unit Testing | VSTest page of JetBrains Rider settings Ctrl+Alt+S.

  • bUnit - a testing library for Blazor components

With JetBrains Rider, you can execute a single unit test, all tests in a test class, file, project or solution. You can also execute any number of tests combined in a test session.

Besides running and debugging unit tests, you can analyze code coverage of unit tests and run performance profiling of unit tests.

Before running coverage analysis or performance profiling, make sure that the PDB information exists for all target assemblies. The safest choice would be to build your code with the Debug build configuration.

In this section:

All JetBrains Rider unit testing actions are available from the Test menu or from the Unit Testing Quick List Alt+Shift+U:

JetBrains Rider: Unit Testing Quick List

You can use the following shortcuts for unit testing commands:

Unit testing

For the full list of JetBrains Rider keyboard shortcuts, see Keyboard shortcuts in predefined keymaps.

Last modified: 01 October 2021