Skip to main content

AltTester® for Mobile Game Automation

AltTester® is an open-source test automation framework for Unity and Unreal Engine games. It instruments your build so that automated tests can inspect the live scene graph, simulate user input, and assert on game state in real time. Tests communicate with the instrumented build over WebSocket and can be written in C#, Java, Python or Robot Framework. Sauce Labs supports AltTester® for both Unity and Unreal Engine on real iOS and Android devices.

How It Works with Sauce Labs

+--------------------------+ +--------------------+ +----------------------+
| C# test (NUnit) | | | | |
| AltTester® Driver | WS / WSS | AltTester® | WS / WSS | Instrumented game |
| Appium.WebDriver | <----------> | Desktop or | <----------> | on Sauce real |
| | HTTP | Sauce Connect | | device (Appium) |
+--------------------------+ +--------------------+ +----------------------+
  1. You instrument your Unity or Unreal build with the AltTester® SDK and produce a .apk or .ipa.
  2. You upload that build to Sauce App Storage.
  3. Your C# test starts an Appium session on a Sauce real device, which installs and launches the game.
  4. Once the game is running, your test connects to the AltTester® Driver, which talks to the in-game SDK over WebSocket.
  5. Your test queries in-game objects, simulates input, and asserts on game state.

The device reaches the AltTester® Server in one of two ways:

  • Sauce Connect Proxy tunnel (recommended) — AltTester® Desktop runs on your machine, and the tunnel (started with the --proxy-localhost allow flag) forwards localhost from the device. Your build and tests both keep the default connection settings; no custom IP is needed.
  • Public VM — AltTester® Desktop runs on a publicly reachable virtual machine, and both the build and your tests point at the VM's IP address.

The architecture above is identical for Unity and Unreal — the difference is in the SDK you install and the way you express locators against the engine's scene graph. The engine pages below walk through both connection methods end to end.

Choose Your Engine

AltTester® for Unity

Instrument a Unity build with the AltTester® Unity SDK and run C# tests against it on Sauce Labs real devices. End-to-end walkthrough.

AltTester® for Unreal Engine

Instrument an Unreal Engine build with the AltTester® Unreal plugin and run C# tests against it on Sauce Labs real devices.