Behavior-driven development (BDD) structures collaboration around examples and acceptance criteria, building shared understanding between business and technology. Its value lies in the conversation, not Gherkin syntax. section 1.2
Listing 1.1 User story for password reset
As an account holder I want to reset my password So that I can regain control of my account if I suspect it has been compromised
A password-reset user story makes the account holder’s need and reason explicit. section 1.2
Listing 1.2 Acceptance criteria password reset user story
Scenario: Resetting a password revokes existing access Given I am an account holder with one or more active sessions And I have requested a password reset When I successfully set a new password using the reset link Then all existing sessions for my account are invalidated And I must log in again on any device Scenario: A reset link is valid only for a limited time Given I have requested a password reset When I open the reset link within 30 minutes Then I am allowed to choose a new password Scenario: An expired reset link cannot be used Given I have requested a password reset When I open the reset link after 30 minutes Then the link is rejected And I am prompted to request a new one
These scenarios turn intent into verifiable behavior, including session revocation and reset-link expiration. section 1.2







