- External reference: https://cucumber.io/docs/gherkin/reference/
- External reference: https://www.guru99.com/gherkin-test-cucumber.html
- Given an initial situation
- And possibly other aspects of the initial situation
- When this is done
- And possibly another action
- Then something happens
- And possibly something else happens
You can automatize the execution of those tests by matching each phrase to some code and run this in your continuous integration system
Gherkin uses a set of special keywords to give structure and meaning to executable specifications
Gherkin is a business readable language which helps you to describe business behavior without going into details of implementation. It is a domain specific language for defining tests in Cucumber format for specifications. It uses plain language to describe use cases and allows users to remove logic details from behavior tests.
Remember that, ideally, scenarios should be between 3-5 lines and communicate what the user is doing clearly to the whole team without going into the details of how it will be done. While steps can be reused that should not come at the expense of feature clarity.