Scenario structure
A scenario is a JSON object with these top-level fields:| Field | Required | Purpose |
|---|---|---|
meta | Yes | Scenario identity and platform |
config | Yes | Runtime defaults such as timeout, seed, and artifact directory |
steps | Yes | Ordered execution steps |
assertions | No | Checks evaluated after the steps finish |
output | No | Output-related preferences |
Minimal valid example
Supported step commands
Each step must use one of these commands:tapnavigateactscrollscreenshotwaitsource
Validation behavior
Validation checks both structure and command-specific arguments. Examples of validation errors:- missing
meta,config, orsteps stepsis not a non-empty list- unsupported command name
tapmixestargetwith coordinatestapprovides only one coordinatenavigateomitstoscrollomitsdirectionscrolluses an unsupporteddirectionscrolluses an out-of-rangepercentwaitomitsmsmeta.platformis notiosorandroid- unknown fields in validated objects such as the top level,
meta,config, each step object, each assertion object, andoutput
config.seedis missingscreenshotstep is missing a label
output.report field is accepted for scenario shape compatibility, but the current report writer does not change behavior based on its contents.
If validation produces any error-level issue, the scenario is rejected.
Runtime resolution for scenarios
Before executing a scenario, visor resolves:- platform
- device
- timeout
- output directory
- server URL
- mock or real runtime mode
- app identifier
Step execution model
Scenario steps run in the order listed insteps.
Important behavior:
- each step produces a
StepResult - failures are recorded per step
- a failed step does not stop later steps from running
- timeout overruns convert a step into a failure even if the action itself returned data
- screenshot and source steps add artifacts to the run record
Assertion phase
Assertions are evaluated after all steps complete. Current assertion support:visible
Run result shape
A scenario run produces:- a unique run id
- start and end timestamps
- platform and device metadata
- per-step results
- assertion results
- collected artifact paths
- a determinism signature
- an optional run-level error payload
Benchmark relationship
A benchmark is repeated execution of the same scenario. For each iteration, visor:- creates a fresh adapter
- executes the scenario
- writes reports
- records the determinism signature
- counts failures