Integration E2e Testing logo

Integration E2e Testing

Community
shinpr
integration-e2e-testing

受け入れ済みの振る舞いを観測可能な境界で証明する、最小限の統合/E2Eテストセットを選定・設計する。E2Eテストまたは統合テストの作成・レビュー時に使用。

Overview

Publishershinpr
Repositoryai-coding-project-boilerplate
Skill nameintegration-e2e-testing
Stars
234
Forks
28
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by shinpr on GitHub. Read the source before you install it.

Installation

Install the Integration E2e Testing AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/shinpr/ai-coding-project-boilerplate/tree/main/.claude/skills-ja/integration-e2e-testing
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/shinpr/ai-coding-project-boilerplate.git /tmp/ai-coding-project-boilerplate
mkdir -p .claude/skills
cp -r /tmp/ai-coding-project-boilerplate/.claude/skills-ja/integration-e2e-testing .claude/skills/integration-e2e-testing
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Integration E2e Testing in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Integration E2e Testing on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Integration E2e Testing is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

統合テスト・E2Eテスト設計・実装ルール

参照資料

  • references/e2e-design.md — PlaywrightによるE2Eテスト設計原則(候補の性質、選定基準、候補の記録)
  • references/e2e-environment-prerequisites.md — service-integration-e2eの環境前提条件(seed data、auth fixture、環境チェックリスト)。fixture-e2eには稼働中のサービスも実データベースも不要

テスト種別と選定

テスト種別目的スコープ外部依存ファイル形式実装タイミング
統合in-processでのコンポーネント間連携を検証システムの部分的な統合(in-processモジュール。UIコンポーネントではReact/TSのRTL+MSWなど)モックまたはin-process*.int.test.ts実装と並行して作成
fixture-e2e決定論的フィクスチャを用いてブラウザ上の振る舞いを検証モックバックエンドまたはフィクスチャ駆動の状態によるUIフロー全体モック/フィクスチャのみ — ライブサービスなし*.fixture-e2e.test.tsUI機能と並行して作成
service-integration-e2e起動済みスタックでしか確認できない契約を検証サービスをまたいだシステム全体ローカルの実サービスまたはservice-levelスタブ*.service-e2e.test.ts必要なサービスが存在してから実行

レーン選択(E2Eのみ):

  • ユーザー向けUIジャーニーのデフォルトレーンは fixture-e2e — 決定論的フィクスチャに対して実ブラウザを動かし、ユニット/統合テストでは検出できないバグ(ボタンが動作しない、状態が更新されない、ナビゲーションが壊れる等)を検出でき、インフラ準備なしにCIで実行できる
  • 証明義務がデータ永続化、トランザクション整合性、外部サービス契約などの実サービス間の振る舞いにある場合は service-integration-e2e を選択する

受け入れ済みの証明義務から始め、各義務をその失敗を検出できる最も安価な境界に割り当て、重複するカバレッジを除き、残った個別の失敗をすべてカバーする最小のセットを残す。テスト数はその証明義務から決める。ある機能について、特定のレーンにテストが1件もないことも妥当である。

振る舞い優先の原則

候補のエビデンス

統合/E2Eテストの候補は、次の情報を示す:

  • 受け入れ済みの振る舞いが指定する境界での観測可能な結果
  • 選択したレーンが実行するコンポーネントをまたぐ、実害のある不具合
  • その失敗を再現できる自動テストハーネスまたは制御された環境

単独で観測できる振る舞いはユニット/コンポーネント検証へ振り分ける。制御された環境を利用できない場合は、service-integration-e2eの証明前提として記録する。

候補の振り分け

  • ビジネスロジックの正確性、データ整合性、ユーザーが観測できる振る舞い、観測可能なエラーハンドリングは、その境界を必要とする場合に統合/E2Eの候補とする
  • 純粋な実装詳細とデータ変換はユニットテスト、性能に関する主張は性能検証、レイアウトだけの主張はビジュアルまたはUIチェックへ振り分ける
  • 外部契約自体が証明対象である場合は、service-levelスタブまたは制御されたローカルサービスで表現する

