I am new to Unity’s test framework.
I’m making playmode tests using [UnityTest] functions. Each script test a system and when running the tests individually they return successful but when running them all they break.
Tests appear to bleed into each other. Primarily singleton classes which I initiate using [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)].
Looking online some suggest using editmode tests and then using yield EnterPlayMode/ExitPlayMode and others suggest coding a reset state into the singletons but that is rather hard since this is not a new project but an old one I’m trying to implement tests in.
Is there a way to reset the test domain that I perhaps could implement in [SetUp] and/or [TearDown]?
If there isn’t a way to reload the playmode test domain then I think it’s easier to move the tests to editmode and using the yields.