QA Foundations
Gherkin
Gherkin is a plain-language syntax for writing executable test scenarios in a Given/When/Then structure, bridging business requirements and automated tests in BDD.
Gherkin lets non-technical stakeholders and engineers describe behavior in readable steps that tools like Cucumber execute as automated tests. A scenario reads: Given a precondition, When an action occurs, Then an outcome is expected.
Its keywords (Feature, Scenario, Given, When, Then, And, But) keep specifications human-readable while remaining machine-executable, which is the core idea of Behavior-Driven Development (BDD): one artifact that is both the requirement and the test.
- Given / When / Then steps in plain language.
- Executable by BDD tools such as Cucumber.
- One artifact serves as both requirement and automated test.
Related terms
Sources
See it in your own test results
Qualflare detects flaky tests, clusters failures by root cause, and scores release risk from the test results you already produce in CI. Start free.
Start free with Qualflare← Back to the testing & observability glossary.
Last reviewed August 2, 2026