Test Your Game with Firebase Test Lab for Android

Testing your application is a great way to help maximize its quality, and many of you know that Firebase Test Lab for Android has some useful tools for testing Android apps. If you’re the type of engineer who likes to maximize test coverage by writing instrumented tests (and regular unit tests), you can send those to Test Lab for execution. Even if you don’t like writing tests, you have some options. You can record instrumented tests by interacting with your app using Espresso Test Recorder in Android Studio. And there’s almost no effort required at all to run a Robo test that automatically crawls your app.

These tests are helpful for data-driven apps because there are robust test frameworks that understand how to navigate the Android platform widgets used to receive input and display data on screen. However, most games don’t work with platform widgets. Games typically take over the screen using their own UI elements, and provide their own touch controls. As a result, it’s extremely difficult to write instrumented tests for testing games, and Robo test won’t know how to navigate the game at all.

To help deal with these challenges with testing games, the Test Lab team has come up with a way for game developers to test their games effectively across many of the devices that Test Lab offers. It’s a new type of test called a Game Loop Test, and it’s available today in beta.

How does a Game Loop test work?

If you’ve seen arcade video games operate, you know that they’re always showing something on screen, typically some automated demo of the game, called “attract mode”. With Firebase Test Lab, game developers can now use this concept of attract mode to construct test scenarios, and Test Lab will arrange for those scenarios to be invoked in sequence. This gives developers the opportunity to test a wide variety of game levels and situations in a single test run on all the devices provided by Test Lab. If there are any problems with a scenario, you’ll find out which ones are problematic, so you can focus your efforts on improving that specific case.

Even better, Test Lab now provides performance data with every report. Of particular interest to game developers is a graph of the rendered frame rate over time throughout the test, tied to a video of the device display. This helps you quickly identify the parts of your game that aren’t rendering at an acceptable FPS.

In addition to FPS, there are other performance metrics available for all apps. You’ll be able to see your app’s CPU utilization, memory usage, and network ingress and egress. Notice how you can jump directly to the point in the video where you’re observing performance problems.

If you’re a game developer, now is a great time to check out Firebase Test Lab for Android to see what it can do to help the quality of your game.