Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug Edit mode tests suddenly disappeared from test runner (2020.3.12f1)

Discussion in 'Testing & Automation' started by Mizkei, Nov 22, 2022.

  1. Mizkei

    Mizkei

    Joined:
    Jan 18, 2018
    Posts:
    4
    As the title suggests, my edit mode tests suddenly disappeared. It is suggesting to me to create EditMode test assembly folder, even though I have one already, which was working properly couple of days ago. And even though I tried to create new EditMode Assembly definition and tests, they are still not visible on the test runner. My PlayMode tests are still visible normally.

    I have tried updating the test framework and regenerating project files. Any idea what might be causing this?

    My Unity version is: 2020.3.12f1

    EditMode assembly definition
    upload_2022-11-22_15-53-1.png
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    1,871
    I assume there are no compile errors and the test scripts aren't enclosed in an #if that isn't defined, 0 or false?

    The tests aren't inside a package? Because if they are, you'd need add a flag to package.json to make TestRunner show the package's tests.

    Right-click on the Assets (root) folder in the project and choose Create - Test Assembly. Do these dummy tests appear?
     
    Mizkei likes this.
  3. Mizkei

    Mizkei

    Joined:
    Jan 18, 2018
    Posts:
    4
    Well now I feel dumb. There were errors mostly about "Assert" not found but there was also one error about other variable not found. Removed that line and now I can see the tests. I use VS and it had for some reason unloaded also my editmode tests from the solution so I lacked all the IDE features which made me think something else was wrong, like red line on the error line. Noticed it now and fixed that also.

    Everything is working now, thanks for making me double check!