How to upload junit xml test results to Zephyr Scale with a custom test cycle name?

592 Views Asked by At

I am using the following curl command to upload the Junit XML file into zephyr scale:

curl -H "Authorization: Bearer ${TOKEN}" -F "[email protected];type=application/xml" https://api.zephyrscale.smartbear.com/v2/automations/executions/junit?projectKey="JQA"&autoCreateTestCases=true

ref: https://support.smartbear.com/zephyr-scale-cloud/docs/test-automation/junit-integration-and-similar.html

it works as expected but creates test cycle name as "Automated Build". How to add custom test cycle name for the uploaded junit XML file instead of Automated Build?

I tried to look into the API doc but it's kind of confusing. Can anyone help me with this?

1

There are 1 best solutions below

0
nirojshrestha019 On

just had to pass the testCycle details as:

curl "https://api.zephyrscale.smartbear.com/v2/automations/executions/junit?projectKey={project-name}&autoCreateTestCases=true" \
--header "Authorization: Bearer $ZEPHYR_API_KEY" \
--form "[email protected]" \
--form "type=application/xml" \
--form "testCycle={\"name\": \"jest integration test $(date)\"};type=application/json"