- Home /
How can I keep my project buildable without deleting my playmode tests?
I am attempting to use automated tests with the new Unity 5.6 test runner, but I have found that my play mode tests will no longer compile as soon as I disable playmode tests.
Disabling playmode tests removes the following libraries.
using UnityEngine.TestTools; using NUnit.Framework;
I want to keep my tests around, but I don't want them to get in the way when I'm not using them. I would also like to avoid creating a separate git repository for tests. Any ideas?
Answer by Tomek-Paszek · Jun 06, 2017 at 08:33 AM
Unfortunatelly the easier solution is probably using #if for your test code. (you an add your own define in the player setting or use an exiting one, like UNITY_EDITOR)
Your answer
Follow this Question
Related Questions
How to import plugins inside tests in Unity Test Runner 1 Answer
Unity 5.6 Unit Testing 1 Answer
Playmode Testing writing clean duplicate code problem 0 Answers
How to load a scene in PlayMode tests 2 Answers
Testing in Unity 2 Answers