run-test-plan
Execute YAML test plan, stop on first failure, output rich debug prompt
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/anderskev/run-test-planRun Test Plan
Execute a YAML test plan, run setup commands, health checks, and each test sequentially. Stop on first failure with rich debug output.
Prerequisites
- agent-browser skill: Browser tests require the
agent-browser:agent-browserskill to be available
Arguments
--plan <path>: Path to test plan (default:docs/testing/test-plan.yaml)--skip-setup: Skip setup commands and health checks (for re-running after failure)
Step 1: Parse Test Plan
Read and validate the test plan:
# Resolve plan path from --plan (default shown)
PLAN_PATH="${PLAN_PATH:-docs/testing/test-plan.yaml}"
# Check file exists
ls "$PLAN_PATH" || { echo "Error: Test plan not found: $PLAN_PATH"; exit 1; }
# Validate YAML
python3 -c "import yaml; yaml.safe_load(open('$PLAN_PATH'))" || { echo "Error: Invalid YAML: $PLAN_PATH"; exit 1; }
Extract from the YAML:
setup.commands: List of setup commandssetup.health_checks: List of URLs to polltests: Array of test cases
Step 2: Run Setup (unless --skip-setup)
2a. Check Prerequisites
If setup.prerequisites exists, verify each one:
# For each prerequisite in setup.prerequisites
<prerequisite.check> || { echo "Prerequisite not met: <prerequisite.name>"; exit 1; }
2b. Set Environment Variables
If setup.env exists, export each variable. Variables using ${VAR} syntax should be resolved from the current environment:
# For each key/value in setup.env
export <key>="<value>"
2c. Build
If setup.build exists, execute build commands sequentially:
# For each command in setup.build
<command> || { echo "Build failed: <command>"; exit 1; }
2d. Start Services
If setup.services exists, start long-running processes and wait for health checks:
# For each service in setup.services
nohup <service.command> > .beagle/service-<index>.log 2>&1 &
echo $! > .beagle/service-<index>.pid
For each service with a health_check, poll until ready:
timeout=<service.health_check.timeout or 30>
url=<service.health_check.url>
elapsed=0
while [ $elapsed -lt $timeout ]; do
if curl -s -o /dev/null -w "%{http_code}" "$url" | grep -qE "^(200|301|302)"; then
echo "✓ Health check passed: $url"
break
fi
sleep 2
elapsed=$((elapsed + 2))
done
if [ $elapsed -ge $timeout ]; then
echo "✗ Health check timeout: $url"
exit 1
fi
2e. Legacy Setup Format
If the plan uses the older flat format (setup.commands + setup.health_checks instead of prerequisites/build/services), fall back to executing setup.commands sequentially and polling setup.health_checks as before.
Step 3: Gate — setup ready before tests
Do not start Step 4 until each condition you can check is true:
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-anderskev-run-test-plan": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
tutorial-docs
Tutorial patterns for documentation - learning-oriented guides that teach through guided doing
fetch-pr-feedback
Fetch review comments from a PR and evaluate with receive-feedback skill
swift-testing-code-review
Reviews Swift Testing code for proper use of
rust-testing-code-review
Reviews Rust test code for unit test patterns, integration test structure, async testing, mocking approaches, and property-based testing. Covers Rust 2024 edition changes including async fn in traits for mocks,
explanation-docs
Explanation documentation patterns for understanding-oriented content - conceptual guides that explain why things work the way they do