Our documentation site has been updated to AIO Tests Knowledge Base
Export BDD Cases to Feature Files
AIO Tests can export BDD/Gherkin based tests into feature files. These can be directly used as source for writing step definitions in Cucumber or SpecFlow. This article details the steps to export BDD cases and the options available to organize the feature files.
Steps to Export BDD cases
Navigate to Cases tab & click on ‘More Actions’ ellipsis and then click on Export to Feature File option
The Export to Feature File modal opens up. There are 3 options to group feature files by.
a. Folder : All BDD cases in the folder will be added to one feature file. If cases from multiple folders are selected by using Filters, then one feature file will be created per folder.
b. Requirement : BDD cases will be grouped by requirements.
If a case has multiple requirements linked to it, then the same case would be added as scenario to 2 feature files.
c. Tag: BDD cases will be grouped by tags. As in requirement, if a case has multiple tags tagged to it, then the same case would be added as scenario to multiple feature files.
d. None: All BDD cases selected will be added to single feature file.
Select the option by which the feature files need to be organisedPost fetching, requirement information, the feature files would be downloaded in a zip format. Unzip the downloaded file.
Feature file/Scenario details
The exported feature files have the below information based on the choice of organization:
Feature file | Organise by Folder | Requirement | Tag | None |
---|---|---|---|---|
File Name | Folder name | Requirement key | Tag name | ProjectKey_Feature |
Feature Name | Folder name | Requirement summary | Tag name | ProjectKey_Feature |
Tag at feature level | - | Requirement key | Tag name | - |
Scenario Tags |
|
|
|
|
Scenario in a feature file have the following data copied from AIO Cases:
AIO Test Case field | Translated to in feature file |
---|---|
Case key | Scenario tag eg. @AT-TC-121 |
Case title | Scenario/Scenario Outline name |
Case description | Scenario description |
Tags | Tags on each scenario |
Requirement | @JREQ-<storykey> eg. @JREQ-AT-1 |
Steps | Scenario Steps |
Examples | Examples |
Data | If pipe separated, then exported as datatable, else as docstring (encapsulated in “““) |
Exported file example
The below file is exported when Organise by Requirements is selected.
Requirement key @JREQ-SCRUM-75 is the Jira requirement key as a feature level tag.
Feature name is Requirement summary, coming from the Jira Issue
Case keys are @TCMSTES-TC-327 and @TCMSTES-TC-329 added to each scenario
Tags of each case become scenario level tags
Steps get added with corresponding keywords