Exam Guide: Gherkin Language
What is Gherkin Language?
Gherkin is a business readable language that helps stakeholders without technical knowledge understand the software's behavior. It’s commonly used to write acceptance test scenarios and automate testing in Behavior Driven Development (BDD).
Why is it important?
Gherkin Language provides a uniform way of viewing scenarios, making it easier for any stakeholder to understand the software's functionality. It bridges the communication gap between tech and non-tech personnel and maintains living documentation. This makes Gherkin Language essential in an agile environment and systems development.
How it works?
Gherkin uses a set of special keywords to define and connect different parts of a scenario, including Feature, Scenario, Given, When, Then, And, But, etc. It’s usually written on a .feature file and is processed by a tool like Cucumber.
Exam Tips: Answering Questions on Gherkin Language
1. Understand the syntax: Pay close attention to the Gherkin language keywords and their sequence in a scenario.
2. Practice scenario creation: Writing practice scenarios in Gherkin can help you become familiar with the language.
3. Know when to use ‘And’ and 'But': These are mainly used for chaining multiple Given, When, Then steps.
4. Grasp the significance: Understanding the importance of why and how Gherkin language is used can guide you in answering correctly.
5. Understand its role in BDD: Understanding Gherkin’s role in BDD can help differentiate it from other types of testing methods.