Rocketship Agent Quickstart

December 30, 2025 ยท View on GitHub

Short reference for coding agents (Cursor, Claude Code, Windsurf, etc.) to write and run Rocketship tests.

What is Rocketship?

Rocketship is a testing framework for browser and API testing. A Rocketship test suite is a YAML file (typically kept in a .rocketship directory) made up of one or more tests. Each test has steps, and each step calls a plugin (http, supabase, playwright, agent, etc.).

You can run a single file with -f or an entire .rocketship directory with -d. Use -a to automatically start and stop the local server.

Installation

# macOS
brew tap rocketship-ai/tap && brew install rocketship

# Linux/macOS (portable)
curl -fsSL https://raw.githubusercontent.com/rocketship-ai/rocketship/main/scripts/install.sh | bash

# ----- PREREQS -----
# required for local runs
brew install temporal
# required for browser testing
pip install playwright
playwright install chromium
# required for agent plugin steps
pip install claude-agent-sdk

Things to ALWAYS Remember. THEY ARE BIBLE.

  • Rocketship YAML files are strongly typed and must be 100% accurate in order to run. NEVER make assumptions on ANY yaml schema, eg. plugin configs. ALWAYS fetch the docs and read them before editing.

Basic Test Structure

name: "Test Suite Name"
tests:
  - name: "Test Case Name"
    steps:
      - name: "Step Name"
        plugin: "http"
        config:
          method: "GET"
          url: "https://api.example.com/endpoint"
        assertions:
          - type: "status_code"
            expected: 200
        save:
          - json_path: ".id"
            as: "resource_id"

Running Tests

rocketship run -af test.yaml      # Run a test file with auto start/stop of local server
rocketship run -ad .rocketship    # starts the local engine, runs the tests, shuts the engine down

The -a flag is an extremely important flag to use if you're running tests locally (not connecting to the remote cloud). It will automatically start and stop the local server for you after the tests run, so you don't have to manually start and stop the server. If you really wanted to start and stop the server manually, do:

rocketship start server -b # starts the local server in the background
rocketship run test.yaml # runs the tests against the local server
rocketship stop server # stops the local server

I highly recommend you just use the -a flag and let Rocketship handle the server for you.

Variables

# Built-in
{{ .run.id }}  # Unique test run ID

# Environment (from .env file or system env variables)
{{ .env.API_KEY }}
{{ .env.DATABASE_URL }}

# Config (from vars section in YAML or var file)
{{ .vars.base_url }}
{{ .vars.timeout }}

# Runtime (saved during execution)
{{ user_id }}  # From previous save

Passing Variables and Environment

Environment variables:

  1. System: export API_KEY=abc && rocketship run -af test.yaml
  2. .env file: rocketship run -af test.yaml --env-file .env
  3. Custom .env path: rocketship run -af test.yaml --env-file config/.env.staging

Config variables:

  1. In YAML: vars: { base_url: "https://api.example.com" }
  2. Override via CLI: rocketship run -af test.yaml --var base_url=https://staging.api.example.com
  3. From var file: rocketship run -af test.yaml --var-file vars.yaml

Precedence:

  • Environment: System env > --env-file
  • Config: --var CLI flags > --var-file > YAML vars

Core Plugins (Quick Examples)

Examples below are minimal; ALWAYS verify full schema and types in the plugin docs.

HTTP Plugin

- plugin: http
  config:
    method: "POST"
    url: "{{ .vars.api_url }}/users"
    headers:
      Authorization: "Bearer {{ .env.API_TOKEN }}"
    body: |
      {
        "email": "test-{{ .run.id }}@example.com",
        "name": "Test User"
      }
  assertions:
    - type: "status_code"
      expected: 201
  save:
    - json_path: ".id"
      as: "user_id"

Log Plugin

- plugin: log
  config:
    message: "Starting auth flow for run {{ .run.id }}"

Delay Plugin

- plugin: delay
  config:
    duration: "1s"

Script Plugin

- plugin: script
  config:
    language: javascript
    script: |
      const email = state.user_email || "test@example.com";
      save("normalized_email", email.toLowerCase());

Plugin Docs

PluginDescriptionDocs URL
httpHTTP/API testinghttps://docs.rocketship.sh/plugins/http/
supabaseSupabase DB/auth/storagehttps://docs.rocketship.sh/plugins/supabase/
sqlSQL databaseshttps://docs.rocketship.sh/plugins/sql/
agentAI-driven testing with browser toolshttps://docs.rocketship.sh/plugins/agent/
playwrightScripted browser automationhttps://docs.rocketship.sh/plugins/playwright/
browser_useCheaper AI for browser automation but way less performant than agenthttps://docs.rocketship.sh/plugins/browser-use/
scriptJS/shell scriptinghttps://docs.rocketship.sh/plugins/script/
logLogging within testshttps://docs.rocketship.sh/plugins/log/
delayFixed delays between stepshttps://docs.rocketship.sh/plugins/delay/

Advanced Features

Reference