Run your first test
This test opens a menu with the right controller and passes when the app logs that the menu opened. It needs no Unity package.
-
Start the app on PuppetXR with the control server on (see Install Geppetto), and note where it writes its log. For a Unity player on macOS that is
~/Library/Logs/<Company>/<Product>/Player.log. -
Save the test as
geppetto-tests/open-menu.json:
{
"schema_version": 2,
"name": "Open the main menu",
"timeout_seconds": 60,
"steps": [
{"id": "aim-at-menu", "do": "point", "hand": "right", "at": [0.5, 0.62]},
{"do": "wait", "frames": 15},
{"id": "click-menu", "do": "click", "hand": "right"},
{"id": "menu-opened", "expect": "log", "pattern": "\\[Menu\\] opened", "within_frames": 180},
{"do": "screenshot", "name": "menu-open"}
]
}
at is a point in the left eye's image, 0 0 top left. Take a PuppetXR
screenshot to find it, or aim at a target
instead.
- Validate and run it. The first
geppetto runstarts a 30-day free trial on this machine (see licensing):
geppetto validate geppetto-tests/
geppetto run geppetto-tests/ --app-log /path/to/Player.log
PuppetXR <version> · YourApp (pid <pid>)
✓ Open the main menu pass 1.4 s
receipts: geppetto-runs/20261127T031502Z
- Build the dashboard:
geppetto report
Open geppetto-report/index.html. Each test links to its steps, its reason
when it did not pass, and its screenshots. geppetto serve serves the same
dashboard at http://127.0.0.1:8765/ and keeps it current while you run tests.
Try it without Unity
PuppetXR's own example app logs, every frame, the right trigger value and head position it read through OpenXR, which is enough for real tests. Build PuppetXR with its example (see its README), then:
PUPPETXR_CONTROL=1 PUPPETXR_HEADLESS=1 XR_RUNTIME_JSON=/path/to/puppetxr.json \
./puppetxr_example --log > app.log
geppetto run examples/tests-v2/puppetxr-example --app-log app.log
On macOS the example finds the Vulkan loader only on the library path; with
Homebrew's, add DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/lib to its command.
The four tests click, hold and release the trigger, move the head, and check
that the head is back afterwards.
Try it with a Unity app
The package's PuppetXR Demo sample is a cube the right trigger clicks, with
a Geppetto target, a state provider and a reset fixture. One test resets the
counts, clicks away from the cube (one miss, no hit), then aims at the target
and clicks (one hit); another plays PuppetXR's pinch_tap on a tracked hand
and expects the app to count one pinch. On macOS, from a Geppetto checkout:
PUPPETXR_RUNTIME_JSON=/path/to/puppetxr.json ./scripts/puppetxr-demo.sh
The script builds the sample as a development player, runs it on PuppetXR,
runs the test and builds the dashboard under artifacts/puppetxr-demo/. It
needs Unity 6000.3 (UNITY_EDITOR to override) and any PuppetXR build.
A test that sends input but asserts nothing is reported as an error with
product outcome inconclusive, never as a pass. See
Evidence and reviews.