**Behavior-Driven Development (BDD)**は、平易で構造化された言語(Given-When-Then)でソフトウェアの動作を説明するアプローチであり、技術者と非技術者の両方が理解できます。これにより、開発者、テスター、ビジネス関係者間のコミュニケーションを橋渡しし、これらの説明から導き出されたテストを実施します。
BDDとは
BDD focuses on describing BEHAVIOR in business-readable language:
→ write SCENARIOS in a structured natural-language format (Gherkin):
GIVEN some initial context
WHEN an action/event happens
THEN an expected outcome occurs
→ these scenarios are both DOCUMENTATION and executable TESTS
→ Bridges devs, QA, and BUSINESS stakeholders with a shared, readable language.
Gherkinシナリオ
Feature: User login
Scenario: Successful login
Given a registered user with valid credentials
When they submit the login form
Then they should see their dashboard
And a welcome message should be displayed
