> Acceptance criteria in Gherkin form is a great way for teams to define and agree on what ‘done’ means ^d5a1b2 ## Scenarios ``` 1. `Scenario` — a label for the behavior you’re going to describe 2. `Given` — the beginning state of the scenario 3. `When` — a specific action that the user takes 4. `Then` — a testable outcome, usually caused by the action in `When` 5. `And` — this continues any of the other three operators ``` > Together these statements describe all of the actions that a user must take to perform a task and the result of those actions. ``` Scenario: User clicks the link Given I am on the homepage When I click the provided link Then I should see the link click confirmation ``` ``` Scenario: Some determinable business situation Given some precondition And some other precondition When some action by the actor And some other action And yet another action Then some testable outcome is achieved And something else we can check happens too ``` > The Product Manager writes Gherkin acceptance criteria before the team starts work on a feature ## Features A group of scenarios ``` Feature: Some terse yet descriptive text of what is desired Textual description of the business value of this feature Business rules that govern the scope of the feature Any additional information that will make the feature easier to understand Scenario: Some determinable business situation Given some precondition And some other precondition When some action by the actor And some other action And yet another action Then some testable outcome is achieved And something else we can check happens too Scenario: A different situation ... ``` ## Related - [[Agile User Story – As a... I want to... So that...]] - https://cucumber.io/ ## Source https://medium.com/@mvwi/story-writing-with-gherkin-and-cucumber-1878124c284c