Automation tests use AltTester SDK 2.3.0 to drive the running application through its UI — clicking buttons, waiting for screens, and asserting on visible state. Unlike unit and integration tests, automation tests exercise the full built application as a user would.
The tests live in a separate repository:
- Repository: decentraland/explorer-automation
- Framework: .NET 10.0, NUnit 4, Allure reporting
- Driver: AltTester-Driver 2.3.0
AltTester operates on a client-server model:
- An instrumented build contains the AltTester prefab, which connects to AltTester Desktop (default:
127.0.0.1:13000). - AltTester Desktop acts as the bridge server between the application and the tests.
- The test code creates an
AltDriverthat connects to this server. - The driver sends commands (find object, click, wait) and receives results over WebSocket.
This means the tests run as a separate process and talk to the game over the network. The game can be running locally or on a remote machine.
The project follows the Page Object Model (POM) pattern. See the explorer-automation README for full project structure and coding standards.
- Views encapsulate UI locators and interaction methods.
BaseViewprovides reusable helpers (ClickObject,WaitForObject,IsObjectPresent, etc.). Panel-specific sections (e.g.ExplorePanelSections/) inherit fromBaseSection. - BaseTest manages the driver lifecycle, initializes all view objects, and runs
EnsureInWorld()to get past splash/auth/loading screens. All test classes inherit from it. - Reporter wraps console logging with timestamps and creates Allure steps/screenshots.
- Allure attributes (
[AllureSuite],[AllureTest],[AllureStep]) decorate tests and view methods for rich HTML reports.
Non-release builds created by CI (for PRs and the dev branch) include AltTester instrumentation. The instrumented build:
- Has the
ALTTESTERscripting define enabled - Accepts the
--alttesterlaunch argument to activate instrumentation at runtime. This loads the AltTester prefab on start.
The visual regression suite can be triggered on any PR by leaving the following comment:
/visual-tests
The dispatcher lives in .github/workflows/visual-regression.yml and hands off to the run-visual-suite.yml reusable workflow in decentraland/explorer-automation.
Requirements:
- The commenter must have
OWNER,MEMBER, orCOLLABORATORassociation on the repo. Comments from anyone else are silently ignored. - The PR's head commit must already have a successful Unity Cloud Build run triggered by the
pull_requestevent. If the build is still running, failed, or was produced by a different event (push to dev, scheduled, manual dispatch), the workflow errors out — wait for the PR build to finish first.
Confirmation: when authorized, the bot reacts to the trigger comment with 👀. No reaction means the comment was ignored (usually an author-association mismatch).
Branch matching for baselines and fixtures: if decentraland/explorer-automation has a branch with the same name as the PR's head branch, that branch's visual baselines and test fixtures are used. Otherwise the workflow falls back to explorer-automation's default branch. This lets you stage matching test changes alongside Explorer changes by reusing the branch name.
MetaForge is our CLI tool that automates the entire test workflow.
- Install MetaForge and update to the latest release.
- Install AltTester Desktop (You need a Pro license / trial)
- Set the AltTester license key in MetaForge:
metaforge explorer test --set-license <your-license-key>
- Make sure Node.js is installed (needed for Allure report generation).
- Make sure you are logged in to Explorer.
metaforge explorer test <PR-number-or-branch>For example, to test PR #7645:
metaforge explorer test 7645This will:
- Download the instrumented build from the PR.
- Launch it with
--alttesterto enable instrumentation. - Start AltTester Desktop in batch mode, activate the license, and wait for Explorer to connect.
- Clone the
ExplorerAutomationTestsfolder from the explorer repo on the PR's branch. - Run all tests via
dotnet test. - Generate an Allure HTML report and open it in the browser.
- Deactivate the AltTester license on completion (for easier license sharing).
| Option | Description |
|---|---|
--filter <expr> |
NUnit filter expression (e.g. --filter "Category=Smoke") |
--timeout <seconds> |
AltTester server startup timeout (default: 120) |
--set-license <key> |
Store AltTester license key and exit |
--deactivate |
Deactivate the current AltTester license and exit |
--skip-allure-open |
Generate report but don't open it in the browser |
Manual testing requires three things running: an instrumented Explorer instance, AltTester Desktop, and the test runner.
From a CI build:
Download an instrumented build from a PR or the dev branch (non-release builds have AltTester support). Launch it with the --alttester argument:
./Decentraland --alttesterFrom the Unity Editor:
- Open
AltTester > AltTester Editor. - Select Editor as the platform.
- Click Play in Editor — this enters Play Mode with the AltTester server active.
Note: When running in the Editor, the
ALTTESTERscripting define must be set. The project hasKeepAUTSymbolDefined: 1inAltTesterEditorSettings.asset, so the define persists across Editor sessions.
Launch AltTester Desktop. You should see Explorer connect in the AltTester Desktop UI.
cd ExplorerAutomationTests
dotnet test --logger "console;verbosity=detailed"To run a specific test class:
dotnet test --filter "ExplorePanelTests"To run a single test:
dotnet test --filter "TestOpenEventsFromSidebar"AltTester Desktop includes an AI extension that lets us generate test code using Claude Code. The extension works as an MCP (Model Context Protocol) server, giving Claude real-time access to the running game's object hierarchy.
- AltTester Desktop v2.2.7 or later
- A Pro license (all current Pro licenses include AI extension support)
- Claude Code CLI installed
On first launch with a qualifying license, AltTester Desktop prompts to install the extension. Click Download to install it automatically.
Alternatively, open AltTester Desktop Settings and click Configure AltTester AI Extension > Open Configuration Setup.
After installing the extension, add the AltTester MCP server to your Claude Code configuration. Add the following to your .claude/settings.json (project-level) or ~/.claude/settings.json (global):
{
"mcpServers": {
"alttester": {
"command": "/path/to/AltTesterMcp"
}
}
}- macOS/Linux: Use the path from the AltTester Data Path directory (e.g.
"/Users/<user>/Library/Application Support/AltTesterDesktop/AltTesterMcp"). - Windows: Use the
.exepath (e.g."C:\\Users\\<user>\\AppData\\Local\\AltTesterDesktop\\AltTesterMcp.exe").
Restart Claude Code after updating the configuration.
The AltTester MCP server exposes the following tools that Claude can use when connected to a running instrumented build:
| Tool | Description |
|---|---|
driver |
Connect/disconnect/check status of the AltDriver (create, status, stop) |
get_game_state |
Full game state: scene name, object count, and hierarchical object tree with view-aware separation (on-screen vs off-screen) |
get_all_elements |
Paginated list of all scene elements with optional full details |
scene |
Get current scene, load a scene, or list all available scenes |
get_application_screen_size |
Screen dimensions in pixels |
get_screenshot |
Capture a PNG screenshot and save to disk |
| Tool | Description |
|---|---|
find_object |
Find a single object by locator strategy (NAME, PATH, ID, TAG, LAYER, TEXT, COMPONENT) |
find_objects |
Find all objects matching a locator, with optional filtering for active/on-screen objects |
component_property |
Read, write, or wait on a Unity component property (e.g. Text.text, Transform.position) |
| Tool | Description |
|---|---|
click |
Click an object by locator, with optional wait and coordinate output |
touch |
Multi-touch gestures: begin, move, end with finger ID tracking |
key_input |
Keyboard input: press, down, up with key codes |
scroll |
Scroll at coordinates with configurable speed and direction |
move_mouse |
Move cursor to screen coordinates |
reset_input |
Reset all input to neutral state |
| Tool | Description |
|---|---|
wait_for_object |
Wait for an object to appear (with timeout) |
wait_for_object_absence |
Wait for an object to disappear |
| Tool | Description |
|---|---|
setup_starter_project |
Scaffold a new test project (C#, Python, Java, or Robot Framework) |
documentation |
Read, list, or search AltTester documentation |
start_alt_tester_desktop |
Launch AltTester Desktop from /Applications |
With the MCP server configured and an instrumented build connected via AltTester Desktop, Claude can:
- Inspect the live game — use
get_game_stateandfind_objectsto query the full object hierarchy, identify locators, and understand the current UI state. - Discover locators — use
find_objectwith different strategies (NAME,ID,PATH) to find the best locator for a UI element, then use those in test code. - Read component properties — use
component_propertyto inspectText.text,Transform.position, or any component field on a live object. - Take screenshots — use
get_screenshotto capture the current screen for visual verification. - Generate test code — combine live inspection with the project's POM patterns to write accurate tests with verified locators.
- Debug failing tests — find objects that tests can't locate, check if they're on-screen, and suggest alternative locators.
Example prompts:
- "Connect to the running game and show me the UI hierarchy."
- "Find the Settings button and tell me its locator ID."
- "Take a screenshot and write a test for whatever panel is currently open."
- "Why can't my test find the Backpack section? Check if it's visible in the game."
For full documentation, see the AltTester AI Extension docs.