Note: The homelab gateway runs natively on the Mac Mini M4 Pro (not in Docker). For homelab testing, use the local test suite at
~/.openclaw/bin/openclaw-test.sh(200+ tests). This E2E suite is designed for testing Docker-based or remote gateway deployments.
Post-update end-to-end tests for OpenClaw gateway deployments. Catches regressions after updates, config changes, or infrastructure modifications.
~117 tests across 11 categories — runs in under 2 minutes. Zero dependencies beyond bash, curl, and python3.
git clone https://github.com/chrisbaker2000/openclaw-e2e.git
cd openclaw-e2e
# Interactive setup (auto-detects your deployment)
./setup.sh
# Run tests
./openclaw-test.shOr set up manually:
cp .env.example .env
# Edit .env with your gateway URL and access method
./openclaw-test.sh╔══════════════════════════════════════╗
║ OpenClaw Post-Update E2E Tests ║
╚══════════════════════════════════════╝
Gateway: http://localhost:18789
Container: local → openclaw-gateway
━━━ Gateway Core (7 tests) ━━━
✓ HTTP responds: 200
✓ Health status: healthy
✓ Version: 2026.2.27
✓ CPU: 2.13% (< 50%)
✓ Memory: 460.5MiB
✓ PIDs: 12 (3-100 range)
✓ Healthcheck: configured
━━━ Config Schema Compliance (22 tests) ━━━
✓ Shared config: all required sections present
✓ Primary model format: valid provider/model pattern
...
━━━ Memory Server (21 tests) ━━━
✓ Memory server health: OK
✓ Store: OPENCLAW_E2E_TEST_1772217571 (200)
○ Search (topic filter): server returns 500 (known bug in 0.13.x) (skipped)
...
════════════════════════════════════════
106 passed, 0 failed, 3 skipped
════════════════════════════════════════
Tests skip (not fail) when a feature isn't configured. Start with just a gateway URL and add more as needed.
| Section | Tests | What It Checks |
|---|---|---|
| Core | 7 | Gateway health, HTTP response, version, resource usage |
| Config | 22 | Schema compliance against official docs — model format, providers, auth/bind/reload modes, session settings |
| Cron | 13 | Delivery config, channels, schedules, session targets |
| Plugins | 5 | Registration, manifests, configSchema validity |
| Memory | 21 | Health, CRUD round-trip, structured fields, working memory |
| Channels | 11 | Slack/Discord connectivity, policies, modes |
| Runtime | 7 | Node.js version, container stability, uptime, memory limit |
| Environment | 11 | Error scanning, dangerous flags, security violations |
| Context | 8 | Workspace .md budgets, bloat detection, token estimation |
| Latency | 5 | Gateway HTTP, memory search, skills compilation, startup time |
| Custom Provider | N | Endpoint reachability for Azure, Bedrock, etc. |
All settings live in .env. The only required value is your gateway URL:
OPENCLAW_GATEWAY_URL="http://localhost:18789"Everything else is optional — tests skip cleanly when features aren't configured.
Gateway access enables config validation, cron, plugin, runtime, environment, and context tests. Choose one method:
Method A: SSH + Docker (gateway on a remote host — NAS, VPS, etc.)
OPENCLAW_SSH_HOST="user@host"
OPENCLAW_DOCKER_BIN="docker"
OPENCLAW_CONTAINER="openclaw-gateway"Method B: Local Docker (gateway in Docker on this machine)
OPENCLAW_DOCKER_BIN="docker"
OPENCLAW_CONTAINER="openclaw-gateway"Method C: Native (gateway runs directly on this machine, no Docker)
OPENCLAW_NATIVE=true
# OPENCLAW_MAC_CONFIG_DIR="$HOME/.openclaw" # Default — change if non-standardReads config files and logs from disk. Runs ~80 of ~95 tests. Docker-specific tests (inspect, stats, healthcheck) skip gracefully.
Method D: API-only — leave all access vars empty. Only core HTTP, memory, and latency tests run (~36 tests).
| Feature | Config | What It Enables |
|---|---|---|
| Memory server | OPENCLAW_MEMORY_SERVER_URL |
21 CRUD, health, and working memory tests |
| Slack | OPENCLAW_SLACK_ENABLED=true |
Slack connectivity and policy checks |
| Discord | OPENCLAW_DISCORD_ENABLED=true |
Discord connectivity and policy checks |
| Version pin | OPENCLAW_EXPECTED_VERSION |
Fails if gateway version doesn't match |
| Custom provider | OPENCLAW_CUSTOM_PROVIDER_* |
Tests Azure Anthropic, Bedrock, etc. |
All thresholds have sensible defaults. Adjust for your hardware:
# Latency thresholds (milliseconds)
OPENCLAW_MAX_GATEWAY_HTTP_MS=2000 # default
OPENCLAW_MAX_MEMORY_SEARCH_MS=3000 # default
OPENCLAW_MAX_HEALTH_MS=1000 # default
OPENCLAW_MAX_SKILLS_MS=3000 # default
# Context optimization (workspace .md file budgets)
OPENCLAW_MAX_WORKSPACE_MD_FILES=10 # default
OPENCLAW_MAX_WORKSPACE_MD_BYTES=8000 # default
OPENCLAW_MAX_BOOTSTRAP_TOKENS=2000 # defaultSee .env.example for the full list, or examples/ for deployment-specific templates.
./openclaw-test.sh --section core # Single section
./openclaw-test.sh --section core,config,memory # Multiple sections
./openclaw-test.sh --expected-version 2026.2.20 # Pin expected version
./openclaw-test.sh --gateway-url http://10.0.0.5:18789 # Override URLAvailable sections: core, config, cron, plugins, memory, channels, runtime, environment, context, latency, custom-provider
OPENCLAW_GATEWAY_URL="http://localhost:18789"
OPENCLAW_NATIVE=true
OPENCLAW_MEMORY_SERVER_URL="https://memory.your-project.run.app"
OPENCLAW_SLACK_ENABLED=trueOPENCLAW_GATEWAY_URL="http://localhost:18789"
OPENCLAW_DOCKER_BIN="docker"
OPENCLAW_CONTAINER="openclaw-gateway"
OPENCLAW_SLACK_ENABLED=trueSee examples/ for ready-to-use .env templates:
local-docker.env— Gateway running locally via Docker Composeremote-ssh.env— Gateway on a remote NAS/VPS via SSHapi-only.env— Cloud-hosted gateway, no container access
- Pre-fetch: Caches gateway logs, config, inspect data, and stats in one batch to minimize SSH round-trips
- Transport layer: Abstracts SSH+Docker, local Docker, native, and API-only access behind a unified interface (
lib/transport.sh) - Path abstraction: Uses
_PROC_CONFIG_DIRto resolve config paths correctly in both Docker (/home/node/.openclaw) and native (~/.openclaw) environments - Schema validation: Tests are grounded in
docs-schema.json(extracted from official OpenClaw docs) rather than hardcoded values - Graceful degradation: Each test module checks whether its prerequisites are met and skips cleanly if not — Docker-only features (inspect, stats) skip automatically in native mode
Drop a .sh file in tests/local/ (gitignored). Name your function test_local_<filename> and it runs automatically:
# tests/local/my-checks.sh
test_local_my_checks() {
section "My Custom Tests (2 tests)"
# your tests here using pass/fail/skip helpers
}See CONTRIBUTING.md for full guidelines.
- bash 4+ (macOS ships bash 3 —
brew install bashor use/bin/zsh) - curl (for HTTP tests)
- python3 (for JSON parsing — no
jqdependency) - ssh (only if using SSH container access)
- docker CLI (only if using local container access)
Issues and PRs welcome. When adding new tests:
- Place them in the appropriate
tests/*.shmodule - Use
pass,fail, orskipfromlib/output.sh - Guard with
has_container_accessor config var checks - Use
container_exec/container_logsfromlib/transport.shfor gateway operations - Use
$_PROC_CONFIG_DIRinstead of hardcoding/home/node/.openclaw— this resolves correctly in all modes - Prefer
docs-schema.jsonvalues over hardcoded strings
MIT