Run tests on a real device
Execute test cases on Mozark cloud devices with Optics.
Optics executes a test case step-by-step on a real Android or iOS device in Mozark's cloud, verifies every step from a screenshot, and hands you a reusable automation script at the end.
What to expect
The assistant follows a strict, transparent procedure. You'll be asked a few setup questions—they're deliberate, because some choices can't be changed once a session starts.
Choose capture options
Capture can't be enabled retroactively, so you're asked up front. Pick any combination:
Screen recording
Video of the whole session
Screenshots
Per-step images
Device logs
logcat / syslog
Network logs
HAR file
App profiling
CPU / memory / battery profile
Live log streaming
Logs as they happen
Live video streaming
Watch the run live
Clean session apps
Uninstall session apps afterwards
Choose the locator ladder
Each step needs to find something on screen. Three strategies are always available; you choose the order they're tried in. The recommended default:
Text (OCR) — matches visible words. Works on Android and iOS, and on Flutter / React Native apps. Produces cross-platform scripts. Recommended first.
XPath — queries the view hierarchy. Precise, but Android-only and brittle to layout changes.
AI fallback — reads the position from the screenshot and taps by percentage. Works on anything, but records no intent, so it isn't exportable.
The assistant probes the screen first and tells you if a rung won't work for your app—for example, no view hierarchy means XPath is dropped.
Watch it run
For every step you'll see:
Action — the keyword and locator used
Result — whether the keyword ran and whether it did what the step intended
Observation — what's on screen now
Expected result — verified or not, with reasoning
Next — the next step or fallback
Each verified step is confirmed with an assert_presence check. If a step fails, the assistant works down your locator ladder before reporting a failure—it never skips a step silently.
Recording into a test run
If you say "Run TR-8 on a device" rather than naming a test case, the assistant also writes results back to TCM as it goes: starts the test case in the run, marks each step Passed/Failed, attaches a screenshot as evidence on failures, and finishes the run with a real status.
Last updated
Was this helpful?

