|
|
4 месяцев назад | |
|---|---|---|
| .. | ||
| README.md | 8 месяцев назад | |
| analyze-token-usage.py | 5 месяцев назад | |
| run-skill-tests.sh | 8 месяцев назад | |
| test-document-review-system.sh | 6 месяцев назад | |
| test-helpers.sh | 6 месяцев назад | |
| test-subagent-driven-development-integration.sh | 4 месяцев назад | |
| test-subagent-driven-development.sh | 7 месяцев назад | |
| test-worktree-native-preference.sh | 5 месяцев назад | |
Automated tests for superpowers skills using Claude Code CLI.
This test suite verifies that skills are loaded correctly and Claude follows them as expected. Tests invoke Claude Code in headless mode (claude -p) and verify the behavior.
claude --version should work)./run-skill-tests.sh
./run-skill-tests.sh --integration
./run-skill-tests.sh --test test-subagent-driven-development.sh
./run-skill-tests.sh --verbose
./run-skill-tests.sh --timeout 1800 # 30 minutes for integration tests
Common functions for skills testing:
run_claude "prompt" [timeout] - Run Claude with promptassert_contains output pattern name - Verify pattern existsassert_not_contains output pattern name - Verify pattern absentassert_count output pattern count name - Verify exact countassert_order output pattern_a pattern_b name - Verify ordercreate_test_project - Create temp test directorycreate_test_plan project_dir - Create sample plan fileEach test file:
test-helpers.sh#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
source "$SCRIPT_DIR/test-helpers.sh"
echo "=== Test: My Skill ==="
# Ask Claude about the skill
output=$(run_claude "What does the my-skill skill do?" 30)
# Verify response
assert_contains "$output" "expected behavior" "Skill describes behavior"
echo "=== All tests passed ==="
Tests skill content and requirements (~2 minutes):
Full workflow execution test (~10-30 minutes):
What it tests:
test-<skill-name>.shrun_claude and assertionsrun-skill-tests.shchmod +x test-<skill-name>.sh--timeout if neededWith --verbose, you'll see full Claude output:
./run-skill-tests.sh --verbose --test test-subagent-driven-development.sh
Without verbose, only failures show output.
To run in CI:
# Run with explicit timeout for CI environments
./run-skill-tests.sh --timeout 900
# Exit code 0 = success, non-zero = failure