JetBrains Rider 2026.3 Help

MSTest

On this page of JetBrains Rider options, you can adjust unit testing settings related to MSTest tests.

Test discovery

To list MSTest tests from your solution in the Unit Tests window, JetBrains Rider needs to discover unit tests.

The discovery of tests in specific project happens only after the project is built. You can choose between two options that allow you to prefer either speed or accuracy for discovering unit tests after the build.

  • Metadata (default)

    In this mode, JetBrains Rider analyzes the build artifact without launching the test runner.

    As tests are defined using attributes, JetBrains Rider can quickly scan the metadata of managed artifacts to find most tests in the project. However, it may fail to find tests that require running some special hooks of MSTest to define their parameters.

    This is the fastest way of discovering tests.

  • Test runner

    In this mode, JetBrains Rider launches MSTest runner in the discovery mode on the build artifact, and then uses the results from the runner.

    Using MSTest runner can take considerably longer to analyze the project, but the list of discovered tests will be complete in most cases.

After you run all tests from a specific project, JetBrains Rider will update the list of tests in this project independently of the selected discovery mode because letting the MSTest runner to execute all tests is the most accurate way of test discovery.

Test Settings

Choose where JetBrains Rider should look for test settings:

  • Specify a custom test settings configuration (.runsettings/.testsettings file within your solution).

For MSTest 4, JetBrains Rider sets TreatDiscoveryWarningsAsErrors to false unless you explicitly specify a value in your .runsettings file. This allows discovery to continue when a test method is invalid. To treat discovery warnings as errors, set RunSettings/MSTest/TreatDiscoveryWarningsAsErrors to true.

MSTest and Visual Studio Integration

As MSTest v1 is not distributed without Visual Studio, you have to specify the IDE folder inside a Visual Studio installation on your machine. JetBrains Rider will find all necessary executables in this folder.

MSTest v2, v3, and v4 are delivered as a NuGet package. If you use these versions in a .NET Core 3.x or .NET 5+ project, you do not need to specify the IDE folder.

04 November 2026