オプション

テストカバレッジのギャップを分析する。 ユーザーが「テストカバレッジ」、「テストされていない部分」、「カバレッジのギャップ」、「欠落しているテスト」、「カバレッジレポート」、または「テストが必要な部分」といった表現を使った場合に使用します。

...すべて拡張します
13
更新された時間 2026年8月25日

概要coverage

このスキルは、エンドツーエンドテストおよびPlaywrightテストに焦点を当て、アプリケーション内のテストcoverage のギャップを分析します。 このスキルは、テスト可能なすべての領域(ルート、コンポーネント、APIエンドポイント、および重要なユーザーフロー)をマッピングし、既存のテストと比較することで、実際に何がテストされているのかが不明確という問題を解決します。これにより、チームはcoverage が不十分な箇所を把握できるようになります。

このワークフローでは、Exploreサブエージェントを使用して、ルートやページ(Next.jsアプリのディレクトリ、React Router、Vue Routerなど)、インタラクティブなコンポーネント、APIエンドポイントをカタログ化し、既存の`*.spec.ts`/`*.spec.js`ファイルをスキャンして、どのページ、コンポーネント、エンドポイントがテストされているかを特定します。 その結果、カバレッジ状況(カバレッジあり/部分的/未カバレッジ)を示すcoverage マトリックス表を生成し、ビジネスへの影響度(クリティカル、高、中、低)に基づいて未カバレッジ領域に優先順位を付け、必要なテスト数、推奨テンプレート、および工数見積もりを含む具体的なテスト計画を提案します。 オプションで、関連する `/pw:generate` コマンドを実行することで、優先度の高い未カバレッジ領域に対するテストを自動生成することも可能です。

このツールは、単純なパーセンテージではなく、coverage の構造化された優先順位付けされたビューを求める、Playwrightを使用するQAエンジニアや開発者を対象としています。ソースファイルやテストファイルを読み取り、テスト生成をトリガーすることもできますが、その分析自体はコードベースの読み取り専用検査であり、レポートと推奨事項を生成します。

よくある質問

このスキルにはどのような機能がありますか?

アプリケーションのルート、コンポーネント、APIエンドポイント、およびユーザーフローをマッピングし、それらを既存のテストと比較して、優先順位付けされたcoverage マトリックスとテスト計画を生成します。

どのテストフレームワークを基盤としていますか?

Playwrightによるエンドツーエンドテストです。*.spec.ts / *.spec.jsファイルをスキャンし、付属の/pw:generateコマンドと連携します。

ギャップの優先順位はどのように決定されますか?

ビジネスへの影響度に基づいて優先順位を付けます。認証や決済といった重要な領域を最優先とし、次にユーザー向けのCRUDやナビゲーション、設定やエッジケース、そして価値の低い静的ページという順になります。

不足しているテストを自動生成できますか?

オプションで可能です。テストの欠落を報告した後、上位N件の欠落に対してテストを生成するかどうかを確認し、推奨テンプレートを指定して /pw:generate を実行できます。

分析中にコードを変更しますか?

coverage による分析自体は読み取り専用であり、ルート定義、コンポーネント、および仕様ファイルを検査します。テストの生成は、これとは別の、オプションで実行可能なステップです。

GitHubで見る

Map all testable surfaces in the application and identify what's tested vs. what's missing.

Steps

1. Map Application Surface

Use the Explore subagent to catalog:

Routes/Pages:

  • Scan route definitions (Next.js app/, React Router config, Vue Router, etc.)
  • List all user-facing pages with their paths

Components:

  • Identify interactive components (forms, modals, dropdowns, tables)
  • Note components with complex state logic

API Endpoints:

  • Scan API route files or backend controllers
  • List all endpoints with their methods

User Flows:

  • Identify critical paths: auth, checkout, onboarding, core features
  • Map multi-step workflows

2. Map Existing Tests

Scan all *.spec.ts / *.spec.js files:

  • Extract which pages/routes are covered (by page.goto() calls)
  • Extract which components are tested (by locator usage)
  • Extract which API endpoints are mocked or hit
  • Count tests per area

3. Generate Coverage Matrix

## Coverage Matrix| Area | Route | Tests | Status ||---|---|---|---|| Auth | /login | 5 | ✅ Covered || Auth | /register | 0 | ❌ Missing || Auth | /forgot-password | 0 | ❌ Missing || Dashboard | /dashboard | 3 | ⚠️ Partial (no error states) || Settings | /settings | 0 | ❌ Missing || Checkout | /checkout | 8 | ✅ Covered |

4. Prioritize Gaps

Rank uncovered areas by business impact:

  1. Critical — auth, payment, core features → test first
  2. High — user-facing CRUD, search, navigation
  3. Medium — settings, preferences, edge cases
  4. Low — static pages, about, terms

5. Suggest Test Plan

For each gap, recommend:

  • Number of tests needed
  • Which template from templates/ to use
  • Estimated effort (quick/medium/complex)
## Recommended Test Plan### Priority 1: Critical1. /register (4 tests) — use auth/registration template — quick2. /forgot-password (3 tests) — use auth/password-reset template — quick### Priority 2: High3. /settings (4 tests) — use settings/ templates — medium4. Dashboard error states (2 tests) — use dashboard/data-loading template — quick

6. Auto-Generate (Optional)

Ask user: "Generate tests for the top N gaps? [Yes/No/Pick specific]"

If yes, invoke /pw:generate for each gap with the recommended template.

Output

  • Coverage matrix (table format)
  • Coverage percentage estimate
  • Prioritized gap list with effort estimates
  • Option to auto-generate missing tests

すべてのファイル

1件のファイル

coverageをインストール

スキルファイルをダウンロードし、.claude/skills/ ディレクトリに解凍してください。

ZIPをダウンロード

リポジトリをクローンし、スキルファイルをプロジェクトにコピーしてください。

git clone https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/playwright-pro/skills/coverage/SKILL.md # Copy SKILL.md to your .claude/skills/ directory

コピー コピー
クイックセットアップ: スキルフォルダを .claude/skills/ にコピーしてください。Claude が自動的にスキルを検出して使用します。

関連スキル

playwright-cli
更新された時間 2026年6月29日
frontend-testing-best-practices
更新された時間 2026年7月7日
Playwright Browser Automation
更新された時間 2026年6月29日
playwright-generate-test
更新された時間 2026年6月29日
OR