• Skip to main content
  • Skip to after header navigation
  • Skip to site footer

Free-Mail

  • Events
  • Images
    • Instagram Goodness
  • Music
  • News
  • Software

How the Gherkin language bridges the gap between customers and developers

How the Gherkin language bridges the gap between customers and developers: How the Gherkin language bridges the gap between customers and developers David Blackwood Tue, 02/07/2023 – 03:00

Communicating with software developers can often be a burdensome task, especially when people lack technical knowledge and technical vocabulary. This is why project managers often use user stories and the versatile system metaphor.

You can assist communication further by utilizing technology designed to facilitate discussions between a project’s stakeholders and developers.

The Cucumber framework

Cucumber is an open source framework that enables the creation of automated software tests using an easy-to-write and common language. It’s based on the concept of behavior-driven development (BDD), which dictates that creating software should define how a user wants an application to behave when specific conditions are true.

The Cucumber framework isn’t “technology” in the modern sense. It’s not a collection of bits and bytes. Instead, it’s a way of writing in natural language (English, in the case of this article, but so far Gherkin has been translated to over 70 languages). When using the Cucumber framework, you aren’t expected to know how to read or write code. You only need to be able to write down ideas you have about how you work. You should also document how you want technology to work for you, using a set of specific terms and guidelines.

What is the Gherkin language?

Cucumber uses Gherkin as a means to define use cases. It’s primarily used to generate unambiguous project requirements. In other words, its purpose is to allow users to describe precisely what they require software to do, leaving no room for interpretation or exception. It helps you think through the process of a transaction with technology and then helps you write it down in a form that translates into programmer logic.

Here’s an example:

 Feature: The Current Account Holder withdraws money Scenario: The account in question is not lacking in funds Given that the account balance is £200 And the debit card is valid And the cash machine contains enough money When the Current Account Holder requests £50 Then the cash machine dispenses £50 And the account balance is £150 And the debit card is returned

As you can see, this is a highly specific scenario in which an imaginary user requests £50, and the ATM provides £50 and adjusts the user’s account balance accordingly. This scenario is just one part of an ATM’s purpose, and it only represents a specific component of a person’s interaction with a cash machine. When a programmer is given the task to program the machine to respond to a user request, this clearly demonstrates what factors are involved.

What are Gherkin keywords?

The Gherkin syntax makes use of five indispensable statements describing the actions needed to perform a task:

  • Feature: denotes a high-level description of any given software function

  • Scenario: describes a concrete example

  • Given: explains the initial context of the system

  • When: specifies an event or action

  • Then: describes an expected outcome, or a result

  • And (or but): increases text fluidity

By making use of these simple keywords, customers, analysts, testers, and software programmers are empowered to exchange ideas with terminology that’s recognizable by all.

More DevOps resources
What is DevOps?
The ultimate DevOps hiring guide
DevOps monitoring tools guide
A guide to implementing DevSecOps
Download the DevOps glossary
eBook: Ansible for DevOps
Latest DevOps articles

Executable requirements and automated testing

Even better, Gherkin requirements are also executable. This is done by mapping each and every keyword to its intended (and clearly stated) functionality. So, to keep with the example above, anything already implemented could automatically be displayed in green:

 When the Current Account Holder requests £50* Then the cash machine dispenses £50* And the account balance is £150 And the debit card is returned 

By extension, Gherkin enables developers to translate requirements into testable code. In practice, you can use specific phrases to check in on your software solutions! If your current code isn’t working properly, or a new change has accidentally caused a software error (or two or three) then you can easily pinpoint problems before proceeding to repair them.

Conclusion

Thanks to the Gherkin syntax, your customers will no longer be in a pickle. You can bridge the divide between businesses and developers and deliver outstanding products with greater confidence than ever before.

Find out more about Gherkin by visiting the Cucumber website or its Git repository.

The Gherkin syntax helps you think through the process of a transaction with technology and then helps you write it down in a form that translates into programmer logic.

Practicing empathy
Image by:

Melissa Hogan, CC BY-SA 4.0, via Wikimedia Commons

DevOps

What to read next
Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.
Register or Login to post a comment.

: Opensource.com David Blackwood

Supporting Open Source.

Have you tried: Visiting Port Elizabeth?

Share this:

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Pinterest (Opens in new window) Pinterest
  • Email a link to a friend (Opens in new window) Email
  • More
  • Share on Tumblr (Opens in new window) Tumblr
  • Print (Opens in new window) Print
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Reddit (Opens in new window) Reddit
Published on 7 February 2023 by Alan Category: SoftwareTag: Between, Bridges, Customers, Developers, Gherkin, Language

Today in History for 20th November 2021

Today in History for 20th November 2021: Historical Events 1890 – Pope Leo XIII encyclical …

Read moreToday in History for 20th November 2021

A conversation about open source design and ethical funding

A conversation about open source design and ethical funding: Pablo Ruiz-Múzquiz is the CEO and …

Read moreA conversation about open source design and ethical funding

South Africa eye Olympic sevens gold at end of long tunnel

South Africa in the news: South Africa eye Olympic sevens gold at end of long tunnel: Now there is a …

Read moreSouth Africa eye Olympic sevens gold at end of long tunnel

About Alan

Previous Post:Trending Now: Mamelodi Sundowns vs Richards Bay
Next Post:South Africa’s ruling party has favoured loyalty over competence – now cadre deployment has come back to bite it

Reach Trust

Reach Trust is a holding trust for a number of companies within the Stratlec Group.

Copyright © 2026 · Free-Mail · All Rights Reserved · Powered by Straton Electrical

Back to top