verify-and-coverage
仕様を実行可能テスト(verify.md)に変換し、カバレッジを分析するワークフロー。Runme.dev形式でE2E/統合テストを記述。使用タイミング:(1) 仕様書(spec.md等)から実行可能なテストドキュメントを作成したい場合(2) テストカバレッジを分析・可視化したい場合(3) 「verify.md作成」「カバレッジチェック」「テスト文書化」リクエスト使用しない場合: ユニットテストのみ必要な場合、既存テストフレームワークで十分な場合
When & Why to Use This Skill
This Claude skill automates the transformation of technical specifications into executable test documentation using the Runme.dev format. It bridges the gap between requirements and verification by generating 'verify.md' files, enabling seamless E2E and integration testing while providing detailed coverage analysis to ensure all software specifications are accurately validated.
Use Cases
- Converting static specification documents (e.g., spec.md) into interactive, executable test suites for End-to-End (E2E) validation.
- Performing requirement-to-test mapping and gap analysis to visualize and improve test coverage.
- Documenting and executing complex integration tests that involve CLI commands, API interactions, and database state verification.
- Streamlining 'Docs as Code' workflows by maintaining runnable test cases directly within version-controlled Markdown files.
- Automating the generation of test documentation for multi-component systems where unit tests are insufficient.
| name | verify-and-coverage |
|---|---|
| description | | |
| 使用しない場合 | ユニットテストのみ必要な場合、既存テストフレームワークで十分な場合 |
| allowed-tools | Read, Bash(runme:*), Bash(curl:*), Bash(git:*) |
実行可能テスト & カバレッジ管理
目的
仕様書(spec.md等)を実行可能なテストドキュメント(verify.md)に変換し、要件カバレッジを管理します。
コンセプト
- verify.md: Runme.dev形式の実行可能テストドキュメント
- coverage.md: 仕様とテストのマッピング・ギャップ分析
ワークフロー
1. verify.md作成
仕様のシナリオを実行可能なテストケースに変換します。
2. カバレッジチェック
仕様の各要件がテストでカバーされているか分析します。
テンプレート
- verify.md: templates/verify-template.md
- README.md: templates/README-template.md
- coverage.md: templates/coverage-template.md
詳細ガイド
Runme.dev統合
verify.mdはRunme.devで直接実行可能です:
# テスト一覧を確認
runme list --filename verify.md
# 特定のテストを実行(<prefix>はchange-idに置き換え)
runme run <prefix>-test-create-resource --filename verify.md
# 全テストを一括実行
runme run --all --filename verify.md
注意: コマンド名はプロジェクト内でユニークである必要があります。<prefix>にはchange-idまたは機能名を使用してください。
テストピラミッドにおける位置づけ
verify.md(統合テスト)は以下をカバーします:
- End-to-Endフロー(UI/CLI → API → DB)
- 外部リソース依存(実際のDB接続、ファイルI/O)
- 複数コンポーネント結合
原則: 可能な限りユニットテストで検証し、外部依存や結合コストが高いものだけverify.mdで確認します。