Skip to main content
This guide covers the full test authoring lifecycle: YAML-first creation, reusable modules, code execution scripts, variables, control flow, workflows, and team sync patterns.

Choose a Workflow

  1. YAML-first CLI (recommended) — start from a local YAML file, create the remote test, and bootstrap .revyl/config.yaml automatically. The CLI checks the file with backend YAML validation before mutation.
  2. Scaffold first — create an empty or module-seeded remote test with revyl test create, sync the generated YAML into .revyl/tests/, then edit and push locally.
  3. Session to regression — convert a completed exploratory device session with revyl test create --from-session <session-id>, then refine the synced YAML and push it back as a stable regression.

Prerequisites

  • Authenticated with revyl auth login
  • An app/build available for the target platform
  • The correct app name for test.build.name (check with revyl app list)

YAML-First CLI

1. Write a YAML file

2. Create the test

4. Iterate and push

Scaffold First

Then edit .revyl/tests/smoke-login-ios.yaml and push.

Session to Regression

If the session is linked to an app or the project has a default app configured, --app can be omitted. The test name can also be omitted; Revyl will use the compiled session title.

YAML Anatomy

Common block types:

Reusable Modules

Modules are shared groups of test blocks that can be imported into any test.

Create a module

Import into a test

Manage modules


Code Execution Scripts

Code execution blocks let you run Python, JavaScript, TypeScript, or Bash code as part of a test.

Create and register a script

Use in a test

Inline code (no saved script)

Manage scripts


Variables

Variables let you pass dynamic data between steps using Mustache-style {{variable}} templates.

Define variables up front

Extract values at runtime

Manage variables via CLI


Control Flow

If / Else

The question phrase goes in condition:. Branches are then: and (optionally) else:.

While Loops

Loop body lives under body:.

Workflows

A workflow is a named collection of tests that run together.

Create and manage

Manage workflows

Tags


Authoring Best Practices

  1. Intent-level instruction steps. Use one free-form instruction for a meaningful user intent instead of splitting every tap and keystroke.
  2. Sparse separate validations. Keep assertions in their own validation blocks and add them only for important user-visible outcomes.
  3. Validate durable outcomes. Check user-visible state (e.g. “inbox is visible”) not transient state (e.g. “loading spinner disappeared”).
  4. Use variables for secrets. Never hardcode credentials in reusable tests.
  5. Put modules at the top. Shared setup flows belong at the beginning.

Full Example: E2E Checkout


Troubleshooting