スケルトン仕様

必須スケルトン形式

プロジェクトのテスト対象パターンに一致するファイルをコミットする場合、そのファイルはテストランナー上で有効な状態を保たなければならない。検出したフレームワークにおける最小のpendingスイート(describeとit.todo、またはその同等物)を用い、テストフレームワークのimportと必須コメントのみを含める。実装タスクがpendingのケースを置き換え、実装と同時にアプリケーションのimport、アサーション、フィクスチャ、モックセットアップを追加する。

各テストに以下の注釈を含めること。

typescript
// AC: "[受入条件原文]"
// Behavior: [トリガー] -> [処理] -> [観測可能な結果]
// @lane: integration | fixture-e2e | service-integration-e2e
// @dependency: none | [コンポーネント名] | full-ui (mocked backend) | full-system
// @real-dependency: [コンポーネント名](任意。テスト境界で非モックのセットアップを指定した場合)
// Primary failure mode: [実装後のテストが検出すべき具体的なリグレッション]
// Proof obligation: [実装後のテストでアサートすべき境界と観測可能な状態]
// Verification items: [義務が満たされたことを示す観測結果]

@lane 選択ルール:

  • integration — in-processでのコンポーネント間連携。ブラウザは使用しない(例: React/TSではRTL+MSW、その他の言語ではin-processのモジュール/ハンドラ統合)
  • fixture-e2e — モックバックエンドまたはフィクスチャ駆動の状態に対するブラウザレベルのUI検証。@dependencyは通常full-ui (mocked backend)
  • service-integration-e2e — 起動済みのローカルサービスまたはスタブに対するブラウザレベルまたはエンドツーエンドの検証。@dependencyはfull-system

Property注釈

typescript
// Property: `[検証式]`
// fast-check: fc.property(fc.[arbitrary], (input) => [不変条件])

テストセットの選定

  1. 根拠となる成果物またはタスクから、受け入れ済みの振る舞いと記録済みの証明義務を読み取る。
  2. 義務ごとに、テストが検出すべき実害のある不具合と、その検出に使える状態を挙げる。
  3. 既存テストを検索する。同じ境界を実行し、その不具合で失敗する場合にのみ既存のカバレッジを再利用する。
  4. 義務を満たす最も狭いレーンに割り当てる:
    • 単独の実行で振る舞いを確認できる場合はunit/component
    • in-processのコンポーネント契約はintegration
    • バックエンドを決定論的に扱えるブラウザ上の振る舞いはfixture-e2e
    • 永続化、トランザクション、メッセージ、外部契約など、起動済みの境界でしか失敗を検出できないものはservice-integration-e2e
  5. 1つのシナリオで複数の義務を証明でき、アサーションと失敗の対応が明確なままであれば統合する。セットアップや失敗モードが異なる場合は別のシナリオにする。
  6. 残った義務をカバーする最小のセットだけを出力する。各スケルトンに、受け入れ済みの振る舞い、主要な失敗、証明義務、選択したレーン、モック境界を記録する。

受け入れ済みの振る舞いとリポジトリの証明境界を基準に選定する。プロダクト分析や数値化した価値見積もりは不要である。根拠となる情報源とリポジトリのエビデンスを確認しても、受け入れ済みの振る舞いまたは必要な契約が未確定の場合はエスカレーションする。

実装ルール

Property-Based Test実装

Property注釈がある場合、fast-check必須:

  • fc.assert(fc.property(...))形式で記述
  • スケルトンの// fast-check:コメントをそのまま実装に反映
  • 失敗ケース発見時は具体的なユニットテストとして追加(リグレッション防止)

振る舞い検証の実装

振る舞い記述の検証レベル:

ステップ種別検証対象例
トリガーArrangeで再現API障害 -> mockResolvedValue({ ok: false })
処理中間状態または呼び出し関数呼び出し、状態変更
観測可能な結果最終出力の値戻り値、エラーメッセージ、ログ出力

