Modern Testing trough BDD


During the summer of 2022 (June to be precise) I joined a new company, where the team is using BDD. Up to now, all my experience with BDD was theoretical, I read about it, watched a few courses, and tried using BDD-friendly tools, the ones using Gherkin Given/When/Then syntax for test scenarios. The idea here is to “shift-left” your testing, by testing as early as possible. So in practice, you will be testing the user stories before there is any code developed. In this process, for example, a tester comes up with test scenarios (or test ideas, as we call them on the project I’m on), includes examples with test data needed to cover the most important options for that scenario, and in the scenario outline we describe what the scenario does in short. 

The test scenarios are then reviewed by the Product Owner, who usually has suggestions on how to improve the scenarios from the business logic point of view. The developers also review the test ideas/scenarios and provide their input. After that the tester implements all the feedback and the developer in charge of the story works on creating automated checks for those requirements, for now on the API level, so we get a high coverage of business logic in a way that’s faster and more maintainable than automating the business logic on the UI level. The API automated checking framework is using Cucumber from the Rest-assured API testing library and functional Java – which is a brand new concept for my OOP brain.

This is the closest I got to working in line with the Modern Testing Principles, where the whole-team approach to quality is on a high level and the testers are not the only ones testing. In this fashion, there is no blocking the QA phase, testers are not acting like a safety net – where others think they don’t need to test things, as QA will catch the bugs. Another advantage is that there are no silos, and no throwing tickets over the wall – everyone contributes from the begging to the end of the SDLC!

Resources

  • RestAssured API Testing – free YouTube course, by Rester Test
  • Kika’s (Kiruthika Ganesan) talk at TestBash UK 2022 about Example Mapping and how it related to BDD. Super practical! Video coming soon.  
  • John Fergusson Smart Why teams struggle to adopt BDD
  • BDD Explained (Behaviour Driven Development) – Dave Farley – good overall explanation, he has a lot of other related videos that are really worth watching, on his channel
  • Keyword search for “BDD” on MoT Platform and The Club

Leave a Reply