Software Development
Gherkin
Definition
Gherkin is a business-readable, domain-specific language that lets you describe software’s behavior without detailing how that behavior is implemented. It is a line-oriented language that uses indentation to define structure.
Why It Matters
Gherkin is the language used in Behavior-Driven Development (BDD) to create a shared understanding between technical and non-technical stakeholders. It describes behavior in a way that everyone can read and agree upon.
Contextual Example
A Gherkin scenario is written using keywords like `Given`, `When`, and `Then`. For example: `Given a user is logged in, When they click the "Logout" button, Then they should be returned to the homepage.`
Common Misunderstandings
- Gherkin files (with a `.feature` extension) are just text files. They need a tool like Cucumber or SpecFlow to be executed as automated tests.
- The goal of Gherkin is communication and collaboration.