Share this page

# 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 BDD scenarios.

In this topic:

## Create a BDD specification

Use the Backlog module to add BDD specifications.

To create a BDD specification:

1. In the Backlog module, open the BDD Specification tab, and click the Add BDD Specification button .

   Tip: You can also add a specification for a certain feature, in the feature's BDD Specification tab.

2. Enter the required values.

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

4. Select the Script tab.

   The script is generated with the Test ID (TID) and revision number (REV). If you automate the test, these lines help identify the Gherkin test for the test results.

   1 #Auto generated Octane revision tag

   2 @TID1001REV0.1.0

   3 Feature:

   Caution: Do not delete the Test ID tag. It is used to map the automation results.

5. In the Feature line, add a description of the feature.

6. Use the following buttons to automatically add template blocks to the script.

   Button | Description
   --- | ---
   Add scenario | Inserts a scenario block.
   Add scenario outline | Inserts a scenario outline block with a table of Examples.
   Add rule | Inserts a rule block with multiple scenarios.

7. Click Format script to automatically format the Gherkin script for increased readability.

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

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

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

10. Click Save to save the specification.

11. Run scenarios as described in Create BDD scenarios.

Tip: If your tests are automated, you can inject their results without having to manually create the BDD specification and scenarios. 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

## Localization

You can localize Gherkin test feature files and BDD specs using any language supported by Gherkin.

You define the language at the top of the feature file or script, using the standard Gherkin notation, `# language`. For example, the "fr" notation is an instruction to use the French language.

# language: fr

When you click Add scenario or Add scenario outline, text is added in the language that you specified.

If no language is specified, the default English is used. Admins can set the language using the GHERKIN_SCRIPT_DIALECT parameter. For details, see Configuration parameters.

The last language used is remembered, so that when you create a new document, it will be in your specified language.

Back to top

## 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 specification to a reuse category based on your workflow. After specifications are defined as contributing to auto-complete, you can then reuse test steps.

To create an auto-complete library for reuse:

1. Open a 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.

To reuse test steps using the auto-complete mechanism:

1. Create a specification. When you start typing a step, press CTRL+space to see a list of related steps available in the spec's category. Select the step you want to reuse.

2. If there is only one relevant step available, it is automatically filled in.

   An icon indicates how many times each test step has been reused in the workspace.

3. 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.

Back to top

## Code alignment on the BDD specification

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

- The Code alignment status of new BDD specifications that are created starts as N/A.

- After automated results start being received for one or more of the scenarios, the external script version is compared to the version in OpenText Software Delivery Management.

  - If they are the same, the field value is Aligned.

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

  - If someone makes a change in the BDD specification and the automation should be updated accordingly, the value is Update external code.

Back to top

Next steps:

- Create BDD scenarios
- Plan and run manual tests
- Automate Gherkin tests

https://admhelp.microfocus.com Software Delivery Management 8942
Tips to improve your search results... OpenText™ Software Delivery Management Help Center OpenText™ Software Delivery Management Help 26.1 All View Local Help Center View Online Help Center Version: