JetBrains Rider helps discover and run, debug, cover, or profile unit tests. The following unit testing frameworks are supported:
NUnit 2.6.2 and later. JetBrains Rider installation includes 2 bundled versions of NUnit test runners (2.6.4 and 3.6.1). You can choose one or both of them, or specify a local installation of NUnit on the page of JetBrains Rider settings Ctrl+Alt+S.
MSTest V1 (Windows only, requires Visual Studio installed), V2 (.NET Core, cross platform)
Custom test frameworks that use Visual Studio test adapter extensibility.
To enable VStet adapters support, select the corresponding checkbox on the page of JetBrains Rider settings Ctrl+Alt+S.
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.
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:
- In Current Document
- In Project or Solution
- Unit Test Sessions
- Test Categories
- Execute Tests and Analyze Results
- Maintain Code Quality of Unit Tests
- Monitor Memory with dotMemory Unit
All JetBrains Rider unit testing actions are available from themenu or from the Unit Testing Quick List Alt+Shift+U:
You can use the following shortcuts for unit testing commands:
|Unit Testing Quick List...||Alt+Shift+U|
|Run Unit Tests||Ctrl+;, R|
|Debug Unit Tests||Ctrl+;, D|
|Stop Execution||Ctrl+;, S|
|Repeat Previous Run||Ctrl+;, T|
|Rerun Failed Tests||Ctrl+;, F|
|Run Tests Until Failure||Ctrl+;, W|
|Run All Tests from Solution||Ctrl+;, L|
|Create New Session||Ctrl+;, N|
|Append Tests to Session||Ctrl+;, A|
|Run Current Session||Ctrl+;, Y|
|Run Unit Tests under dotMemory Unit||Ctrl+;, M|
|Run Selected Tests||Shift+Enter|
|Debug Selected Tests||Ctrl+D|
|Run Current Session (Tool Window)||Ctrl+Y|
|Create New Session (Tool Window)||Alt+Shift+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|
|Show Unit Tests window||Alt+Shift+8|
For the full list of JetBrains Rider keyboard shortcuts, see Keyboard shortcuts in predefined keymaps.