Unit Testing
JetBrains Rider helps discover and run or debug unit tests. The following unit testing frameworks are supported:
- NUnit 2.5.8 - 3.0. JetBrains Rider installation includes 2 versions of NUnit test runners (2.6.4 and 3.0). You can choose one of them or specify a local installation of NUnit on the page of JetBrains Rider options.
- MSTest V1 (Windows only, requires Visual Studio installed), V2 (.NET Core, xplat)
- XUnit
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.
In this section:
- In Current Document
- In Project or Solution
- Using Unit Test Sessions
- Executing Tests and Analyzing Results
All JetBrains Rider unit testing actions are available from the
menu or from the Unit Testing Quick List (Shift+Alt+U):You can use the following shortcuts for for unit testing commands:
Command | Shortcut |
---|---|
Unit Testing Quick List... | Shift+Alt+U |
Run Unit Tests | Ctrl+U, R |
Debug Unit Tests | Ctrl+U, D |
Stop Execution | Ctrl+U, S |
Repeat Previous Run | Ctrl+U, U |
Rerun Failed Tests | Ctrl+U, F |
Run All Tests from Solution | Ctrl+U, L |
Create New Session | Ctrl+U, N |
Append Tests to Session | Ctrl+U, A |
Run Current Session | Ctrl+U, Y |
Show Unit Tests window | Alt+8 |
Run Unit Tests (Tool Window) | Shift+Enter |
Debug Unit Tests (Tool Window) | Ctrl+D |
Run Current Session (Tool Window) | Ctrl+Y |
Rerun Failed Tests (Tool Window) | Ctrl+F |
Create New Session (Tool Window) | Shift+Alt+Insert |
Append Tests to Session (Tool Window) | Ctrl+Alt+Insert |
Remove Selected Tests (Tool Window) | Delete |
Run All Tests from Solution (Tool Window) | Ctrl+L |
For the full list of Rider keyboard shortcuts, see Keyboard Shortcuts Reference.
Last modified: 19 April 2018