Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

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

Table of Contents
Redirect
filename
delay0
locationhttps://support.smartbear.com/zephyr-for-jira-cloud/docs/bdd.html

Enable or disable BDD

Info

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:

Widget Connector
overlayyoutube
_templatecom/atlassian/confluence/extra/widgetconnector/templates/youtube.vm
width300px
urlhttps://www.youtube.com/watch?v=fwf-edRhk8o&feature=youtu.be
height200px
Note

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:

Info

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:

Code Block
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

Additional Notes

  • After uploading the results file, you may need to perform a browser refresh in order to see the results.

Behaviors

  • If you download the feature file from the test cycle, this will download only the scenarios that are present at the test cycle level.

    • For example, Let’s say you have test cycle C1 and then you have two folders under it called F1 and F2. The test cycle C1 contains Test1, F1 contains Test2 and F2 contains Test3.

      • If we download the feature file from C1 → This will download the feature file with only the Test1 Scenario.

      • If we download the feature file from F1 → This will download the feature file with only the Test2 Scenario.

      • If we download the feature file from F2 → This will download the feature file with only the Test3 Scenario.

  • If you upload the results file at the test cycle level, it will only upload the results at the test cycle and folder level. If you are trying to upload and the cycle or folder id doesn’t match, then there will be an error that prevents you from uploading.

  • If you download the feature file from the view issue page, you can upload the results for this feature at any cycle or folder level.

  • When users download the feature file from the view issue page, then the user is able to upload the results to any test cycle and folder aside from the Ad-hoc cycle.

    • If a scenario is already present within that cycle or folder, then it will update the same test.

    • If the scenario is not present, then it will create a new test and update the results.

  • Step and results status behavioral changes

    • If all the test steps are passing, then the overall step result will be set to PASS.

    • If all the test steps are failing, then the overall step result will be set to FAIL.

Limitations

  • If you are using the older UI, only the feature can be created by not the scenarios.

  • Downloading and uploading results at the Ad-hoc test cycle is not supported.

  • Currently, we are only supporting Cucumber JSON format when you are uploading the results file.