This skill analyzes existing skill scripts and automatically generates comprehensive test documentation. It identifies scripts in the scripts/ directory, analyzes their functionality, and produces test cases covering both normal and exceptional scenarios.
Use this skill when:
First, identify and analyze the scripts in the target skill:
scripts/ directoryFor each script, generate test cases covering:
Normal Cases:
Edge Cases:
Error Cases:
Generate documentation in one of two formats:
Option A: Create TESTING.md
Create a standalone testing document with:
Option B: Update SKILL.md
Add a "Testing" section to the existing SKILL.md with:
Include concrete test command examples that can be copied and executed:
# Example test commands for a hypothetical script
python scripts/process_data.py --input test_data/valid.json
python scripts/process_data.py --input test_data/empty.json # Edge case
python scripts/process_data.py --input nonexistent.json # Error case
Use this standard format for test cases:
| ID | Script | Type | Description | Input | Expected Output | Command |
|---|---|---|---|---|---|---|
| ---- | -------- | ------ | ------------- | ------- | ----------------- | --------- |
| TC001 | process.py | Normal | Process valid JSON | {"key": "value"} | Success, output file created | python scripts/process.py input.json |
| TC002 | process.py | Edge | Process empty file | Empty file | Graceful handling, empty output | python scripts/process.py empty.json |
| TC003 | process.py | Error | Missing input file | N/A | Error message, exit code 1 | python scripts/process.py missing.json |
test_template.py - Template generator for creating test case documentationWhen run against a skill with scripts, this skill produces:
共 1 个版本