Skip to main content

Export BDD Test Cases as Cucumber Feature Files

Export BDD Test Cases to a Cucumber .feature file, review the scenarios and skipped scripts, and download the file for your automation framework.

Export BDD Test Cases as a Cucumber .feature file for use in your automation framework. Vansah provides a preview so you can check the scenarios before downloading.

Before you begin

  • Make sure the Test Cases use BDD - Gherkin and contain saved script text. Non-BDD Test Cases and empty BDD scripts are skipped by the Cucumber preview.

  • Check the selected Test Case versions and their scripts.

  • Make sure you can export Test Cases and have the Export Cucumber Feature permission where it is configured.

Export the feature file

  1. Open the Test Case list for the Jira space, work item, or Test Folder you want to use. Select the Test Cases you need.

  2. Open the list’s Export action. Choose an export option that includes Test Scripts.

  3. Select Cucumber (.feature) as the file type, then select Export.

  4. In Export Cucumber Feature File, check the scenarios to export and any warnings about skipped or empty scripts.

  5. Review the Preview. Use Copy to Clipboard if you want to inspect the text in your editor.

  6. Select Download .feature or its download icon, then open the downloaded file.

Selecting Test Cases, reviewing the Cucumber export preview, and opening the downloaded feature file.

Understand the output

The dedicated BDD export creates one feature file for the selected export. Each included Test Case has a Scenario heading, its readable case key as a tag, and a version tag. Type, priority, and label tags are added when available. Preconditions appear as comments.

This excerpt illustrates a simple scenario. Your exported text and tags depend on the Test Case and its saved BDD script.

Feature: Test Cases

@DEMO-C46
@version:v1
Scenario: Save a valid delivery address
Given a shopper is entering a delivery address
When the shopper saves a complete valid address
Then the address is available for checkout

Review the generated Gherkin in your Cucumber tooling. You still need matching step definitions and the required test setup in your automation framework to execute the scenario. Exporting downloads the specification; it does not run the tests.

Troubleshooting

Problem

What to check

The Cucumber option is unavailable

Choose an export option that includes scripts and check your export permissions. A batch Test Plan workbook export offers XLSX instead.

Some Test Cases are skipped

Check their script type. Save nonempty BDD content before exporting.

The feature file does not run as expected

Review its syntax, scenario structure, step definitions, and test setup. Complex BDD content may need adjustment after export.

Watch the walkthrough

Related guide

Did this answer your question?