Search Unity

Bug Test runner stopped working.

Discussion in 'Testing & Automation' started by mikaelK, May 21, 2023.

  1. mikaelK

    mikaelK

    Joined:
    Oct 2, 2013
    Posts:
    284
    When I try to run tests I nowadays get this error.
    upload_2023-5-21_22-57-28.png

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

    upload_2023-5-21_23-7-26.png

    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
     
  2. mikaelK

    mikaelK

    Joined:
    Oct 2, 2013
    Posts:
    284
    Dependencies
    upload_2023-5-21_23-14-45.png
     
  3. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,901
    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.
     
  4. mikaelK

    mikaelK

    Joined:
    Oct 2, 2013
    Posts:
    284
    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.
     
  5. Kleptine

    Kleptine

    Joined:
    Dec 23, 2013
    Posts:
    282
    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.
     
  6. Kleptine

    Kleptine

    Joined:
    Dec 23, 2013
    Posts:
    282
    Fixed with a Reimport-All. Looks like my test runner package had some weird import errors.
     
    leni8ec likes this.