The BDD Step Library is a steps library for gherkin tests and preconditions. It contains all the gherkin steps used by all those tests/preconditions that are included in the scope of the library.

Thus, it provides an overview of all the automated (gherkin) steps used in the context of the projects included in the library, allowing users to easily manage and refactor the steps.

A library can be relative to a single project or be shared between multiple projects so that they have access to the same gherkin steps. See project library settings and global libraries settings for more information about configuring and sharing BDD libraries.

The library is automatically populated when gherkin tests and preconditions are created or updated:

  • Gherkin steps being used in the changed tests/preconditions that do not exist in the library are automatically created.
  • Steps in the library that are no longer being used by any gherkin tests/preconditions are automatically deleted (with the exception of static steps). 

The steps in the library will then appear as suggestions in the gherkin editor when editing the scenario definition of gherkin tests or preconditions.

Note: Gherkin reserved keywords (e.g. Given, When, Then, And) are not stored in the library.


Overview of the BDD Step Library screen

The BDD Step Library screen can be accessed from the project sidebar by choosing the Testing Board and then the BDD Step Library.

The image below depicts the several key areas of the BDD Step Library screen:


  • A: New step button
  • B: Step filters
  • C: Steps list
    • C1: Step definition
    • C2: Static step indicator
    • C3: Deprecated step indicator
    • C4: Step labels
  • D: Step details of the selected step

Edit steps

Edit steps permission

Steps can only be edited directly in the library if the user is included in the permission groups defined for the library (see project library settings and global libraries settings for information about library permission groups configuration). If the user does not have permission to edit the steps, the step details section will be displayed in read only mode.

To edit a step, click in the step in the steps list and the step details section will be displayed in edit mode. Once you are done editing the step, press the "Save" button to save it and if necessary apply the changes to the issues using the step.

Gherkin step definition

Changing the step definition directly in the library results in a refactor of all the gherkin tests and preconditions using it. The gherkin definition of all those issues will be automatically updated to reflect the updated step definition.

Each step in the library must have a unique definition so an error will be displayed if you try to change the step definition to an already existing definition.

To search steps by gherkin definition you can use the text search filter.

Note: The step definition should not include the gherkin step keyword (e.g. Given, When, Then, And). The step keyword to be used should be defined at the test/precondition level.

Step description

Any description to provide some extra information or context regarding the step.

Step labels

Steps can be labeled to be easily found when filtering steps. Since a step may be related with different things simultaneously, you can add multiple labels to the step.

Deprecated step

Steps marked as deprecated are not displayed as suggestions in the gherkin editor when editing gherkin tests or preconditions.

Deprecated steps can also be hidden from the steps list in the library by disabling the "Deprecated steps" filter.

Static step

By default steps are automatically deleted from the library when they are no longer being used by any gherkin test or precondition. However you can mark a step as static if you want to keep it in the library even if it is no longer being used. Static steps will never be automatically deleted but they can still be manually deleted.

Static steps can be easily found by using the "Only static steps" filter.

Create steps

Create steps permission

Steps can only be manually created directly in the library if the user is included in the permission groups defined for the library (see project library settings and global libraries settings for information about library permission groups configuration).

Steps can be manually created by clicking the "New step" button at the top-right corner of the page.

A placeholder step for the step being created will appear selected at the top of the steps list and the step details section will display the empty fields ready to be filled.

Steps created directly in the library are always static by default. This can not be changed while creating the step (the static step checkbox will display in readonly mode), but can later be edited after creating the step.

After saving the step, the placeholder step in the steps list will be replaced by the created step.

Each step in the library must have a unique definition so an error message will be displayed if you try to manually create a step with an already existing definition.

Delete steps

Delete steps permission

Steps can only be manually deleted directly in the library if the user is included in the permission groups defined for the library (see project library settings and global libraries settings for information about library permission groups configuration).

Static steps not being used by any issue can be manually deleted directly in the library by clicking the step in the steps list and clicking the "Delete" button in the step details.

The "Delete" button is only available for static steps since those are the only steps that can be manually deleted. Non-static steps are automatically deleted when they are no longer being used by any issue.

If the step is static but is being used by some issue(s) the "Delete" button will appear disabled since only unused steps are allowed to be deleted.

Filter steps

Steps can be easily searched by using the filters section at the top of the screen. The steps list will only display the steps included in the defined filters.

  • Text search: Write text to find steps that include it in their gherkin definition.  
  • Labels: Select labels to find steps that have at least one of those labels.
  • Deprecated steps: Enable to include deprecated steps in the steps displayed in the steps list. 
  • Only unused steps: Enable to only display steps not being used by any issue in the steps list.
  • Only static steps: Enable to only display static steps in the steps list.

The applied filters are saved when they are changed so that when you come back to the BDD step library page you find those filters applied.

Find issues using a step

To find the gherkin tests and preconditions using a given step, click the step in the steps list and check the following section in the step details:

You can see how many issues are using the step and by clicking the number a new tab will open where you can see in the issues search the issues that are using the step.


  • No labels