Friday, December 6, 2019

Introducing Our Mobile Game Regression Test Automation System

 


I'm excited to share the mobile game test automation system that my team has developed.

While automated testing for standard mobile applications is widely recognized, mobile game test automation is still an emerging field. To automate testing effectively, it is crucial to programmatically monitor the application’s state during runtime and replicate user actions. These two components enable the creation of test scenario scripts and support exploratory testing techniques, such as Monkey testing.

Our primary goal is to automate functional regression tests. Automated testing across various mobile devices is common for simpler test scenarios, but when it comes to thoroughly testing game content, we found no suitable solution. As a game publishing company, our testers are required to perform extensive functional testing across a wide range of games. Our test automation aims to reduce the reliance on manual testing in response to the growing number of games and their increasing complexity.

There are two key aspects I’d like to highlight: simplifying the creation of game test scenarios and overcoming the limitations of testing game applications.

Simplifying Test Scenario Creation

We developed a custom solution to automate mobile game testing based on well-defined test scenario scripts. Our approach makes it easy for scriptwriters to create game test scripts by lowering the programming proficiency required, using a visual programming language. Additionally, we've designed several methods to enhance the reusability of scripts, which are often needed across multiple game tests.

Overcoming Game-Specific Limitations

One of the challenges of game testing is controlling or knowing the state of the game application during runtime. To enable game-friendly scripting, we leverage the context of game objects provided by the game developers. This allows us to create highly reusable test scripts.

To solve this, we developed an SDK that facilitates contextual communication with the game engine. This SDK supports both Unreal and Unity game engines and provides two main functions:

  1. Querying Game Object Hierarchies: The SDK allows querying game objects and their attribute values during runtime, requiring only that the game developer imports the SDK.

  2. Remote Procedure Calls (RPCs): The SDK also supports abstracted RPCs. To use the RPC functionality, the game developer must implement separate code tailored for the test scenario.

Conclusion

Our test automation solution can be used by both game developers and test engineers during both the game development and QA phases. The more comprehensive the automation coverage, the greater the benefits: faster time-to-market, fewer resources required for quality assurance, and ultimately, reduced operational costs.

In summary, this solution not only streamlines the testing process but also contributes to creating a more efficient and cost-effective testing environment for mobile games.