PlayMode tests stop Unity Cloud Builds from working
Hi,
I am trying to set up Unity Cloud Build for a project I am working on. It is all working fine, as long as I do not have any PlayMode tests in my project. When I do have some, the build fails with the following error message:
[Unity] Assets/Testing/PlayerMovingIntegrationTest.cs(2,19): error CS0234: The type or namespace name "TestTools" does not exist in the namespace "UnityEngine". Are you missing an assembly reference?
[Unity] Assets/Testing/PlayerMovingIntegrationTest.cs(3,7): error CS0246: The type or namespace name "NUnit" could not be found. Are you missing an assembly reference?
Locally everything works fine. Any idea what I am missing?
Thaks for your help.
We also see this issue in 2017.1f1 after upgrading the UITest Framework. Our project fails to compile on Cloud build, compiles and runs on a local $$anonymous$$acintosh.
Answer by rgoulter · Aug 04, 2018 at 08:43 AM
From Unity User Manual (2017.4) / Scripting / Scripting Tools / Unity Test Runner:
Known issues and limitations
Automated tests in platform players (for example Standalone, Android, or iOS) run from the command line are not currently supported.
Try adjusting the Platforms in an Assembly Definition that the Play Mode tests are under. (e.g. to "Editor", "WebGL").