JetBrains Rider 2024.1 Help

Run and Debug Unity Tests

To work with Unity tests, use the Unit Tests window:

  • Unity tests are discovered from code and from the Unity editor and are automatically added to the Explorer tab of the Unit Tests window.

  • All Rider unit test features are available for Unity tests too including grouping, filtering based on test status, and other. Test output is parsed to make stack traces, class and method names into hyperlinks.

  • You can add new Unity tests either in the Unity editor or in Rider. Unit test classes can be added via the Solution Explorer: in the context menu, select Add and then Play Mode Test or Edit Mode Test.

  • The Unit Tests window allows you to choose which unit test runner you want to use. For example, it could be:

    • Standalone NUnit Launcher: NUnit test runner.

    • Unity Editor - Edit Mode: unit test runner embedded in Unity for running edit-mode tests.

    • Unity Editor - Play Mode: unit test runner embedded in Unity for running play-mode tests.

  • You can run and debug edit-mode Unity tests as you run regular unit tests.

    Unity test context menu
  • Continuous testing is also supported for Unity tests.

Last modified: 11 February 2024