| Suite | Command | Credentials | CI-safe |
|---|---|---|---|
| Unit/Integration | pnpm test |
None | Yes |
| E2E (Gateway) | pnpm test:e2e |
None | Yes |
| Live | pnpm test:live |
Real API keys | No |
pnpm build && pnpm check && pnpm testValidates multi-instance gateway, WebSocket/HTTP, node pairing.
pnpm test:e2eEnv vars:
OPENCLAW_E2E_WORKERS: Worker count (2-4 CI, 4-8 local)OPENCLAW_E2E_VERBOSE: Verbose output
Two layers:
Layer 1 - Direct Model Completion: Tests provider/model response with real credentials.
OPENCLAW_LIVE_MODELS=modern pnpm test:liveLayer 2 - Gateway + Agent Smoke: Full agent pipeline with read/exec/image probes.
- Profile store:
~/.openclaw/credentials/(preferred) - Environment variables
- Config:
~/.openclaw/openclaw.json - Auto-sources
~/.profile
| Variable | Purpose |
|---|---|
OPENCLAW_LIVE_MODELS |
Model allowlist (e.g., modern) |
OPENCLAW_LIVE_GATEWAY_MODELS |
Gateway model allowlist |
OPENCLAW_LIVE_PROVIDERS |
Provider filter |
OPENCLAW_LIVE_REQUIRE_PROFILE_KEYS |
Profile-store only |
OPENCLAW_LIVE_SETUP_TOKEN |
Anthropic setup-token test |
OPENCLAW_LIVE_CLI_BACKEND |
CLI backend test |
OPENCLAW_TEST_VM_FORKS |
Override VM forking (0/1) |
pnpm test:docker:live-models
pnpm test:docker:live-gatewayMounts ~/.openclaw and sources ~/.profile.
Prefer CI-safe regressions with mock/stub providers. Target the smallest failing layer:
- Provider conversion
- Gateway session handling
- Tool pipelines
# Terminal 1: gateway in dev mode
openclaw --dev gateway --port 19001 --verbose --force
# Terminal 2: TUI connected to dev gateway
openclaw --dev tui
# Terminal 3: tail logs
openclaw --dev logs --follow# Raw assistant output before formatting
OPENCLAW_RAW_STREAM=1 openclaw --dev gateway --port 19001
# Raw protocol chunks before parsing
PI_RAW_STREAM=1 openclaw --dev gateway --port 19001Logs to .jsonl files. Contains sensitive data - delete after debugging.