integration-testing
できること
このスキルは、重要なワークフローを見直し、サービス、データベース、コンポーネントがどのように連携するかをカバーするテストを追加します。信頼できるリリースを望む開発者向けです。
使う場面
- ✓機能が単体のテストに通るが、すべての部分をつなぐと失敗するとき。
- ✓API のルートが、テストされていないサービスやデータベースを呼び出しているとき。
- ✓最も重要な利用者のワークフローに、自動チェックがほしいとき。
スキルのリンク
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/integration-testing/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“アプリのチェックアウトの流れについて、統合テストを書いてもらえますか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、システムの部分が接する箇所を特定し、その接続についてのテストを書きます。すべてをモックするのではなく、可能なら本物のテスト用データベースを使うことを提案します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Write integration tests for key workflows
Unit tests verify individual functions in isolation, but they can't catch the bugs that occur when those functions interact — a perfectly correct validation function and a correct database function can still fail when wired together incorrectly. Integration tests catch these wiring bugs before they reach production, where they're expensive to diagnose.
Quick Reference
- Integration tests verify that multiple units work correctly together
- Test at the boundary where different parts of your system meet
- Use a real database in tests (test DB or in-memory) rather than mocking everything
- Test happy paths and the most critical error paths
Check
Identify the key integration points in this codebase — where API routes call services, where services interact with the database, and where components interact with state management. Are these tested?
Fix
Write integration tests for the identified critical paths, testing the interactions between components rather than each in isolation.
Explain
Explain integration testing, how it differs from unit and E2E testing, and what tools to use for API and component integration tests.
Code Review
Review tests, CI workflows, and enforcement points related to Write integration tests for key workflows. Flag exact gaps where the rule is not automatically verified or where failures do not block regressions.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/testing/integration-testing
よくある質問
エンドツーエンドのテストとはどう違いますか?
統合テストは複数の単位が連携する様子を確認し、エンドツーエンドのテストは利用者の流れ全体をカバーするとこのスキルは説明しています。
データベースはモックすべきですか?
可能なら本物のテスト用データベース、またはインメモリのデータベースを推奨しています。
どの経路をテストすべきですか?
正常系と、最も重要なエラーの経路をテストすることを提案しています。
詳細
作者による元の説明
Use when reviewing CI coverage, automated checks, or test strategy related to Write integration tests for key workflows. Focus on whether the rule is continuously verified, not just documented.
人気
- GitHubのスター
- 75k
- ランキング
- #2895
- ライセンス
- MIT
- 更新日
- 2026/10/31
コメント
- …
このリポジトリの他のスキル
frontendchecklist
75kコマンドラインツールを使って、フロントエンドのコードとライブページを、アクセシビリティ、速度、SEO、セキュリティに関する380以上のルールと照らし合わせて確認します。
frontend-checklist-global
75kフロントエンドのプロジェクトを、386のFront-End Checklistのルールすべてと照らし合わせて監査し、見つかった問題ごとに具体的な修正方法を示します。
404-page
75k見つからないページの画面に役立つリンクがあり、本物の404ステータスを返すかを確認し、迷った訪問者が目的のページを見つけられるようにします。
about-page
75kサイトの運営者が誰かを説明する、分かりやすいAboutページがあるかを確認し、訪問者と検索エンジンからの信頼を高めます。
似ているスキル
test-driven-development
311k機能や修正を作る前に、まず失敗するテストを書き、それが失敗するのを確認してから、合格させる最小のコードを書くようエージェントに教えます。
verification-before-completion
311kタスク、修正、ビルドが完了した、または合格したと主張する前に、実際のチェックを実行し、その出力を読むようエージェントに教えます。
migrate-to-shoehorn
310kテストファイル内の危険な型キャストを、shoehornライブラリに置き換え、テストが部分的なデータを使いつつ型チェックを通るようにします。