Konubinix' opinionated web of thoughts

Gherkin Language

Fleeting

  1. Given an initial situation
  2. And possibly other aspects of the initial situation
  3. When this is done
  4. And possibly another action
  5. Then something happens
  6. 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

https://cucumber.io/docs/gherkin/reference/

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.

https://www.guru99.com/gherkin-test-cucumber.html

Before Gherkin

After Gherkin

https://www.guru99.com/gherkin-test-cucumber.html

https://www.guru99.com/gherkin-test-cucumber.html

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.

https://github.com/cucumber/cucumber-js/blob/main/docs/support_files/world.md

Notes linking here