Delivering reliable software with BDD - an overview by Ivana Barić Ćurko

Monday, May 23, 2022 - Posted by Mirta Medanic
Credits: John Schnobrich | Unsplash

In this article, our colleague Ivana Barić Ćurko, who is a solutions manager for VSAT networks, shares an overview of the software development and quality assurance practices used in our projects. Whether you participate in any step of the software development lifecycle or are simply curious about the satellite industry in practice, this text is for you!

"At Amphinicy, we have embraced Behaviour-Driven Development (BDD). It has become an inevitable part of our agile software development process. It enables us to produce reliable software that meets customer requirements - in an efficient way. At the end of each sprint, we aim to deliver one or more testable end-to-end features mapped to customer values. This methodology requires a little bit of discipline across the team at the beginning of the project. However, it saves time and makes change requests easy to implement and deploy. A dream of every software engineer, wouldn't you agree? 

What is BDD?

Behaviour-Driven Development (BDD) is a „story" of software quality. It is a set of standards and techniques that help people from different areas: business analysts, developers, testers, product owners, and customers, to build high-quality software together that is easy to upgrade and maintain.

As system behaviour test cases, scenarios are written in structured natural language - a simple vocabulary everyone can understand. Each scenario contains three main parts that start with keywords GIVEN, WHEN, and THAN.

Scenario 

  • GIVEN – including preconditions, initial system state before the interaction starts 
  • WHEN – processing test, triggering action 
  • THEN – test results, outcomes 

Associating multiple GIVEN/WHEN/THEN steps can be done with AND keyword.

An example of a BDD scenario:

Ana needs to drink tea in the morning because she has a sore throat.

GIVEN the teapot is started

AND there is a tea in the kitchen

AND there is water in the pot

WHEN she selects a tea flavour

AND put it in the teapot

THEN the selected tea is produced

AND Ana can drink it

Later the steps are automated and used for system testing. 

How do we do it at Amphinicy?

BDD is an add-on to our agile process. First, both the business analyst and the product owner discuss product features and define stories. Then they get together with developers and testers to define the requirements list which correlates with the list of BDD scenarios. BDD scenarios are added as part of the Story Acceptance Criteria. 

Picture 1
Image showing an example of the BDD workflow

Story Acceptance Criteria are written in Gherkin syntax. BDD scenarios are used at the sprint demo to demonstrate that the required feature was implemented and is working.
Of course, additional test cases can be provided by the QA engineer.

BDD Smoke Tests 

BDD test suite runs every 24 hours against the latest codebase from the master. Test reports are generated and sent on email and official chat communication platform to a specialized group channel. A test can be run against different environments such as local, testing, staging, and others. Testing BDD codebase has different environment files where we define important properties for each environment.

Smoke tests
Image showing a BDD Smoke Test workflow

We have used BDD in the development of our products Blink and Monica as well as in many custom projects for our clients. Although it takes some time to set up the environment and implement decent code coverage, with BDD software reliability increases tremendously, leaving fewer chances for bugs to appear.

From our experience, this is a big step towards preventing incidents in production in general and deploying software smoothly!" 

Ivana Barić Ćurko is a solutions manager for VSAT Networks and a professional with 15+ years of expertise in software development, satellite solutions, and managing teams. If you liked this article and are interested in software development - you might want to get in touch with Ivana. Or become a member of our team? We would definitely be happy to meet you!