project-testing
Custom test patterns and fixtures for {project}. Covers E2E, integration, and specialized testing requirements.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o project-testing.zip https://jpskill.com/download/18042.zip && unzip -o project-testing.zip && rm project-testing.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18042.zip -OutFile "$d\project-testing.zip"; Expand-Archive "$d\project-testing.zip" -DestinationPath $d -Force; ri "$d\project-testing.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
project-testing.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
project-testingフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[Skill 名] project-testing
{project} テストパターン
このプロジェクトのカスタムテストパターン、フィクスチャ、および戦略。
変数
| 変数 | デフォルト | 説明 |
|---|---|---|
| COVERAGE_TARGET | 80 | 最低カバレッジ率 |
| E2E_TIMEOUT | 30000 | E2Eテストのタイムアウト(ミリ秒) |
| PARALLEL_TESTS | true | 可能な場合はテストを並行して実行 |
手順
- 必要なテストタイプを特定する(ユニット/統合/E2E)
- 適切なフィクスチャとパターンを使用する
- プロジェクトの命名規則に従う
- 適切なクリーンアップを確実に行う
レッドフラグ - 中止して再検討
もしあなたが以下をしようとしているなら:
- 適切な分離なしにテストを書く
- フィクスチャでクリーンアップをスキップする
- フィクスチャを使用せずにテストデータをハードコードする
- 不安定なテスト(タイミング依存、順序依存)を書く
中止 -> 適切なフィクスチャを使用 -> 分離を確実にする -> その後テストを書く
テストカテゴリ
ユニットテスト
場所: tests/unit/
パターン:
- 単一の関数/メソッドを分離してテストする
- 外部依存関係をモックする
- 高速な実行(それぞれ100ms未満)
統合テスト
場所: tests/integration/
パターン:
- コンポーネントの相互作用をテストする
- テストデータベース/フィクスチャを使用する
- 外部依存関係を持つ可能性がある
E2Eテスト
場所: tests/e2e/ または playwright/
パターン:
- 完全なユーザーワークフローをテストする
- ブラウザ自動化を使用する
- より長い実行時間が許容される
フィクスチャ
データベースフィクスチャ
場所: tests/fixtures/
使用法:
# Python の例
from tests.fixtures import sample_user, sample_order
def test_order_creation(sample_user, sample_order):
# テストは事前設定されたフィクスチャを使用します
pass
モックサービス
場所: tests/mocks/
利用可能なモック:
- [TODO: プロジェクト固有のモックをリストする]
命名規則
| テストタイプ | ファイルパターン | 関数パターン |
|---|---|---|
| ユニット | test_*.py |
test_<function>_<scenario> |
| 統合 | test_*_integration.py |
test_<component>_<action> |
| E2E | *.spec.ts |
test('<feature> - <scenario>') |
カバレッジ要件
| コンポーネント | 最低カバレッジ |
|---|---|
| コアロジック | 90% |
| API routes | 80% |
| ユーティリティ | 70% |
CI 統合
CIで実行されるテスト:
- PR時: ユニット + 統合
- マージ時: E2Eを含むすべて
- 毎晩: 完全なリグレッションスイート
カスタマイズ
このファイルを編集して以下を追加する:
- 新しいフィクスチャ定義
- 追加のモックサービス
- カスタムテストパターン
- カバレッジ例外
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
<!-- Generated by ai-dev-kit:recommend-skills on {date} --> <!-- This skill can be safely deleted if no longer needed -->
{project} Testing Patterns
Custom testing patterns, fixtures, and strategies for this project.
Variables
| Variable | Default | Description |
|---|---|---|
| COVERAGE_TARGET | 80 | Minimum coverage percentage |
| E2E_TIMEOUT | 30000 | E2E test timeout in ms |
| PARALLEL_TESTS | true | Run tests in parallel when possible |
Instructions
- Identify test type needed (unit/integration/e2e)
- Use appropriate fixtures and patterns
- Follow project naming conventions
- Ensure proper cleanup
Red Flags - STOP and Reconsider
If you're about to:
- Write a test without proper isolation
- Skip cleanup in fixtures
- Hardcode test data instead of using fixtures
- Write flaky tests (timing-dependent, order-dependent)
STOP -> Use proper fixtures -> Ensure isolation -> Then write test
Test Categories
Unit Tests
Location: tests/unit/
Patterns:
- Test single functions/methods in isolation
- Mock external dependencies
- Fast execution (< 100ms each)
Integration Tests
Location: tests/integration/
Patterns:
- Test component interactions
- Use test database/fixtures
- May have external dependencies
E2E Tests
Location: tests/e2e/ or playwright/
Patterns:
- Test full user workflows
- Use browser automation
- Longer execution time acceptable
Fixtures
Database Fixtures
Location: tests/fixtures/
Usage:
# Python example
from tests.fixtures import sample_user, sample_order
def test_order_creation(sample_user, sample_order):
# Test uses pre-configured fixtures
pass
Mock Services
Location: tests/mocks/
Available mocks:
- [TODO: List project-specific mocks]
Naming Conventions
| Test Type | File Pattern | Function Pattern |
|---|---|---|
| Unit | test_*.py |
test_<function>_<scenario> |
| Integration | test_*_integration.py |
test_<component>_<action> |
| E2E | *.spec.ts |
test('<feature> - <scenario>') |
Coverage Requirements
| Component | Minimum Coverage |
|---|---|
| Core logic | 90% |
| API routes | 80% |
| Utilities | 70% |
CI Integration
Tests run in CI:
- On PR: unit + integration
- On merge: all including E2E
- Nightly: full regression suite
Customization
Edit this file to add:
- New fixture definitions
- Additional mock services
- Custom test patterns
- Coverage exceptions