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, click the Syntax help button or 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.
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:
-
Open the 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.
-
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.
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: