Behavior Driven Development (BDD)

Behavior Driven Development (BDD) is a popular methodology for capturing requirements in a way that expresses the behavior of the requirement, making testing easier. SpiraTest includes built-in support for BDD, with automated Gherkin syntax highlighting, and the ability to generate Feature files automatically.

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.


Finally, feature files are documents that contain Gherkin scripts and are typically saved with the .feature extension. Feature files are often stored in the same code repository as the project code that the developers work from. This means that the Gherkin acceptance tests can be run as part of the integration tests but also over time, will form part of the regression pack of tests that the QA will run for the project to ensure end to end functionality is maintained at each iteration/release.

Generating BDD Using Artificial Intelligence

SpiraTest has powerful Generative AI features that will allow you to take a user story or requirement created in the system and use that as the basis for multiple BDD scenarios.


Using the Generative AI plugin, you can generate both test cases, and BDD scenarios. The artificial intelligence will read the name and/or description of the requirement and use special built-in AI prompts to generate the BDD scenarios.

The generated scenarios will be created using the standard Gherkin: Given, When, Then syntax. The system will generate both positive and negative scenarios that covers the “happy path” as well as multiple exception cases.


Syntax Highlighting

In addition to being able to automatically generate BDD Gherkin scenarios, SpiraTest has a BDD-specific SpiraApp that will enagle automated syntax formatting for any Gherkin statements, regardless of whether they were created by a user or the AI assistant.


The syntax highlighting and formatting makes it very easy to read the Gherkin syntax and make changes and edits as needed to better document the requirement.


This functionality is available for the following artifacts in SpiraTest:

  • Requirement Steps
  • Test Case Steps

Generating Feature Files

The SpiraTest BDD functionality also includes the ability to generate a Gherkin .Feature file directly from the requirements in SpiraTest. This allows you to use your BDD scenarios in your acceptance testing process and include in your automated test scripts.


When you use this option, a new Feature file is created in the SpiraTest document repository, automatically linked to the requirement in question.


Finally, the rich content editing functionality of SpiraTest also includes built-in support for BDD scenarios and Feature files. This includes displaying syntax highlighting and allowing you to edit the Feature file directly inside SpiraTest.


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

Try SpiraTest free for 30 days, no credit cards, no contracts

Start My Free Trial

And if you have any questions, please email or call us at +1 (202) 558-6885