Test runner stopped working.

When I try to run tests I nowadays get this error.

if I open a new scene and run 1 test, then this happens always.

Its stuck forever. at some point I managed get through this, but there is another bug. The test runner wont quit the play mode in any scenario. Pushing the new close button does not work on the all tests passed screen and no test results are recorded on the test runner.

Version 2022.2.20
Test framework 1.3.2
Performance testing API 3.0.0-pre.2

Dependencies

I have a similar „legacy play mode run“ stuck forever issue in 2022.2 and 2023.1. But this only happens when running tests through Rider and only when test mode is set to „Edit & Play Mode Tests“. Do you use Rider?

One way you can try to narrow it down is to remove all test classes and only leave a single test uncommented to see if any of the tests have something to do with the issue.

Looks like the project had gone bad over the years. Moving everything to a new project solved the issues.

edit. it still gets stuck but the test runner seems to work, so its not a big problem and yes I do use rider.

I’m seeing this as well on a new fairly new project. Unity 2022.3.7f1. Test runner gets stuck on Legacy Play Mode Run, after successfully completing the tests. You have to hit cancel.

Fixed with a Reimport-All. Looks like my test runner package had some weird import errors.

2 Likes

My problem happens just like John’s in 2022.3, Reimport-All did the trick. thanks John!