November 28, 2018

How to use Behaviour Driven Development to avoid agile testing pitfalls

Lois Shearing 4 minute read

While agile development is intended to increase release rates, the rate at which testers are passing code ready for build can easily become siloed, slowing down the process.

Here are our best practice tips for using Behaviour Driven Development (BDD) and Test Management for Jira (TM4J) to avoid the pitfalls most commonly faced by agile testing teams:  

Pitfall: Speed of changes to code

Agile teams deliver and modify code at a faster rate than waterfall teams. This can present issues for agile testing teams who need to be constantly modifying tests and running regression tests.

How BDD can help:

Behaviour driven development voids this problem by making developers code against test specs, rather than the opposite. Developers write code to fit the test case, which not only saves testing teams time as they no longer need to write new tests for each bit of code but can also save developers time as their code is more likely to pass if it's written with the test in mind.

Test Management for Jira’s Jenkins plugin facilitates this style of coding and testing by exporting BDD test cases written in Test Management for Jira to Jenkins for continuous integration testing and exporting the results back to Jira, where they can be viewed using a range of Test Execution reports.

export feature file

Pitfall: Testing team not tech capable

Testers from a manual or exploratory background may not have the technical capabilities necessary for uniting testing in an agile setting.

How BDD can help:

Starting with the test means testers don’t necessarily need to fully understand the code, as they’re creating tests for the user story rather than the function. This puts the onus on the developers to write to the testers (non-techy) specs, rather than the tester writing for the developer’’s technical code.

testers not tech capable

TM4J provides support for BDD test cases, which can be written in the user-friendly Gherkin syntax to ensure the business need is transparent. The tests can then be exported as a feature file and used as a reference for Automation Testers to write the automated tests behind the script. This interconnectivity creates a single source of truth and allows for full traceability for all team members.

Pitfall: Frequent regression tests slow down the process of testing and building

Continuous integration means that regression tests need to be run constantly. If you’re doing manual testing, this is a huge amount of work.

How BDD can help:

Having automated, pre-written tests that developers code against can avoid this roadblock before your team even runs into it. Jenkins will run automated tests that as part of a development project.

TM4J plugin for Jenkins will trigger once a build has complete, and send the results from automated tests that ran during the build to Jira, where they can be viewed using TM4J reports. This allows testers to catch issues as early as possible, which links into the final pitfall.

frequent regression tests

Pitfall: Falling to catch bugs early enough in the build

Not seeing bugs early on in the build can lead to wasted time and energy as code added to the buggy script has to be refactored and re-tested.

How BDD can help:

BDD’s aim is to catch bugs as early as possible, as code has to pass pre-written tests before it can be pushed, greatly decreasing the chance of buggy code making it into the build. Test management for Jira’s sophisticated reporting suite creates a single source of truth for all test results and includes a breakdown of the top ten most important bugs, based on priority and number of tests affected, so developers can clear blockages as early as possible.

catching bugs early

Start your free trial:

If you haven’t tried using Test Management for Jira yet, get a 30-day free trial here:

Start your free trial