Export to Feature Files

AIO Tests allows you to export BDD/Gherkin-based tests into feature files with ease. By exporting BDD cases to feature files, you can use them directly as a source for writing step definitions in Cucumber or SpecFlow.

In this documentation, you’ll understand:

Steps to Export BDD Cases

Step 1: To export BDD cases, simply click on the Cases option in the top bar menu.

Step 2: Click on the vertical ellipsis icon (⋮) and select the Export to Feature File option from the dropdown menu. 

Step 3: Once you click on the Export to Feature File option, the Export to Feature File modal window will appear on the screen. Select the desired format in which you want to group or organize feature files and click on the Export button. 

There are three options to group feature files.

  • 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.

  • 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 a scenario to 2 feature files.

  • 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 a scenario to multiple feature files.

  • None: All BDD cases selected will be added to a single feature file.

Post fetching, requirement information, and the feature files will be downloaded in a zip format.  Users need to 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

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 the feature level

-

Requirement key

Tag name

 

Scenario Tags

  1. All tags in case

  2. Requirement prefixed with @JREQ-

  1. All tags in case

 

  1. Requirement prefixed with @JREQ-

 

  1. All tags in case

  2. Requirement prefixed with @JREQ-

Scenarios in a feature file have the following data copied from AIO Cases:

AIO Test Case field

Translated to in feature file

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.

  • The 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

For further queries and suggestions, feel free to reach out to our customer support via help@aiotests.com.