Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
titleexample of exporting features from the command line
collapsetrue
token=$(curl -H "Content-Type: application/json" -X POST --data @"cloud_auth.json" https://xray.cloud.xpand-itgetxray.comapp/api/v1v2/authenticate| tr -d '"')
curl -H "Content-Type: application/json" -X GET -H "Authorization: Bearer $token" "https://xray.cloud.xpand-itgetxray.comapp/api/v1v2/export/cucumber?filter=10315" -o features.zip

rm -rf features/*
unzip -o features.zip  -d features

...

Code Block
languagebash
titleexample of importing results from the command line
collapsetrue
token=$(curl -H "Content-Type: application/json" -X POST --data @"cloud_auth.json" https://xray.cloud.xpand-itgetxray.comapp/api/v1v2/authenticate| tr -d '"')
curl -H "Content-Type: application/json" -X POST -H "Authorization: Bearer $token"  --data @"target/serenity-reports/cucumber_report.json" https://xray.cloud.xpand-itgetxray.comapp/api/v1v2/import/execution/cucumber

...

Code Block
languagebash
titleSample shell script
collapsetrue
BASE_URL=https://xray.cloud.xpand-itgetxray.comapp
rm features.zip
zip -r features.zip src/test/resources/features/ -i \*.feature
token=$(curl -H "Content-Type: application/json" -X POST --data @"cloud_auth.json" "$BASE_URL/api/v1v2/authenticate"| tr -d '"')
curl -H "Content-Type: multipart/form-data" -H "Authorization: Bearer $token"  -F "file=@features.zip" "$BASE_URL/api/v1v2/import/feature?projectKey=CALC"

...

Code Block
languagebash
titleexample of exporting features from the command line
collapsetrue
token=$(curl -H "Content-Type: application/json" -X POST --data @"cloud_auth.json" https://xray.cloud.xpand-itgetxray.comapp/api/v1v2/authenticate| tr -d '"')
curl -H "Content-Type: application/json" -X GET -H "Authorization: Bearer $token" "https://xray.cloud.xpand-itgetxray.comapp/api/v1v2/export/cucumber?filter=10315" -o features.zip

rm -rf features/*
unzip -o features.zip  -d features

...

Code Block
languagebash
titleexample of importing results from the command line
collapsetrue
token=$(curl -H "Content-Type: application/json" -X POST --data @"cloud_auth.json" https://xray.cloud.xpand-itgetxray.comapp/api/v1v2/authenticate| tr -d '"')
curl -H "Content-Type: application/json" -X POST -H "Authorization: Bearer $token"  --data @"target/serenity-reports/cucumber_report.json" https://xray.cloud.xpand-itgetxray.comapp/api/v1v2/import/execution/cucumber

...