Navigate between tests and tested code

Last modified: 11 February 2024

JetBrains Rider helps you navigate between unit tests and tested code. When your caret is at the name of a class or anywhere within its declaration, you can press to navigate to related tests and vice versa, by pressing this shortcut on a test, you will jump to the tested class.

This navigation is also available in the Navigate To menu: select Test Subject if you navigate from a unit test, and Related Tests when you navigate from a tested class.

For navigating to and from unit tests, JetBrains Rider establishes links between test classes and the corresponding tested classes. There are several approaches to linking tests and tested classes: all of them are used by default, and you can configure them on the Build, Execution, Deployment | Unit Testing | Test Linker page of JetBrains Rider settings :