Zephyr BDD Feature

Zephyr for Jira is now Zephyr Squad! Read more about this

Zephyr for Jira is now Zephyr Squad! Read more about this

Enable or disable BDD

Previously, BDD support in Zephyr for Jira required installing an additional app, Cucumber for Jira. As of August 23, 2020 this is no longer needed.

BDD is enabled by default for all projects. If needed, you can disable or enable BDD for specific projects individually.

To enable or disable BDD for a specific project, navigate to Project settings > Zephyr - BDD/Cucumber and switch the toggle on or off:

We recommend that you clear the cache after enabling the BDD feature. To do that, navigate to the Apps > General Configuration > Clear Cache section in Jira settings and click Clear Cache.

Create a BDD Feature

1. Enable the BDD feature for the particular project.

2. There are two methods to create a BDD feature.

Method 1

  1. Click Create a BDD Feature (New) in the menu on the left.

  2. Select Story as the issue type.

  3. Specify details and click Create.

Method 2

  1. Click the Create at the top.

  2. Select Story as the issue type.

  3. Add the label BDD_Feature.

  4. Specify details and click Create.

 

Create a BDD Background

1. Create a BDD Feature.

2. Click on the area below Background, specify a scenario in the field that appears and click Save:

How the BDD Background Feature works

For all the mentioned features, the background scenarios will be displayed within the Execute Test page once all tests have been added to any of the test cycles or folders.

For the scenario outline, the background scenarios will be displayed within the Execute Test page once all the tests have been added to any of the test cycles or folders.

Create BDD scenarios

1. Click on BDD Feature.

2. Click the Feature content icon, enter a name for your scenario in the Scenarios section, and click Create:

3. Enter your scenario in the field below the scenario name:

To hide or show the scenario content, click the arrow button to the right of the scenario name, or click Expand All or Collapse All.

Create BDD test scenarios

1. Create a BDD Feature.

2. Click the Feature content icon, enter a name for your scenario in the Scenarios section, and click Create (see the image above).

3. Click the created scenario:

4. On the scenario page, click the Test Details icon to move to the Test Details section:

5. Enter a scenario in the Test Details section and click Save:

Download the feature file from a story

  1. Click on the BDD Feature.

  2. Add a BDD background and create a scenario as described above.

  3. Click Download feature file:

This will download a feature file containing all the information you specified in the Background and Scenarios sections.

Add a BDD test to a test cycle

  1. Create a BDD Feature.

  2. Add a BDD background and create a scenario as described above.

  3. Navigate to the Cycle Summary page.

  4. Create a test cycle and then add the feature as add any other test case.

Download the feature file from the test cycle or folder

1. Create a BDD feature.

2. Add a BDD background and create a scenario as described above.

3. Navigate to the Cycle Summary page. Create a test cycle and then add the feature in a way you add any other test case.

4. Click the ellipses button next to the test cycle name, and then select Download Feature File from the dropdown menu:

This will download the feature file directly from the test cycle. The feature file will contain CycleId and/or FolderId. Hence, the results file for these feature files can be uploaded to any test cycle or folder.

Upload Cucumber results to a test cycle or folder

1. Create a BDD Feature.

2. Add a BDD background and scenario as described above.

3. Navigate to your Cycle Summary page. Create a test cycle and then add the feature in a way you add any other test case.

4. Click the ellipses button next to the test cycle name, and then select Download Feature File from the dropdown menu.

This will download the feature file directly from the test cycle/folder. The feature file will contain the CycleId and/or FolderId. Hence, the results file for these feature files can be uploaded to any test cycle or folder.

5. Generate the JSON results file using the downloaded feature file.

6. Click the ellipses button next to the test cycle name, and then select Upload Cucumber Results:

Simply select the file from the location where the file is located. The results will be updated as per the JSON file.

Add a scenario outline

  1. Create a BDD Feature.

  2. Go to the Feature content section and create a scenario.

  3. Click the scenario you’ve just created.

  4. On the scenario page, click the Test Details icon to move to the Test Details section.

  5. Specify the following scenario:

Given user navigates to Zephyr When I enter Username as <username> and Password as <password> Then login should not be successful Examples |username | password | |username1 | password 1 | |username2 | password 2 |

How the scenario outline works

If the same test case needs to be repeated with multiple inputs and parameters, then it should be enclosed in angle brackets (<>).

Then you need to provide multiple inputs and parameters for the scenario as shown above (excluding the extra white spaces).

Examples: the examples should be added before the inputs and parameters as shown.

Upload the JSON results file via Postman

  1. Add a BDD Feature/Test to a test cycle and/or folder.

  2. Download the feature file from the test cycle and/or folder.

  3. Upload the results file generated from the feature file as show in the image below.

Additional notes, behaviors, and limitations