Create BDD Specifications

ALM Octane lets you create BDD (Behavior-driven development) specifications and scenarios. This topic describes how to create BDD specs. You then create and run scenarios as described in Create and run BDD scenarios.

Overview: Gherkin test vs. BDD spec framework

ALM Octane offers you two frameworks for working with BDD: either using Gherkin tests where all scenarios in a test are run each time, or using BDD specifications where you can run each scenario on its own.

A Gherkin test will give you a run result for the whole feature file, while a BDD spec gives a run result per scenario in the feature file. For details on the Gherkin framework, see Run manual and Gherkin tests.

Advantages of the BDD spec framework

The BDD spec framework described in this section offers you greater granularity than Gherkin tests:

  • You can run individual scenarios.

  • You can report on a scenario run level.

  • You can partially automate a specification to only run some of its scenarios.

  • You can link specific scenarios to specific backlog items.

For example, if you have a Gherkin test with 20 scenarios and only 19 of them pass, the test fails. In the BDD framework you can run 20 scenarios separately, and immediately identify a failed scenario.

You can also add specific scenarios to a suite, and do not need to run the full Gherkin test each time.

Mapping the BDD spec framework to Gherkin tests

If you previously worked with Gherkin tests in ALM Octane, the following table can help you understand where to do various tasks in BDD.

In the Gherkin test framework: In the BDD spec framework:
Versioning, execution, automation, and backlog coverage are at the Gherkin test level.
  • Versioning is at the BDD specification level.

  • Execution, automation, and backlog coverage are at the scenario level.

You can add a Gherkin test to a suite. You can add scenarios to a suite.
Tests can be run manually or automatically. Scenarios can be run manually or automatically.

Back to top

Create a BDD Specification

Use the Backlog module to add BDD specifications and their associated scenarios.

To add a new BDD specification:

  1. In the Backlog module, click + BDD Specification.

  2. Enter the desired values.

  3. Click the customize fields button to show more fields in the Add BDD Specification dialog box.

  4. Click Add & Edit.

  5. In the Script tab, create or edit the scenarios. For details, see Create Gherkin tests.

    1. Click Add Scenario or Add Scenario Outline and edit the scenario scripts. For details, click the Syntax help button or see Gherkin test syntax.

    2. Click Save Version to save the current version of the script. Enter a label and click Save.

    3. Click Versions to view, sort and compare the saved versions of the script.

  6. Open the Details tab to add any other relevant information for the BDD specification, such as owner or linked backlog item.

  7. Click the Save button to save the specification.

  8. Run scenarios as described in Create and run BDD scenarios.

Back to top

Next steps: