How to achieve a truly fast and reliable continuous delivery by applying Behaviour-Driven Development. Discover how to work as a real Scrum Team and obtain continuous delivery via processes instead of tools.
If you liked what you saw, consider following me and checking out my other content on:
- https://medium.com/@domenicosibilio
- https://twitter.com/domsibilio
(Agile O' Day 2019 version)
13. What is Gherkin?
A Business Readable, Domain Specific Language that allows us to write
Executable Specifications!
14. Gherkin Syntax: structure
Feature: Dispensing coffee
As a beverage dispenser owner
I want the dispenser to be able to serve coffee
In order to increase the variety of available beverages
# might want to discuss this scenario with John
Scenario: Serving hot coffee
Given the dispenser is loaded with coffee beans
When a customer orders hot coffee
Then the hot coffee is dispensed
15. Gherkin Syntax: and / constants
Scenario: Hot coffee has run out
Given the dispenser has run out of coffee beans
When a customer orders hot coffee
Then the hot coffee is not dispensed
And the customer is refunded 1$
And the display shows “Product not available.”
16. Gherkin Syntax: outline
Scenario Outline: Available beverages are dispensed
Given the dispenser is loaded with <supply>
When a customer orders a <product>
Then the <product> is dispensed
Examples:
| supply | product |
| coffee beans | hot coffee |
| tea bags | hot tea |
17. Gherkin Syntax: table input
…
Given the dispenser is loaded with the following:
| supply | quantity |
| coffee beans | 13 |
| tea bags | 37 |
…
18. Imperative Scenario: What & How
Scenario:The user is shown relevant search results
Given the user navigates to “http://www.google.com“
And the HTTP response code is 200
When the user clicks the input field with name “q“
And the user types “gherkin“
And the user presses the Enter button
Then the user is redirected to a new page
And the search result contains at least 10 pages
And the first result starts with “http://wikipedia.org/“
19. Declarative Scenario: Just What
Scenario:The user is shown relevant search results
Given the user navigates to the home page
When the user searches for the word “gherkin“
Then the user is shown relevant results
20. I want to know more!
https://cucumber.io/docs/gherkin/reference/