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

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:

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

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

  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 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 ValueEdge starts as N/A.

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

    • 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 ValueEdge and the automation should be updated accordingly, the value will be Update external code.

Back to top

Next steps: