Units tests not working at all (TestRunner)

So for some reason, when running unit tests, they do not “work”, the unit test code runs fine, even asserts run and execute, because I have added logging to the test methods.

The test scene is started, tests run, and then nothing, the play mode stays as is and there is no further action from the TestRunner.


You can see, the unit test does not fail nor complete, but if you look at console, the code has executed just fine.

public class LootSpawnerTests
{
    [UnityTest]
    public IEnumerator WeightedLoot_NoLoot()
    {
        Debug.Log("a");
        yield return null;
        Debug.Log("b");
        yield return null;
        Assert.True(true);
        Debug.Log("c");
    }
}
  • using Unity 2022.3.14 LTS
  • using 1.1.13 Test Framework package
  • tried restarting editor several times
  • tried EditMode tests, they seem to run fine, only PlayMode tests have this issue
  • tried even with single yield return null, did not help
  • tried using Assert.

Another showcase of more tests, these ones were working year back, you can see play mode is just sitting there

Is the editor paused because there are exceptions? The second screenshot shows a few errors. I would look into these first.

Any reason why your testrunner package is this old? I currently use 1.3.9 and this works even in 2021.3 projects.

Indeed I had old version, not sure why is that, as package manager was not showing me any possible upgrade. Not it works.

9517993--1342162--upload_2023-12-8_10-24-57.png

so I manually had to modify manifest.

Also, any idea why are tests generating bunch of scene assets under Assets? Any way how to turn this off?
9517993--1342165--upload_2023-12-8_10-25-1.png

9517993--1342165--upload_2023-12-8_10-25-1.png
9517993--1342162--upload_2023-12-8_10-24-57.png

You may have some other (older) package that depends on that particular Test Framework package version.

You may want to check what other package this could be. See the Test Runner dependencies tab and then look for updates for the packages listed as depending on Test Framework.