Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow unit tests #2472

Open
bartlomiej-dawidow opened this issue Feb 27, 2025 · 4 comments
Open

Slow unit tests #2472

bartlomiej-dawidow opened this issue Feb 27, 2025 · 4 comments

Comments

@bartlomiej-dawidow
Copy link

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.

@bartlomiej-dawidow
Copy link
Author

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.

@van800
Copy link
Member

van800 commented Feb 27, 2025

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.

@bartlomiej-dawidow
Copy link
Author

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

@van800
Copy link
Member

van800 commented Feb 28, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants