Files
everything-claude-code/docs/ja-JP/rules/testing.md
2026-02-12 16:56:29 +09:00

30 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# テスト要件
## 最低テストカバレッジ: 80%
テストタイプ(すべて必須):
1. **ユニットテスト** - 個々の関数、ユーティリティ、コンポーネント
2. **統合テスト** - API エンドポイント、データベース操作
3. **E2E テスト** - 重要なユーザーフロー(フレームワークは言語ごとに選択)
## テスト駆動開発
必須ワークフロー:
1. まずテストを書くRED
2. テストを実行 - 失敗するはず
3. 最小限の実装を書くGREEN
4. テストを実行 - パスするはず
5. リファクタリングIMPROVE
6. カバレッジを確認80%+
## テスト失敗のトラブルシューティング
1. **tdd-guide** agent を使用
2. テストの分離を確認
3. モックが正しいことを検証
4. 実装を修正、テストは修正しない(テストが間違っている場合を除く)
## Agent サポート
- **tdd-guide** - 新機能に対して積極的に使用、テストファーストを強制