Unity 3D game engine is used to develop games and enterprise application development in multiple platform which is compatible across devices. It is an excellent cross development tool, especially used for Next-Gen technologies like augmented and virtual reality applications.
As everyone is familiar with the terms like appium, selenium for automation in mobile application, it's quite a big challenge and uncertain when it comes to automation in mobile application built in Unity engine. Here we will discuss about the solution on automating unity built application using following methods:
- Using Unity Test Runner - which comes with Unity application using [UnityTest] attribute
- Using AutoPlay, Selenium - Similar to web testing with inspector and web driver protocol support.
Method 1 : Unity Test Runner
- The Unity Test Runner is a tool that tests your code in both Edit mode and Play mode, and also on target platforms such as Standalone, Android, or iOS.
- The Unity Test Runner uses a Unity integration of the NUnit library, which is an open-source unit testing library for .Net languages.
- [UnityTest Attribute] - Addition to the standard NUnit library for the Unity Test Runner.
Method 2: Using AutoPlay and Selenium
- Inspect game scene
- Manage game on real devices (install / uninstall, start / stop, etc)
- Run Selenium tests (with all base selenium actions like click, getText, swipe, get elements property, etc)
- Write test on any programming language (Java, C#, python, etc)
Looking forward to meet you all in SeleniumConf 2020