Cucumber and Gherkin: a guide to open-source automation testing

Table of Contents

Cucumber and Gherkin: Important Concepts
- What is Cucumber?
- Behaviour Driven Development (BDD) with Cucumber
- User Story
- Example of User Stories
- What is Gherkin?
- How does Gherkin work?
The Basics of Cucumber and Gherkin
Setup Guides
Testing with Cucumber
- Web Testing with Cucumber
- Mobile Test Automation with Cucumber
Cucumber and Gherkin in the Cloud

Cucumber and Gherkin: Important Concepts

Cucumber and the Gherkin syntax are spriteCloud’s preferred tool and language. This is because they are open-source (making them widely available for diverse teams) and because the Gherkin syntax allows easier readability of test scenarios helping to bridge the gaps between stakeholders. To give more insight into why we love the powerful duo, we will explain a few important concepts.

What is Cucumber?

Cucumber is an open-source, software tool that supports the Behaviour Driven Development (BDD) framework for writing automated acceptance tests. Cucumber is written in the Gherkin language to define test cases, more of which will be explained later on. Cucumber was originally written in Ruby but now supports various other programming languages like Java, JavaScript, Python and .Net. Cucumber is often used along with Selenium and Watir (amongst others). Our setup guide will explain how to to get started with using our preferred setup of Ruby, Cucumber and Watir.

Behaviour Driven Development (BDD) with Cucumber

Behavior Driven Development is an agile software development process that is designed to encourage collaboration between the ‘three amigos,’ i.e. business managers, developers, and testers. BDD was born out of test-driven development and is about rethinking the approach to unit testing and acceptance testing.

  • Make the tests fail;
  • Then implement the unit;
  • Verify that the implementation of the unit makes the tests succeed.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store