Versions Compared

Key

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

...

Code Block
languagebash
titleexample of a Bash script to import results
collapsetrue
BASE_URL=https://xray.cloud.xpand-itgetxray.comapp/api/v2
PROJECT=CALC
TESTPLAN=""
BROWSER=""

# if you wish to map the whole run to single Test in Xray/Jira
#REPORT_FILE=output_allinone.xml

# if you wish to map each model as a separate Test in Xray/Jira
REPORT_FILE=output.xml


token=$(curl -H "Content-Type: application/json" -X POST --data @"cloud_auth.json" "$BASE_URL/authenticate"| tr -d '"')
curl -H "Content-Type: application/xml" -X POST -H "Authorization: Bearer $token"  --data @"$REPORT_FILE" "$BASE_URL/import/execution/junit?projectKey=$PROJECT&testPlanKey=$TESTPLAN&testEnvironments=$BROWSER"

...