Zephyr BDD Feature
Zephyr for Jira is now Zephyr Squad! Read more about this |
---|
- 1 Enable or disable BDD
- 2 Create a BDD Feature
- 3 Create a BDD Background
- 4 Create BDD scenarios
- 5 Create BDD test scenarios
- 6 Download the feature file from a story
- 7 Add a BDD test to a test cycle
- 8 Download the feature file from the test cycle or folder
- 9 Upload Cucumber results to a test cycle or folder
- 10 Add a scenario outline
- 11 Upload the JSON results file via Postman
- 12 Additional notes, behaviors, and limitations
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
Click Create a BDD Feature (New) in the menu on the left.
Select Story as the issue type.
Specify details and click Create.
Method 2
Click the Create at the top.
Select Story as the issue type.
Add the label BDD_Feature.
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
Click on the BDD Feature.
Add a BDD background and create a scenario as described above.
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
Create a BDD Feature.
Add a BDD background and create a scenario as described above.
Navigate to the Cycle Summary page.
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
Create a BDD Feature.
Go to the Feature content section and create a scenario.
Click the scenario you’ve just created.
On the scenario page, click the Test Details icon to move to the Test Details section.
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
Add a BDD Feature/Test to a test cycle and/or folder.
Download the feature file from the test cycle and/or folder.
Upload the results file generated from the feature file as show in the image below.
Starting Release 8.2, Zephyr Enterprise documentation is moving from its current location on Atlassian to a dedicated, standalone Zephyr Enterprise Documentation page. https://support.smartbear.com/zephyr-enterprise/docs/en/welcome-to-zephyr-enterprise.html