Behavior Driven Development (BDD) SpiraApp Now Released

25-Jul-2024 by Inflectra Product News

We are excited to announce the release of the new (and completely free) Behavior Driven Development (BDD) SpiraApp for Spira. This new SpiraApp automatically highlights Gherkin syntax within Requirement Steps, Test Case Steps, and Risk Mitigations in Spira. It also adds a toolbar button to these details pages to export the artifact steps as an attached Gherkin .feature file. These feature files can then be viewed in Spira using the built-in syntax highlighting or used in a test automation tool such as Rapise, Cypress or Playwrite.

What is BDD and Gherkin Syntax?

Behavior Driven Development (BDD) is a methodology of software development that combines the principles of test-driven development and Domain-driven design. It was developed to help teams create software that is more user-centric, easier to maintain, and more reliable. BDD focuses on the user experience and allows teams to quickly identify and address issues that arise during the development process.

Gherkin is a business readable language which helps you to describe business behavior without going into details of implementation. It is a domain specific language for defining tests in a standardized format for specifications. It uses plain language to describe use cases and allows users to remove logic details from behavior tests.

The new BDD SpiraApp in Action

For example, suppose we have a new user story:

In this user story, we will write a simple statement that describes the functionality in the "As a [xxx] I want [yyyy]" style:

Using the Scenario option in Spira, I can refine this simple user story about registering on LinkedIn to one or more detailed BDD style scenario using Gherkin syntax:

Scenario: User successfully creates a LinkedIn Account

Given John is on the LinkedIn Registration page
When he enters all required registration fields
Then a LinkedIn account is created

When I activate the BDD SpiraApp in my instance of Spira and enable it for my product, I will now see the following syntax highlighting automatically:

This functionality is available for the following artifacts in Spira:

  • Requirement Steps
  • Test Case Steps
  • Risk Mitigations

Exporting a .Feature File

In addition to the syntax highlighting, there is an option in the BDD toolbar to export the current scenarios as a Gherkin .feature file:

When you click this button, a new .feature file is automatically created in the Spira documents repository and linked to the current artifact:

If you click on this file, you will see the syntax highlighting:

In addition, this feature file can be downloaded and accessed by Rapise or RemoteLaunch for test automation.

How Do I Get the BDD SpiraApp?

You can download the latest version of the BDD SpiraApp from the Inflectra SpiraApps marketplace.

From there you can download the SpiraApp and then add it to your system: