How to push Cypress results
Cucumber for Jira is only supporting JSON results generated from official cucumber implementations. However you can also upload results generated from Cypress with 2 additional steps.
Cucumber for Jira is using this JSON schema to validate the uploaded result file. This means that any result file validated against this schema will be accepted by Cucumber for Jira.
That’s possible in 2 steps:
Produce JSON result files using cucumber-json-preprocessor.
Push every results file using cURL command
1. Produce JSON result files using cucumber-json-preprocessor
Please follow installation and configuration steps described in the homepage of cucumber-json-preprocessor.
Let say we have two feature files : bad_usage.feature and serve_coffee.feature
Feature: Bad Usage
Feature: Serve Coffee
Executing your test after configuring cucumber-json-preprocessor will produce 2 result files: one result file per feature.
Subset of result file for the Bad Usage feature
[
{
"id": "bad-usage",
"uri": "features/bad_usage.feature",
"keyword": "Feature",
"name": "Bad usage",
...
}
]
Subset of result file for the Serve Coffee feature
[
{
"id":"serve-coffee",
"uri":"features/serve-coffee.feature",
"keyword":"Feature",
"name":"Serve Coffee",
...
}
]
2. Push every results file using cURL command
We suppose your results files were generated in reports
folder. The command will looks for every JSON file in the reports
folder and send each of them using cURL command to Cucumber for Jira
Voilà! You should be able to upload the consolidated JSON file into Cucumber for Jira.
You could automate these steps to include them in a CI tool.