UI testing in Unity3D

Question:

I'm very interested in how you can test the new UI in Unity so that you can simulate user input, check the state of controls after a change in the system, etc.

Perhaps someone is already puzzled by this. I could not find a solution by searching for a solution.

Answer:

Games are very difficult to test by definition because something is happening all the time. Even adding GUI testing will not help you much, because the GUI will depend on the state in the game, which in turn depends on thousands of input events, constantly changes, etc.

You can use unit testing to test the behavior of the user interface if you abstract enough, as with other pieces of logic. But testing the GUI in the game is hardly possible in a full-fledged form.

If architecture and performance permitting, use unit testing. For the rest, rely on manual testing.

Scroll to Top