Create BDD specifications

This topic describes how to create BDD specifications in the Backlog module. You then create and run scenarios as described in Create and run BDD scenarios.

Create a BDD spec

Use the Backlog module to add BDD specifications.

To create a BDD specification:

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

    Tip: Note that this can also be done from within a feature, which is convenient if you need to add a specification for a certain feature.

  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 Add test scenarios.

    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.

Tip: If your tests are automated, you can inject their results and don’t have to manually create the BDD specification and scenarios in ALM Octane. After the tests are injected, you can link items like application modules and backlog items to them. For details, see Automated scenario injection.

Back to top

Re-use steps using the auto-complete mechanism

You can re-use test steps from a BDD specification. This helps improve consistency and readability across automated testing environments, and have more efficient automation code because you don't need to create the same method twice.

To re-use steps using the auto-complete mechanism:

  1. Open the BDD specification's Details tab and add the fields Contributes to Auto-Complete and Auto-Complete category.

  2. Define Contributes to Auto-Complete as Yes.

  3. Define the Auto-Complete category according to your testing environment needs (the default is Main).

    The site admin can add categories using Settings > Lists > Auto-Complete categories.

  4. When you create a new test start typing a step, and then type ctrl-space to see a list of related steps available in the spec's category. If there is only one relevant step available, it is automatically filled in.

    An icon appears next to each test step indicating how many times it has been re-used in the workspace.

    When a step contains parameters, the auto-complete options do not display the exact parameter names, to enable re-use with other parameters.

    Note: Auto-complete supports multiple languages. Tests written in one language are not provided suggestions from tests written in other languages.

Back to top

Code alignment on the BDD spec

The Code alignment field describes whether the script on the BDD spec is aligned with the external automation script, as follows:

  1. The Code alignment status of new BDD specs that are created in ALM Octane starts as N/A.

  2. Once ALM Octane starts receiving automated results for one or more of the scenarios, the external script version is compared to the version in ALM Octane.

    • If they are the same, the field value will be Aligned.

    • If the script was changed externally, those changes need to be approved, so the value is Approve external updates.

    • If someone makes a change in ALM Octane and the automation should be updated accordingly, the value will be Update external code.

Back to top

Next steps: