Test Case
テストケース
テストケースは、1つの動きやリスクを確認します。最初の準備、行動、そして期待される結果を明確にします。
もう一つの例
パスワードリセットは、期限切れリンクを使って、新しいパスワードを送信するよ。アカウントの変更は行われず、安全な復旧メッセージが表示されるはずだよ。
主な部分
- 01Code or behavior under test
- 02Observable evidence
- 03Coverage, failure, and recovery
以下の場合に使用します
繰り返し可能でなければならない重要な動作に使用します。セットアップ、データ、手順、結果を明記します。
以下の場合は使用しないでください
「テストログイン」のような曖昧なケースを書かないでください。コードの詳細や無関係なチェックは避けてください。
コードで使用する名前
Given setup → When action → Then observation 出荷前に
Check the environment and prepared test data (fixture). Define a result you can observe, failure and edge cases, isolation, stable inputs, useful error details, and cleanup. Set a time budget, owner, and flaky-test rule.
Outcome:Complete the task with テストケース (Test Case)。 User context:パスワードリセットは、期限切れリンクを使って、新しいパスワードを送信するよ。アカウントの変更は行われず、安全な復旧メッセージが表示されるはずだよ。 Validation approach:テストケース (Test Case)。 Why it fits:繰り返し可能でなければならない重要な動作に使用します。セットアップ、データ、手順、結果を明記します。 Do not use it when:「テストログイン」のような曖昧なケースを書かないでください。コードの詳細や無関係なチェックは避けてください。 Test requirements: Name the system and test environment. Define prepared test data, other inputs, and the result you can observe. Include failure and edge cases, allowed error, isolation, and cleanup. Test operations: Make failures easy to diagnose. Control random or changing inputs. Name an owner. Keep the test fast and simple enough for its release gate. Acceptance criteria: The test fails for the known bug and passes after the fix. It repeats in the target environment, gives useful evidence, and does not expose or change unrelated data. Evidence and limits (evidence boundary):単一の公式標準が全体の用語を管理するわけではありません。その意味はチーム、プラットフォーム、またはフレームワークによって変わる可能性があります。 Unknowns to confirm: Release gate, environment, prepared test data, allowed error, time budget, owner, and flaky-test rule.
このリクエストを確認する
Review how テストケース (Test Case) is used now. Definition: テストケースは、1つの動きやリスクを確認します。最初の準備、行動、そして期待される結果を明確にします。 Release checks: Check the environment and prepared test data (fixture). Define a result you can observe, failure and edge cases, isolation, stable inputs, useful error details, and cleanup. Set a time budget, owner, and flaky-test rule. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.