cancel
Showing results for 
Search instead for 
Did you mean: 

Carry over the scenario attachments in the related test snapshots

Highlighted
Staff

Carry over the scenario attachments in the related test snapshots

Hey!

 

Currently in CucumberStudio the scenario attachments while test run creation. This feature request is on the public roadmap here, but in the meantime you can create a custom script based on your favorite programming language to achieve that.

 

So here are the steps to build the custom script by using these API endpoints: 

 

1. Get scenarios of a given project

2. Store the scenario ids in a variable

3. List attachments of a given scenario

4. Store the attachments ids in a variable

5. Get a given attachment of a given scenario

6. Save the attachments in a new created directory and store their related ids and names ("file-name") in a variable

7. Get tests of a test run

8. Store the test snapshots ids in a variable

9. Fetch and store the last result ids and scenario ids of test snapshots with this API endpoint:

 

GET https://studio.cucumber.io/api/projects/<project_id>/test_runs/<test_run_id>/test_snapshots/<test_snapshot_id>?include=last-result,scenario

 

10. Match the scenario ids of test snapshots with all scenario ids, and extract those which are included in the test run 

11. Create an attachment to a given test execution result

 

Hope this helps!

Tags (1)
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors
Labels