Install
openclaw skills install @jlacroix82/agent-testsDefine, run, and track tests for agent behavior. Test cases, assertions, regression tracking, and performance benchmarking. Zero external dependencies.
openclaw skills install @jlacroix82/agent-testsStop guessing if your agent still works. Start testing it.
Agent behavior changes with every model update, config change, and skill addition. Without tests, you have no way to know if something broke until a user catches it.
Agent Tests gives you a lightweight testing framework for agent behavior.
node skills/agent-tests/agent-tests.js --test --add greet "Say hello" "Hello" "contains:Hello"
node skills/agent-tests/agent-tests.js --test --list
node skills/agent-tests/agent-tests.js --test --run greet
node skills/agent-tests/agent-tests.js --test --run
node skills/agent-tests/agent-tests.js --benchmark greet 10
Runs the test 10 times, reports average/min/max duration and pass rate.
node skills/agent-tests/agent-tests.js --regression
Shows pass rates, recent failures, and performance trends for all tests.
node skills/agent-tests/agent-tests.js --test --remove greet
node skills/agent-tests/agent-tests.js --status
| Assertion | Example | What it checks |
|---|---|---|
| Default | "expected text" | Expected text is in output |
contains: | contains:Hello | Output contains "Hello" |
not_contains: | not_contains:error | Output does NOT contain "error" |
regex: | regex:\d{3} | Output matches regex pattern |
length: | length:42 | Output is exactly 42 chars |
memory/agent-tests/tests.jsonData files stored in: memory/agent-tests/
tests.json — Test definitionsresults.json — Test results history (last 1000)benchmarks.json — Benchmark history (last 50 per test)Override data directory:
--dir /path/to/data
When testing agent behavior:
--test --add for critical behaviors--test --run before model/config updates--benchmark to track performance drift--regression during heartbeats--test --remove for outdated test cases| Approach | Test Framework | Regression | Benchmark |
|---|---|---|---|
| Manual checking | ❌ | ❌ | ❌ |
| Full test framework | ✅ | ⚠️ | ❌ |
| Agent Tests | ✅ | ✅ | ✅ |
Agent Tests gives you behavior testing + regression tracking + benchmarking with zero dependencies.