Skip to main content

Overview

The Revyl YAML format allows you to define end-to-end tests in a structured, human-readable format. Tests support conditional logic, loops, variable extraction, and various action types that work across web, iOS, and Android platforms.

Test Execution Behavior

Important: When a test starts, Revyl automatically:
  • Web tests: Navigates to the build URL
  • Mobile tests: Opens the application
You do NOT need to include manual navigate or open_app steps at the beginning of your test. These manual steps are only needed when:
  • Navigating to a different URL during the test (web)
  • Reopening the app after closing it (mobile)
Most tests should start directly with instructions or validations.

Root Structure

The test Object

All YAML tests start with a test: root object containing three main sections:
test:
  metadata:    # Test configuration
  build:       # Build reference
  blocks:      # Test steps

Metadata Section

The metadata section contains test-level configuration:

name

Required | string The name of your test.
metadata:
  name: "User Login Flow"

platform

Optional | string | Values: web, ios, android Target platform for the test. If omitted, platform is inferred from the build.
metadata:
  name: "Mobile Checkout"
  platform: ios

Build Section

The build section specifies which application version to test:

name

Required | string Name of the build to test against.
build:
  name: "Production App"

pinned_version

Optional | string Specific version to test. If omitted, uses latest build.
build:
  name: "Staging App"
  pinned_version: "2.5.1"

Blocks Section

blocks

Required | array List of test steps executed sequentially. Tests automatically navigate to the build at start, so blocks typically begin with instructions or validations.

Block Types

Instructions Block

AI-powered actions that execute natural language instructions. Use high-level instructions for complex flows. Fields:
  • type: “instructions” (required)
  • step_description: Natural language instruction (required)
Example:
# High-level instruction (recommended for complex flows)
- type: instructions
  step_description: "Complete the sign up flow"

# Specific instruction
- type: instructions
  step_description: "Click the login button"

Validation Block

Assert conditions to verify application state. Fields:
  • type: “validation” (required)
  • step_description: Condition to validate (required)
Example:
- type: validation
  step_description: "The dashboard page is visible"

Extraction Block

Extract data from the application and store in variables. Fields:
  • type: “extraction” (required)
  • step_description: What to extract (required)
  • variable_name: Variable name to store the extracted value (required, use kebab-case)
Example:
- type: extraction
  step_description: "The product price"
  variable_name: product-price

Manual Block

Direct operations that bypass AI processing. Fields:
  • type: “manual” (required)
  • step_type: Type of manual operation (required)
  • step_description: Parameters or duration (required for some step_types)
Manual step_type values: Web Platform:
  • wait: Pause for specified seconds
  • navigate: Go to different URL (not needed at test start - automatic)
  • back: Browser back button
  • forward: Browser forward button
  • refresh: Refresh page
  • browser_code_execution: Execute JavaScript
Mobile Platform:
  • wait: Pause for specified seconds
  • open_app: Launch app (not needed at test start - automatic)
  • close_app: Close the application
When to use navigate/open_app:
  • navigate: Only when changing to a different URL mid-test
  • open_app: Only when reopening after using close_app
Example:
# Wait 2 seconds
- type: manual
  step_type: wait
  step_description: "2"

If Block

Conditional branching with then/else paths. Fields:
  • type: “if” (required)
  • condition: Natural language condition (required)
  • then: Array of blocks executed when condition is true (required)
  • else: Array of blocks executed when condition is false (optional)
Example:
- type: if
  condition: "A discount code field is visible"
  then:
    - type: instructions
      step_description: "Enter 'SAVE10' in the discount code"
    - type: instructions
      step_description: "Click 'Apply'"
  else:
    - type: validation
      step_description: "No discount option is available"

While Block

Loop with a condition that repeats the body until condition is false. Fields:
  • type: “while” (required)
  • condition: Loop continuation condition (required)
  • body: Array of blocks executed each iteration (required)
Example:
- type: while
  condition: "More items button is visible"
  body:
    - type: instructions
      step_description: "Click 'Load More'"
    - type: manual
      step_type: wait
      step_description: "1"

Using Variables

Variables allow you to extract and reuse data throughout your test. Defining Variables:
- type: extraction
  step_description: "The product price"
  variable_name: product-price
Using Variables: Wrap variable names with $ on both sides:
- type: validation
  step_description: "Total is $product-price$"

- type: instructions
  step_description: "Enter '$username$' in the username field"
Variables can be used in any step_description or condition field.

Complete Example

test:
  metadata:
    name: "E-commerce Checkout Flow"
    platform: web

  build:
    name: "Shopping Site"
    pinned_version: "2.1.0"

  blocks:
    # Test starts automatically at build URL
    # No manual navigate needed

    - type: instructions
      step_description: "Search for 'laptop'"

    - type: instructions
      step_description: "Click the first search result"

    - type: extraction
      step_description: "The product price"
      variable_name: product-price

    - type: instructions
      step_description: "Click 'Add to Cart'"

    - type: validation
      step_description: "The cart shows price of $product-price$"

    - type: if
      condition: "A discount code field is visible"
      then:
        - type: instructions
          step_description: "Enter 'SAVE10' in the discount code"

    - type: instructions
      step_description: "Click 'Checkout'"

    - type: validation
      step_description: "The order confirmation page is displayed"
I