Xray supports integration with Continuous Integration tools, thanks to its REST API.
Xray team has made some add-ons for Jenkins and Bamboo that make this integration easy. While we're working on making them also compatible with Xray Cloud, you can still integrate your CI pipeline using the instructions provided here.
The steps include:
Authenticate
Export Cucumber, Gherkin base tests from Jira
token=$(curl -H "Content-Type: application/json" -X POST --data '{ "client_id": "${***}","client_secret": "${***}" }' https://xray.cloud.xpand-it.com/api/v1/authenticate| tr -d '"') |
curl -H "Content-Type: application/json" --output featureBundle.zip -X GET -H "Authorization: Bearer ${token}" "https://xray.cloud.xpand-it.com/api/v1/export/cucumber?keys=CALC-1;CALC-3" |
unzip -o featureBundle.zip -d features/ |
cucumber -x -f json -o report.json |
curl -H "Content-Type: application/json" -X POST -H "Authorization: Bearer ${token}" --data @report.json https://xray.cloud.xpand-it.com/api/v1/import/execution/cucumber |
Sometimes, you may be using automated tests that are not Cucumber. You may even be using your own custom test automation framework.
In this case, Test entities must have already been created in Jira. Tests can either be Manual or Generic, depending if they're structured (composed of steps) or not.
In general, the steps are: