> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ellomas.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Replay Overview

> A declarative E2E workflow testing engine — HTTP, database, and shell in one YAML file.

# Replay

**Declarative E2E Workflow Testing Engine**

[![Go Version](https://img.shields.io/badge/Go-1.25+-00ADD8?logo=go)](https://go.dev/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![CLI](https://img.shields.io/badge/interface-CLI-4B32C3)](#usage)
[![GitHub](https://img.shields.io/badge/GitHub-replay-181717?logo=github)](https://github.com/tomiwa-a/replay)

Replay is a standalone CLI tool that executes declarative end-to-end workflow tests written in YAML. Each workflow is a sequence of steps — HTTP calls, database queries, shell commands — that share state through variables and validate outcomes with assertions.

It is built for QA engineers and developers who want fast, deterministic, scriptable E2E validation without the overhead of a heavy test framework.

***

## How It Works

```
YAML File  →  Parser  →  State Bag  →  Templating  →  Runners  →  Assertions  →  Reporter
```

1. **Parser** loads your YAML workflow into a typed Go structure
2. **State Bag** stores variables shared across all steps
3. **Templating** replaces `{{ var }}` placeholders before execution
4. **Runners** execute the step (HTTP, DB, Shell, Print)
5. **Assertion Engine** validates outcomes with JSONPath-based checks
6. **Reporter** prints coloured pass/fail results

***

## Example

```yaml theme={null}
name: user-onboarding
config:
  http:
    base_url: https://api.example.com
steps:
  - name: login
    type: http
    request:
      method: POST
      url: /auth/login
      body:
        email: qa@example.com
        password: pass123
    extract:
      token: $.data.token
    assert:
      - ["$.status", "eq", 200]

  - name: verify-user-in-db
    type: db
    query: SELECT id FROM users WHERE email = 'qa@example.com'
    extract:
      user_id: $[0].id
    assert:
      - ["$[0].id", "not_null"]
```

***

## Key Features

* **7 step types** — HTTP, DB (PostgreSQL/Redis), Shell, Print, Loop, Call (cross-file), If (conditional)
* **Stateful variables** — Extract values from any step and reuse them in later steps via `{{ var }}`
* **JSONPath extraction & assertions** — Target nested fields in JSON responses
* **45 built-in template functions** — String, math, date, JSON manipulation, type conversion
* **Parallel execution** — Run multiple workflows concurrently with `--concurrency N`
* **Watch mode** — Auto-re-run workflows on file changes during development
* **Config profiles** — Switch between dev, staging, and prod configs with `--profile`
* **Deterministic** — Same inputs produce the same results, every run

***

## Quick Links

* [Quickstart](/replay/quickstart) — Run your first workflow in 60 seconds
* [Installation](/replay/installation) — Install via Go, binary, or Docker
* [Writing Workflows](/replay/guides/writing-workflows) — Core concepts and DSL syntax
* [Use Cases](/replay/guides/use-cases) — Real-world scenarios for QA and dev teams
