Tests
Sync tests
Keep local YAML test files and the Revyl server in sync using a git-like workflow. Edit tests locally, push changes upstream, pull updates from teammates, and reconcile test state in one command.
How It Works
Tests live as YAML files in .revyl/tests/. Each file contains a _meta block that tracks the relationship with the remote copy on the Revyl server:
_meta:
remote_id: a1b2c3d4-5678-90ab-cdef-1234567890ab
remote_version: 3
local_version: 3
last_synced_at: "2026-03-16T10:11:53-07:00"
checksum: sha256:e3b0c44298fc1c149afbf4c8996fb924...
test:
metadata:
name: login-flow
platform: ios
build:
name: ios-test
blocks:
- type: instructions
step_description: Tap Sign In.| Field | Purpose |
|---|---|
remote_id | UUID linking this file to the server-side test |
remote_version | Last known server version at time of sync |
local_version | Local version counter |
last_synced_at | Timestamp of the last push or pull |
checksum | SHA-256 of the blocks content; used to detect local edits |
When you push, the CLI sends the local blocks to the server and increments the version. When you pull, the CLI downloads the remote blocks and updates the _meta accordingly. Conflicts are detected by comparing version numbers and checksums.
Sync Statuses
Every test has a sync status derived from comparing local _meta against the remote API:
| Status | Meaning |
|---|---|
synced | Local and remote are identical |
modified | Local has unpushed changes (checksum differs from last sync) |
outdated | Remote has a newer version than the last pull |
conflict | Both local and remote have diverged since the last sync |
local-only | Test exists only in .revyl/tests/, not on the server |
remote-only | Test exists on the server but has no local YAML file |
orphaned | The _meta.remote_id points to a test that no longer exists, is inaccessible, or has an invalid ID |
revyl test sync -- Test Reconciliation
revyl test sync reconciles local test files with their remote test records in
one pass. It does not publish or pull .revyl/config.yaml; use revyl init,
revyl config pull, and revyl config push for the project configuration
lifecycle.
The root-level revyl sync command remains as a deprecated compatibility alias
for revyl test sync. New scripts and documentation should use the canonical
test command.
revyl test syncThe sync process for tests:
- Name-match linking -- local files that match a remote test by name (but lack a
remote_id) are offered for linking. - Import -- remote-only tests with no local counterpart are imported after confirmation (interactive) or skipped (non-interactive /
--skip-import). - Status reconciliation -- each linked test is checked and the appropriate action is applied (pull, push, detach, prune).
Flags
| Flag | Description |
|---|---|
--dry-run | Preview planned actions without writing any files |
--prune | Auto-prune stale/deleted mappings and orphaned links |
--skip-import | Only sync tests already in .revyl/tests/; skip importing remote-only tests |
--workflow "Name" | Only sync tests belonging to a specific workflow (by name or ID) |
--bootstrap | Inspect local YAML _meta.remote_id links without authentication or writes (useful after cloning a repo) |
--non-interactive | Disable prompts; apply deterministic defaults |
--interactive | Force interactive prompts (requires TTY stdin) |
--json | Output results as machine-readable JSON |
Examples
revyl test sync # Reconcile local and remote tests
revyl test sync --prune # Reconcile tests and clean up stale mappings
revyl test sync --workflow "Smoke" # Only sync tests in the Smoke workflow
revyl test sync --skip-import # Only sync existing local tests
revyl test sync --dry-run --json # Preview as JSON (great for CI)
revyl test sync --non-interactive # No prompts; safe for scripts
revyl test sync --bootstrap # Inspect local links after cloning a reporevyl test list -- View Sync Status
Show all local tests with their sync status, local version, and remote version:
revyl test listExample output:
NAME STATUS LOCAL REMOTE LAST SYNCED
login-flow synced 3 3 2 hours ago
checkout-flow modified 4 3 1 day ago
browse-products outdated 2 5 3 days ago
signup-flow local-only 1 - neverFlags
| Flag | Description |
|---|---|
--json | Output results as JSON |
revyl test push -- Push Local Changes
Upload local test changes to the Revyl server.
revyl test push # Push all modified tests
revyl test push login-flow # Push a specific test
revyl test push --force # Force overwrite remote version
revyl test push --dry-run # Preview what would be pushed
revyl test push --force --include-modules-and-scripts # Also update modules and scriptsWhen pushing, the CLI:
- Checks changed local YAML with backend validation.
- Resolves
build.nameto anapp_idand any module/script names to UUIDs. - Sends the blocks to the server with an
expected_versionfor optimistic concurrency. - If the remote version has advanced (HTTP 409 conflict), the push is rejected. Use
--forceto overwrite, or pull first and re-push. - On success, updates
_metawith the newremote_version,checksum, andlast_synced_at.
What gets synced: blocks, tags, custom variables, environment variables, and device targets.
Secret variables stay in Revyl. revyl test pull leaves them out of the file,
and revyl test push keeps them and ignores a file variable with a secret's
name. CLIs older than 0.1.234 write each secret into the file with an empty
value, and when a test's file sets variables, their revyl test push deletes
the test's saved secrets and saves the file's variables as plain text. In a
checkout whose .revyl/config.yaml sets run_test_definitions_from_git,
Revyl CLI 0.1.217 and older stop instead, as
Run tests from Git describes.
Before it writes any test, the push creates each script, then each module,
that the pushed tests use and that has a file in .revyl/scripts/ or
.revyl/modules/ but no saved copy. It updates a saved script or module whose
file differs only with --include-modules-and-scripts; without the flag, it
skips that one with a warning. It prints each script and module it creates or
updates, and names the other saved tests that use one it updated:
✓ Updated module <module-name> from .revyl/modules/<module-name>.yaml to v<version>
⚠ Other saved tests use module <module-name> too: <other-test-name>
Pushing tests...
✓ <test-name>: pushed to v<version>When .revyl/config.yaml sets run_test_definitions_from_git: true, runs use
the files in Git, and a push updates only the saved copies that runs use when
Git has no file. See Test definitions from Git.
Flags
| Flag | Description |
|---|---|
--force | Force overwrite the remote version (bypass conflict detection) |
--dry-run | Show what would be pushed without pushing |
--include-modules-and-scripts | Also update the saved modules and scripts the pushed tests use to match their files |
revyl test pull -- Pull Remote Changes
Download test changes from the Revyl server to local YAML.
revyl test pull # Pull all tests in local config
revyl test pull login-flow # Pull a specific test
revyl test pull --all # Pull ALL org tests, including remote-only
revyl test pull --all --app <app-name> # Pull every test on one app, including remote-only
revyl test pull --all --app <app-name> --include-modules-and-scripts # Plus the modules and scripts those tests use
revyl test pull --force # Force overwrite local changes
revyl test pull --dry-run # Preview what would be pulledWhen pulling, the CLI:
- Fetches the remote test and converts tasks to blocks.
- Strips server-generated block IDs.
- Resolves UUIDs back to human-readable names (modules, scripts).
- Pulls associated tags, custom variables other than secrets, environment variables, and device targets.
- Writes the updated YAML with refreshed
_meta.
--all writes a file for every saved test in your organization, on every app.
Add --app with an app's name or ID, which revyl app list shows, to write
only that app's tests; repeat --app for several apps. --app works only
with --all and without a test name.
--include-modules-and-scripts also writes a file in .revyl/modules/ for
each module the pulled tests use and one in .revyl/scripts/ for each script
those tests and modules use, the files a run from Git reads; see
Run tests from Git. A module or script file whose
content differs from the saved copy is kept unless you add --force. Without
the flag, revyl module pull and revyl script pull write every saved module
and script in your organization.
Use --all to discover and import tests created by teammates in the web UI that don't exist locally yet.
Flags
| Flag | Description |
|---|---|
--all | Pull all tests from the organization, including those not in local config |
--app | With --all, pull only the tests on this app, by name or ID; repeat for several apps |
--force | Force overwrite local changes |
--dry-run | Show what would be pulled without pulling |
--include-modules-and-scripts | Also write the saved modules and scripts the pulled tests use to .revyl/modules and .revyl/scripts |
revyl test diff -- Compare Local vs Remote
Compare a test's file with the test saved in Revyl, as revyl test pull
would write the file, with the test's steps, variables and other settings:
revyl test diff <test-name>Lines that start with - come from the file, and lines that start with +
from the saved test. Here the file changes a variable:
--- local
+++ remote
@@ -6,7 +6,7 @@
name: <app-name>
build_selection: inherit
variables:
- item_name: sourdough bread
+ item_name: bread
location:
latitude: 37.7749
longitude: -122.4194When the file and the saved test match, it prints No differences found.
revyl test remote -- List All Organization Tests
List every test in your Revyl organization, regardless of local project state:
revyl test remote # List all tests
revyl test remote --platform ios # Filter by platform
revyl test remote --tag regression # Filter by tag
revyl test remote --limit 20 # Limit results
revyl test remote --json # JSON outputFlags
| Flag | Description |
|---|---|
--platform <ios|android> | Filter by platform |
--tag <name> | Filter by tag name |
--limit <n> | Maximum number of tests to return (default: 50) |
--json | Output results as JSON |
Common Workflows
First-time setup (clone and sync)
After cloning a repository that already has .revyl/tests/ files:
revyl auth login
revyl test sync --bootstrap # Inspect test links from _meta.remote_id values
revyl test list # Verify everything is linkedImport all org tests locally
Pull every test from your org so the full suite is available locally:
revyl test pull --allTo import only the tests on one app, add --app with the app's name or ID:
revyl test pull --all --app <app-name>Or use the interactive flow:
revyl test sync # Will prompt to import each remote-only testEdit-push-run loop
# 1. Edit a test locally
vim .revyl/tests/login-flow.yaml
# 2. Check what changed
revyl test diff login-flow
# 3. Push the update
revyl test push login-flow
# 4. Run it
revyl test run login-flowPull a teammate's changes
revyl test list # See which tests are outdated
revyl test pull checkout-flow # Pull one test
# or
revyl test pull # Pull all outdated testsResolve a version conflict
When both you and a teammate have changed the same test:
revyl test list # Shows "conflict" status
revyl test diff login-flow # See the remote changes
# Option A: Pull remote, then re-apply your edits
revyl test pull login-flow --force
# Option B: Force-push your version
revyl test push login-flow --forceCI dry-run validation
Check sync status in CI without modifying anything:
revyl test sync --dry-run --json --non-interactiveParse the JSON output to gate deployments on sync health.
Prune stale mappings
Clean up orphaned links and removed tests:
revyl test sync --pruneTroubleshooting
| Problem | Fix |
|---|---|
| "version conflict" on push | Someone updated the test remotely. Run revyl test pull first, or use --force to overwrite. |
Test shows as orphaned | The remote test was deleted or you lost access. Run revyl test sync --prune to detach the link. |
| "test not found" on pull | The test name doesn't match any remote test. Run revyl test remote to see available tests. |
Stale _meta after cloning | Run revyl test sync --bootstrap to inspect local _meta.remote_id links, then reconcile normally. |
| Sync imports too many tests | Use --skip-import to only sync tests already in .revyl/tests/, or --workflow "Name" to scope to one workflow. |