Importing Cucumber Test Results

Applies to Zephyr Squad Cloud, last modified on September 21, 2023

Prerequisites

  1. Create a project and add the Test issue type to it.

  2. Make sure BDD is enabled for the project. To do that, navigate to Project Settings > Zephyr - BDD/Cucumber and make certain the toggle is switched on:

    Enable BDD

    Click the image to enlarge it.

Import Cucumber test results in the Upload mode

  1. Go to the Zephyr > Test Automation page.

    Test automation page

    Click the image to enlarge it.

  2. Click Create Automation Task.

  3. Select Upload from the Import Method dropdown:

    Upload method

    Click the image to enlarge it.

  4. Fill in all the required fields (the ones marked with a red asterisk) and select Cucumber as the automation framework.

  5. Upload a Cucumber JSON file containing test results:

    Upload file

    Click the image to enlarge it.

  6. Click Create at the bottom of the dialog.

  7. Execute the job by selecting Execute from the dropdown that appears upon clicking the ellipsis button in the Actions column. The task status will change to In Progress:

    Execute Cucumber task

    Click the image to enlarge it.

  8. Wait until the status changes to Success:

    Success status

    Click the image to enlarge it.

  9. Go to the Search Tests page and verify that the story and tests have been created for the job (the reporter name should be the name of the user who has executed the job):

    Search tests page

    Click the image to enlarge it.

  10. Go to the Cycle Summary page and verify that the corresponding cycle and/or folder matches the executions. The Assignee field value should be updated based on the assignee value provided while creating the job.

    Cucumber cycle summary

    Click the image to enlarge it.

Import Cucumber test results via ZBot

  1. Run Zbot for the user.

  2. Go to the Zephyr > Test Automation page:

    Test automation page

    Click the image to enlarge it.

  3. Click Create Automation Task.

  4. Select ZBot from the Import Method dropdown:

    ZBot method

    Click the image to enlarge it.

  5. Fill in all the required fields and select Cucumber as the automation framework.

  6. Specify the path to the Cucumber JSON file containing test results:

    Path to file

    Click the image to enlarge it.

  7. Click Create at the bottom of the dialog. The task will appear in the list on the Test Automation page:

    Created task

    Click the image to enlarge it.

  8. Click the ellipsis button in the Actions column and select Execute to execute the task. The task status will change to In Progress.

    Cucumber task in progress

    Click the image to enlarge it.

  9. Wait until the status changes to Success.

  10. Go to the Zephyr > Search Tests page and verify that the story and tests have been created for the task (the reporter name should be the name of the user who has executed the job).

    Search tests page

    Click the image to enlarge it.

  11. Go to the Zephyr > Cycle Summary page and verify that the corresponding cycle and/or folder matches the executions. The Assignee field value should be updated based on the assignee value provided while creating the job.

    Cucumber cycle summary

    Click the image to enlarge it.

Limitations

  • Cucumber test results cannot be imported in an XML file.

  • The Assignee field value will not be shown if you update the assignee value and then execute the task again.

See Also

Test Automation
Test Automation API
Continuous Integration

Highlight search results