JetBrains Rider 2018.1 Help

Running and Debugging Unity Tests

Unity tests (including both edit-mode and play-mode 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. Play mode unit test classes can be added via the Solution Explorer: in the context menu, select Add | Play Mode Test.

You can run Unity tests as you run regular unit tests. Note that all tests in a Unity solution are run using the Unity test runner. Rider just sends requests to the Unity editor and listens for test results.

Note that though the Debug action is present in the test's context menu, it's not yet supported. If you select Debug, it will simply run the tests. Nevertheless, a simple workaround is available.