Why should game testing be automated?
Tags: gamium, story, development, testautomation
Published: 2023-08-07 13:52:37

---
title: Why should game testing be automated?
published: true
date: 2023-05-18 06:49:23 UTC
tags: Gamium,Story,Development,TestAutomation
canonical_url: https://blog.dogutech.io/why-should-game-testing-be-automated-2/
---


I had aspirations of becoming a game server developer, but to my surprise, I was assigned to a understaffed game platform team at my first job. That was the reality. It was there that I learned how to make games compatible with Android and iOS, and how to deploy and manage them.

## Story 

At first, learning new tasks was exciting. However, managing and maintaining project code to accommodate various operating systems and monitoring performance proved to be challenging. Every time we added new features, I had to write separate code and perform tests for both Android and iOS. Moreover, ensuring device compatibility posed an even more complex problem. We had to measure FPS and memory usage on various devices under the same conditions. Even though the game gained some popularity, developers, including myself, had to manually measure FPS and memory usage. This process seemed to take hours to complete. We had to build and install for game profiling, repeatedly measure under the same settings. What was even more unfortunate was that most game projects were large in scale, resulting in a significant amount of time spent on building and installation.

As time went on, I grew weary of this process. "Why am I the only one doing this task? Shouldn't the content developers be the ones measuring, considering they know what parts to measure and how?" I started to feel discontent and wondered about this. That's when a colleague, who was familiar with web and mobile development, introduced me to a tool called Appium. They suggested trying game test automation.

I was unaware of the existence of Appium and Selenium. Previously, I only knew about macro tools like AutoHotkey. However, I discovered that Appium and Selenium provided the ability to query and interact with UI based on XPath. When I first encountered this idea, I realized it could be applied to games as well. Fortunately, the game project had its own UI system, and each UI element had a unique identifier (ID). So, we added a TCP socket server to the game, used a Node.js client to send packets, and implemented the ability to query UI, click, and drag. Additionally, we added the functionality to execute interpretable scripts at runtime.

## Results

The results were successful. The features we developed were suitable for mobile projects, allowing us to automatically perform multiple rounds of measurements for FPS, memory, and more on Android and iOS devices whenever new content was added. We no longer had to waste valuable time for developers and the quality assurance (QA) team. As a result, we could invest that saved time in other interesting tasks.

However, there was still a sense of regret. The reports of this system were scattered across various places. They were distributed across tools like Jenkins and Kibana, requiring us to find the button to start the tests and check the results in different locations. Moreover, we needed diverse information, but Kibana only provided charts to some extent.

Developing the automation system took a lot of time. While we completed core functionalities like game control, the need for reporting and device management arose, requiring additional development. However, there was a sense of dissatisfaction in proceeding. This automation system could only be applied to that specific project, making it difficult to apply to other projects. Furthermore, it couldn't solve problems that other game companies or projects might encounter. This led us to develop a solution that could be used across all companies.

That's why we developed Gamium and Dogu solutions. Gamium provides the ability to control games with scripts and, when connected to the Dogu solution, enables reporting and device management in the browser without space constraints. We no longer have to search or roam around to find devices that are causing issues.

## Gamium

We have released [Gamium](https://github.com/dogu-team/gamium?ref=blog.dogutech.io) as an open-source tool. It supports various game engines and client languages, hoping to solve repetitive and tedious tasks quickly in many projects.

## Dogu Solution

If you're satisfied with applying Gamium, give the [Dogu](https://github.com/dogu-team/dogu) solution a try. Dogu solution allows you to remotely control devices within the organization, classify devices, and execute desired test scripts on specific devices. We are confident that this product can be of great help to projects.