<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Richard Haraldson</title>
    <description>The latest articles on DEV Community by Richard Haraldson (@richhardos).</description>
    <link>https://dev.to/richhardos</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1091546%2Fda55e544-b055-40a5-a1bb-d4e424850046.jpg</url>
      <title>DEV Community: Richard Haraldson</title>
      <link>https://dev.to/richhardos</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/richhardos"/>
    <language>en</language>
    <item>
      <title>How the Gherkin Language Can Help Customers and Developers Communicate</title>
      <dc:creator>Richard Haraldson</dc:creator>
      <pubDate>Tue, 27 Jun 2023 09:04:45 +0000</pubDate>
      <link>https://dev.to/richhardos/how-the-gherkin-language-can-help-customers-and-developers-communicate-47n7</link>
      <guid>https://dev.to/richhardos/how-the-gherkin-language-can-help-customers-and-developers-communicate-47n7</guid>
      <description>&lt;p&gt;Especially when businesspeople lack the knowledge and technical vocabulary, communicating with software developers can often be a burdensome task. This is why we make use of &lt;a href="https://softwareplanetgroup.co.uk/user-stories-bridging-the-gap-between-customers-and-developers-updated/"&gt;user stories&lt;/a&gt; and the versatile system metaphor. &lt;br&gt;
To streamline communication even further, however, we use a very clever piece of technology that can make this process even smoother — like a cucumber, one might say.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Cucumber Framework
&lt;/h2&gt;

&lt;p&gt;Cucumber is a BDD (or Behavior-Driven Development) framework that enables the creation of automated software tests — in an easy-to-write, and perfectly understandable way. But while many developers may not yet be well acquainted with this software tool, nearly all of them have dabbled with its popular child language.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the Gherkin language?
&lt;/h2&gt;

&lt;p&gt;Cucumber uses Gherkin as a means to define use cases. At &lt;a href="https://softwareplanetgroup.co.uk/"&gt;SPG&lt;/a&gt;, however, we primarily use it to generate unambiguous project requirements. The example below should serve to illustrate exactly what is meant by this:&lt;/p&gt;

&lt;p&gt;Feature: The Current Account Holder withdraws money&lt;/p&gt;

&lt;p&gt;Scenario: The account in question is not lacking in funds&lt;br&gt;
Given the fact that the account balance is £200&lt;br&gt;
And the debit card is valid&lt;br&gt;
And the cash machine contains enough money&lt;br&gt;
When the Current Account Holder requests £50&lt;br&gt;
Then the cash machine should dispense £50&lt;br&gt;
And the account balance should be £150&lt;br&gt;
And the debit card should be returned&lt;br&gt;
What are Gherkin keywords?&lt;br&gt;
So to break it down into simpler terms, the Gherkin syntax makes use of five indispensable statements that together describe the actions which will be needed to perform a task:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Feature — denotes a high-level description of any given software function&lt;br&gt;
Scenario — describes a concrete example&lt;br&gt;
Given — explains the initial context of the system&lt;br&gt;
When — specifies an event or action&lt;br&gt;
Then — describes an expected outcome, or a result&lt;br&gt;
And (or but)  — increases text fluidity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By making use of these simple keywords, customers, analysts, testers and software programmers are empowered to exchange ideas with terminology recognisable by all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Executable requirements &amp;amp; automated testing
&lt;/h2&gt;

&lt;p&gt;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:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When the Current Account Holder requests £50&lt;br&gt;
Then the cash machine should dispense £50&lt;br&gt;
And the account balance should be £150&lt;br&gt;
And the debit card should be returned&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By extension, Gherkin enables developers to translate requirements into testable code. So 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), you can easily pinpoint problems before proceeding to repair them in a breeze.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Thanks to the Gherkin syntax, far from keeping our customers in a pickle, we can bridge the divide between businesses and developers and deliver outstanding products with greater confidence than ever before. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>productivity</category>
      <category>gherkin</category>
    </item>
  </channel>
</rss>
