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:
-
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.
-
Enter the desired values.
-
Click the customize fields button to show more fields in the Add BDD Specification dialog box.
-
Click Add & Edit.
-
In the Script tab, create or edit the scenarios. For details, see Add test scenarios.
-
Click Add Scenario or Add Scenario Outline and edit the scenario scripts. For details on the syntax, see Gherkin test syntax.
-
Click Save Version to save the current version of the script. Enter a label and click Save.
-
Click Versions to view, sort and compare the saved versions of the script.
-
-
Open the Details tab to add any other relevant information for the BDD specification, such as owner or linked backlog item.
-
Click the Save button to save the specification.
-
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.
Reuse steps using the auto-complete mechanism
You can reuse test steps from a BDD specification. This enhances consistency and readability, and provides for more efficient code by preventing duplication.
To enable reuse, you first define which BDD specifications are included in the auto-complete mechanism. You can assign a spec to a reuse category based on your workflow. After specs are defined as contributing to auto-complete, you can then reuse test steps as described below.
To create an auto-complete library for reuse:
-
Open a BDD specification's Details tab and add the fields Contributes to Auto-Complete and Auto-Complete category.
-
Define Contributes to Auto-Complete as Yes.
-
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.
To reuse test steps using the auto-complete mechanism:
-
Create a spec. When you start typing a step, type ctrl-space to see a list of related steps available in the spec's category. Select the step you want to reuse.
-
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 reused in the workspace.
-
When a step contains parameters, the auto-complete options do not display the exact parameter names, to enable reuse with other parameters.
Note: Auto-complete supports multiple languages. Tests written in one language are not provided suggestions from tests written in other languages.
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:
-
The Code alignment status of new BDD specs that are created in ALM Octane starts as N/A.
-
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.
-
Next steps: