| name | bdd-scenarios |
| description | Use when writing effective BDD scenarios including acceptance criteria, edge cases, and scenario organization. Use when defining behavior specifications. |
| allowed-tools | ["Bash","Read"] |
BDD Scenarios
Learn to write clear, maintainable BDD scenarios that effectively capture business requirements and drive implementation.
Writing Good Scenarios
A good scenario should be:
- Specific: Test one behavior
- Declarative: Describe what, not how
- Business-focused: Use domain language
- Independent: No dependencies on other scenarios
# Good scenario - specific and declarative
Scenario: Customer receives loyalty discount
Given a customer with Gold membership status
And a cart total of $100
When the customer proceeds to checkout
Then a 10% loyalty discount should be applied
And the final total should be $90
# Bad scenario - too implementation-focused
Scenario: Apply discount
Given I click the membership dropdown
And I select "Gold" from the list
When I click the checkout button
Then the JavaScript calculates 10% off
Acceptance Criteria Format
Feature: Order Refunds
# Rule-based acceptance criteria
Rule: Full refunds are available within 30 days
Scenario: Refund requested within return window
Given an order placed 15 days ago
When the customer requests a refund
Then a full refund should be processed
Scenario: Refund requested after return window
Given an order placed 45 days ago
When the customer requests a refund
Then the refund should be denied
And the customer should see "Return window expired"