Have a question?
Message sent Close

News & Events

SAFe® Consulting Services

Category: Agile Leadership

Never Google BDD Tutorial

Date of Release: October 11th, 2021
Reading Time: 04 mins

Leslie

Written by Leslie Brooks
linkedinicon

Never Google ‘BDD Tutorial’​

You should never, ever Google ‘BDD Tutorial’ or ‘Gherkin Tutorial’. Why? Once when I was teaching a BDD class I was walking around listening to the students working on an exercise, and noticed that one of the students had his phone out, and had some Gherkin on it. I looked more closely, and thought “Why does that Gherkin look familiar?”. Then I realized that it looked familiar because it was in my course material – in the section titled ‘Bad Gherkin’!

My student was eager to learn, and had very cleverly Googled ‘Gherkin Tutorial’, but had unfortunately found that there are far more really bad examples than there are good examples on the Internet.
What do I mean by bad examples? I searched ‘Gherkin Tutorial’ and clicked on the first 10 links:
Link #1:
  1. The first Scenario has seven lines, including two ‘And’ statements after the ‘When’. This isn’t a requirement, it is a script – a Gherkin anti-pattern.
  2. It says ‘I enter a credit card number that is less than 16 lines long’. ‘Less than 16’ isn’t concrete – does that mean 15? 14? 0? -1? BDD requires examples to be concrete. Gojko Adzic gave BDD a better name, ‘Specification by Example’. Examples must be concrete, exact, precise.
  3.  It talks about the interface – another Gherkin anti-pattern.
  4. Finally, the ‘Then’ isn’t concrete either.

Four mistakes in the first Scenario in this ‘Tutorial’!

Link #2:

Cucumber.io – an excellent resource!

Link #3:

This tutorial talks about using BDD to “write test cases” – but BDD isn’t about testing, it is about changing the way the Product Owner, Business Analyst, Developer, and QA communicate. It is about creating a ubiquitous language in which we can write requirements – not test scripts. Aslak Hellesoy wrote Cucumber, and in a blog post he wrote “If you think Cucumber is a testing tool, please read on, because you are wrong.”

 Link #4:

“Cucumber is a testing framework….” Aslak wrote Cucumber, and he said this isn’t true.

Link #5:

“Cucumber is a software tool used by the testers to develop test cases…”

Link #6:

WOW! I am shocked! Link #6 is almost giving good advice! Almost…

Link #7:
  1. Talks about the interface (a Gherkin anti-pattern)
  2. Talks about sequence (a Gherkin anti-pattern)
  3. Says ‘write a script’

I won’t keep going, but I hope you see why you should never, ever Google ‘BDD Tutorial’! You will get really, really bad advice and training. Of the first ten links that I clicked on, only one was really reliable.

SBE/BDD is an incredibly powerful methodology for communicating requirements, developing software, and delivering automated tests, and your team will really benefit if you learn to do it well. So if you can’t Google for help, where can you go to learn Specification by Example/BDD and Gherkin – and learn it really well? Contact me and I will be glad to point you to really good resources!

Trending Posts

Creating a Culture of Accountability within Your Agile Team

Accountability serves as the vital link connecting tasks to objectives and aligning individuals across an organization.
Last updated on 13th July 2023

 

The QA Team Should NEVER Find a Bug!

Many companies use metrics to measure the performance of the Sales Team, the Developers, the QA Team, etc.
Last updated on 14th May 2023

 

Do You Want to Save $50,000 per Developer per Year?

A number of case studies have shown that a typical developer spends 30% to 40% of their time fixing bugs.
Last updated on 11th October 2021

 

Follow Us

Creating a Culture of Accountability within your Agile Team
July 13th, 2023
Writer: Stephen Otterstrom

Creating a Culture of Accountability within your Agile Team

Accountability serves as the vital link connecting tasks to objectives and aligning individuals across an organization.

Agile Leadership
October 11th, 2021
Writer: Leslie Brooks

Pytest-BDD vs. Behave

Love it or loath it, Python is the language of choice for most Data Scientists – so if the work is done in Python and you are writing the requirements in Gherkin, what tool should you use to automate testing?

Data Science
November 8th, 2021
Writer: Leslie Brooks

SBE BDD for Data Science

Data Science and Big Data are hot topics, and rightly so – companies can save huge sums, or dramatically increase sales, by analyzing the data that they already collect. Specification by Example is a great partner in this effort.

Be a part of SevenSparx community to enjoy free resources in your inbox!

Right Menu IconAll Courses