Testing / Cucumber Interview Questions
What is Gherkin?
Gherkin is the plain-text, line-oriented language Cucumber (and its Gherkin-compatible relatives, like SpecFlow/Reqnroll) uses to describe behavior in a structured but human-readable way. It uses a small, fixed set of keywords, Feature, Scenario, Given, When, Then, And, But, and a few others, to organize examples of expected behavior.
Feature: shopping cart Scenario: adding an item increases the total Given the cart is empty When the customer adds a "Widget" priced at 9.99 Then the cart total should be 9.99
Gherkin is intentionally simple: it has no loops, conditionals, or variables of its own. That simplicity is a deliberate design choice, keeping feature files readable by non-programmers, while all the actual logic and control flow lives in the step definitions that interpret each line.
More Related questions...