Skip to main content
Seb Rose
Co-author of The BDD Books
View all authors

BDD, approval testing, and VisualTest

Seb Rose
Co-author of The BDD Books

This blog post explores the challenges of applying a Behavior-Driven Development (BDD) approach to UI development using VisualTest. In addition to giving a high-level introduction to BDD, I’ll describe a technique called Approval Testing that complements traditional assertion-based testing to give developers clearer visibility of the correctness of their implementation.

Webinar: Introduction to Formulation

Seb Rose
Co-author of The BDD Books

A couple of weeks ago, Gáspár Nagy and I presented a webinar on the BDD practice of formulation. There were so many questions that we were unable to answer them all in the allotted time, so we’re taking this opportunity to publish our answers as a blog.

We’ve merged similar questions together, so what you see below is a summary of the outstanding questions.

How can Cucumber help us understand the root causes of failure?

Seb Rose
Co-author of The BDD Books

I’m continuing to answer questions that were asked during my session “Are BDD and test automation the same thing?” at the Automation Guild conference in February 2021. This is the last of five posts.

  1. Why should automation be done by the dev team?
  2. Isn’t the business-readable documentation just extra overhead?
  3. What’s wrong with changing the scenarios to enable automation?
  4. Can all testing be automated?
  5. How can Cucumber help us understand the root causes of failure?

The question​

Specific about Cucumber reporting. I find that sometimes a single bug can break several Given-When-Then scenarios, which is great to measure business impact, but not great to understand root-causes/bugs. Any ideas on this? We ended up creating a complementary root-cause report...?

Can all testing be automated?

Seb Rose
Co-author of The BDD Books

I’m continuing to answer questions that were asked during my session “Are BDD and test automation the same thing?” at the Automation Guild conference in February 2021. This is the fourth of five posts.

  1. Why should automation be done by the dev team?
  2. Isn’t the business-readable documentation just extra overhead?
  3. What’s wrong with changing the scenarios to enable automation?
  4. Can all testing be automated?
  5. How can Cucumber help us understand the root causes of failure?

The question​

Isn't the goal of repeatability for refactoring confidence, not test confidence?

What's wrong with changing the scenarios to enable automation?

Seb Rose
Co-author of The BDD Books

I’m continuing to answer questions that were asked during my session “Are BDD and test automation the same thing?” at the Automation Guild conference in February 2021. This is the third of five posts.

  1. Why should automation be done by the dev team?
  2. Isn’t the business-readable documentation just extra overhead?
  3. What’s wrong with changing the scenarios to enable automation?
  4. Can all testing be automated?
  5. How can Cucumber help us understand the root causes of failure?

The question​

Why many times I find myself changing the BDD statements once I start automation, as there is certain information needed between steps? BDD framework is supposed to involve many stakeholders and yet I feel the statements are to be written in a very stringent fashion.

Isn't the business readable documentation just overhead?

Seb Rose
Co-author of The BDD Books

After my talk called “Are BDD and test automation the same thing?” at the Automation Guild conference in February 2021 there were more questions than I could answer in the available time. This is the second of five posts answering the five most important ones:

  1. Why should automation be done by the dev team?
  2. Isn’t the business-readable documentation just extra overhead?
  3. What’s wrong with changing the scenarios to enable automation?
  4. Can all testing be automated?
  5. How can Cucumber help us understand the root causes of failure?

The question​

Doesn't adding something like SpecFlow to interface with something like Selenium just add an extra code base that must be maintained? Does the benefit justify the extra work?

Why should automation be done by the dev team?

Seb Rose
Co-author of The BDD Books

I’ve been writing and talking about test automation and BDD for quite a while now. In February 2021 I gave a short version of a talk called “Are BDD and test automation the same thing?” at the Automation Guild conference to explore their relationship and address the confusion that exists in the industry.

The conference organiser, Joe Colantonio, hosted a Q&A session after the talk, but there wasn’t enough time to answer all of the questions. Handily, he provided me with a list of all the questions asked, along with his estimation of their “sentiment” – either neutral or negative. In this series of posts, I am going to address the five unanswered questions that he marked as having a negative sentiment.

The question​

I do not get, why you say the automation part #5 on the graph, should be done by the dev team and never the QA, because it's part of the design process. For example, if a team uses Serenity-BDD with screenplay, which makes it very easy to implement SBEs, shouldn't dev team focus on prod code instead?

Gherkin Rules

Seb Rose
Co-author of The BDD Books

Gojko Adzic wrote his award-winning book, Specification By Example, 11 years ago. Last year, he ran an online poll to determine the most popular format for expressing examples and found that Given/When/Then received 71% of the votes.

Gherkin is probably the reason for this win, because:

  • Given/When/Then are the core keywords of Gherkin
  • Gherkin is the structured syntax understood by automation tools such as Cucumber
  • Cucumber is a widely downloaded, open-source tool, available on numerous platforms

So, it might be fair to say that when it comes to documenting and automating examples, “Gherkin rules.” That is not what this article is about.

Solving: "How to organise feature files?"

Seb Rose
Co-author of The BDD Books

Over the holidays you voted for different ways to organise feature files. This article shows the results of the survey, an analysis of the votes, and some general ideas on how to organise your living documentation.

Gojko Adzic has been running a series of challenges called #GivenWhenThenWithStyle. This is my solution to challenge #16. You should definitely check out the rest of the challenges and their solutions.

Gáspár Nagy and I have written in more detail about writing and organising feature files in our new book, Formulation.

The winner is…​

Specifying relative time periods in feature files

Seb Rose
Co-author of The BDD Books

Gojko Adzic is running a regular challenge called #GivenWhenThenWithStyle and last month’s topic was how to specify relative time periods. In his “solution” article, he disagreed with the majority of challenge respondents, favouring the use of a long scenario outline containing actual dates.

I have a different take to Gojko, that is more in line with the community response. This article describes my approach – but you’d be advised to read Gojko’s original posts first (and subscribe to the challenge).