合格基準: 「観測可能な結果」がテスト対象の戻り値またはモックの呼び出し引数として検証されていれば合格

検証項目の決定ルール

スケルトンの状態検証項目の決定方法
// Verification items:が列挙されている列挙された全項目をexpectで実装
// Verification items:がないBehavior記述の「観測可能な結果」から導出
両方ある検証項目を優先し、振る舞いは補足として使用

統合テストのモック境界

レビュー対象の主張に最初に合致する行を採用する:

条件使用する境界
外部アダプター、query、migration、service契約自体がテスト対象実境界、またはservice-integration-e2eレーンのservice-levelスタブ — モックは自身が代役を務める契約を証明できない
外部APIまたはネットワーク呼び出しがテスト対象でないモック
テスト対象のコンポーネント間連携実物のin-processコンポーネント
呼び出し自体がテストの検証対象(例: ログ出力)検証可能なモック(vi.fn())
呼び出しもその対象もテスト対象でない実物、または無視

E2Eテストの実行条件

fixture-e2e:

  • UI機能の実装フェーズと並行して実行する
  • モックバックエンドまたはフィクスチャ駆動の状態を使用する(@dependency: full-ui (mocked backend))
  • 決定論的なフィクスチャのセットアップを用いてCIで実行する

service-integration-e2e:

  • 検証対象のコンポーネントが存在し、そのテストが通すサービスが起動している最も早いフェーズで実行する
  • ローカルの実サービスまたはservice-levelスタブを通して検証対象コンポーネントを実行する(@dependency: full-system)

レビュー基準

スケルトンと実装の整合性

チェック不合格条件
Property検証Property注釈があるのにfast-check未使用
振る舞い検証「観測可能な結果」に対応するexpectがない
検証項目網羅列挙された検証項目がexpectに含まれていない
モック境界統合テストで内部コンポーネントをモック化

共有mutationに対する経路の同等性

複数の経路が同じmutationに到達する場合 — CLIの経路とHTTPハンドラ、スケジュールジョブと手動トリガー、バッチと単件エンドポイント — 4つの軸で比較する: 検証、分類、リソース上限、およびread / parse / mutation / reportingの順序。

差異を許可できるのは意図を決める出所のみ: 要件、Design Doc、ADR。テストはその判断の下流にある。存在する振る舞いを記録するものなので、許容側の経路をカバーする既存テストはそのbypassを許可するのではなく確認していることになる。差異が許可された後は、テストが決定どおりに振る舞うことを検証する。

許可する出所を持たない差異については、bypassを検出するテストを要求する。チェックをスキップする側の経路でmutationを実行し、そのスキップされたチェックが守っていた状態をアサートする。

チェック不合格条件
検証の同等性一方の経路が検証する入力を他方が未検証で受け入れており、その差異を許可する要件も契約もない
分類の同等性同じ失敗が経路によって異なる分類となり、呼び出し側が観測する内容が変わる
リソース上限の同等性一方の経路がサイズ・件数・タイムアウトの上限を強制し、他方が省いている
操作順序の同等性read / parse / mutation / reportingの順序が経路間で異なり、検証前にmutationしたり永続化前に報告したりしうる
bypassのカバレッジ説明のつかない差異について、許容側の経路でmutationを実行するテストがない

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Integration E2e Testing AI skill do?

受け入れ済みの振る舞いを観測可能な境界で証明する、最小限の統合/E2Eテストセットを選定・設計する。E2Eテストまたは統合テストの作成・レビュー時に使用。

Why use Integration E2e Testing on TypingMind?

Because you install it once and use it with any model. Integration E2e Testing is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Integration E2e Testing in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/shinpr/ai-coding-project-boilerplate/tree/main/.claude/skills-ja/integration-e2e-testing. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Integration E2e Testing?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Integration E2e Testing?

As many as you like. As long as a model supports skills, you can use Integration E2e Testing with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Integration E2e Testing AI skill free?

Yes. It is published on GitHub by shinpr under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