The mobile application has been improving at a far greater rate than any other technology during the past years. In today’s competitive mobile market, mobile app development teams have realized that they need to speed up the pace of releases to meet their customer expectations. In order to ensure quality and better user experience, QA teams run automated tests on real devices with different systems and models to get instant feedback after a new module or feature is completed. Appium seemed to be the most popular solution for mobile testing framework since it offers great interaction with the devices on multiple operation systems and supports many programming languages.
However, for mobile game developers, using Unity and Unreal but not using the native UI framework, Appium cannot identify the UI objects in the game directly. The difference in positioning elements by coordinates and pixels varies greatly on mobile devices makes it hard to provide good stability. Although some developers try to use image recognition for game UI component positioning, the accuracy and speed of this approach can seriously affect the efficiency of game developers.
If you’re looking to minimize manual QA involvement and fully embrace automation in your Unity project, just take a look at AltUnity Tester and see how it provides a simpler test creation process and better UI element identification.
AltUnityTester – will help you find game objects in your Unity project and get their coordinates and other attributes on the screen so that you can interact with them from Appium script.
Currently, AltUnity Tester is an open-source UI driven test automation tool that is available in Unity Asset Store. You can interact with game objects using tests written in C#, Python, or Java. You can also run your tests on real devices (mobile, PCs, etc.) or inside the Unity Editor
Getting started with AltUnityTester in your Unity Editor
To get started with AltUnity Tester, see the following steps, you can also visit the official website or view the tutorial video on Youtube for more details.
Youtube Video: https://www.youtube.com/watch?v=L4yAgv8Jc8s&t=22s
Running AltUnityTester using WeTest Android real devices
There's no doubt that the multitude of mobile devices, their OSs and versions is a big challenge for mobile game testing. Screen resolution, memory capacities, OS fragmentation CPU – they all differ from one device to another. However, acquiring and maintaining devices is expensive and time-consuming, not to mention having to charge and update devices constantly. So, a cloud-based mobile app testing solution is a feasible way to not only have instant access to the latest devices and operating systems, but also any other popular devices on which your end users have your apps installed on WeTest provides 1000+ real mobile devices of different system versions and models.
For Android, you can remotely connect with 1000+ WeTest cloud devices and execute AltUnity Tester tests on them in your Unity Editor via Android Debug Bridge (adb). See more details about how to enable ADB on WeTest devices.
Running AltUnityTester Test in parallel on WeTest Cloud
It’s a common practice to test your mobile games on dozens or even hundreds of real devices, to ensure the compatibility of your Mobile Game on different devices. Besides, some teams may try to run multiple automated tests simultaneously in order to save time for large mobile games. WeTest allows running one test script against a wide range of real devices easily and repeating it at no cost which could reduce your test time from hours to minutes. Let's see how it works.
1. Preparing your Test
Before running your Altunity Tester test on WeTest Cloud, you have to create two files first
(1) Installing the AltUnity Python Driver pip package for python
pip install --pre altunityrunner
(2) Download our sample on Github Repository and write your tests using AltUnity Driver Commands. WeTest supports any native mobile test automation framework and all programming languages. Here we use python as a sample. If you are using other program languages, please let us know.
(3) Add your cases between the lines in demo_cases.py
# your test cases start here
# your test cases end here
(4) Generate your script file (.zip)
WeTest accepts a zip file as the Appium script package. Please zip all test script files (.py files) and relevant files into one .zip file.
You can run sh create-zip.sh to zip your file. Your test suite(.zip) contains the following files (Python):
├── demo_cases.py - your test cases
├── runTest.sh - used to start the automation test in cloud container
2. Running Altunity Tester Test on WeTest against a wide range of devices
5. Choose Appium framework and upload the above-created zip file.
6. Choose the devices manually or randomly.
7. Select optional advanced options and submit your test run.
8. Test results will be available in the cloud in Test Analysis.