Slow unit tests
When we run our unit tests from within Rider, they take a very long time to complete. It appears that the individual tests are fast but there are long pauses between them, in the order of tens of seconds.
When we start the same set of unit tests from within the Unity editor, they finish nearly instantly.
When we run tests in our non-Unity projects from within Rider, they also run normally.
So the problem appears to be in how resharper-unity launches the tests.
Our project consists of a large number of relatively small .asmdefs, and so our unit tests are also spread out across a number of assemblies. It looks like the pauses are not between individual test methods or classes, but between assemblies.
Hi! I think this was fixed on the Unity side at some point https://youtrack.jetbrains.com/issue/RIDER-93012/Unity-Unit-Tests-5-7-times-slower-in-Rider-vs-TestRunner-in-Unity-Editor There were also a workaround in the thread for older Unity versions. Please let me know if it helps.
I tried changing "Interaction mode" in Unity settings to "No Throttling" but it didn't make any noticeable difference. Neither did keeping Unity editor in the foreground and focused. The tests still run tens or hundreds of times slower than when using the Unity test runner.
Our setup: Unity 6000.0.36f1 Test Framework 1.4.5 Rider 2024.3.5
To keep this report in the loop, would you mind creating a ticket in Rider with Help - Report a bug, agree to attach logs. Please run those tests before reporting, to simplify finding this place in the logs.