What was said before is still correct... You can use Jiras API to add a new test execution.
But I have to say it is not that easy. There are several custom fields that are used by Xray and that are needed to be filled. And these are not documented so far.
I found out the structure of the payload after I submitted a GET to an existing Test Execution.
curl -u "<YOUR USER>:<YOUR PW>;" -k -X GET -H "Content-Type: application/json" <YOUR SERVER>/rest/api/2/issue/<YOUR EXISTING TEST EXECUTION>
I used the output as a template. Now I was able add a new Test Execution:
curl -u "<YOUR USER>:<YOUR PW>;" -k -X POST -H "Content-Type: application/json" -d "@c:\temp\example.json" <YOUR SERVER>/rest/api/2/issue
I used this payload (exampel.json):
"id": "<YOUR PROJECT ID>"
"summary": "Test Execution summary",
"description": "Description of the Test Execution",
"customfield_10627": ["<YOUR KEY TO THE LINKED TEST PLAN>"]
This added an empty Test Execution which is linked to a Test Plan. You have to add the Test Plan to the field "customfield_10627".
But I still don't know if the numeric value of the custom fields are stable in every Jira/Xray installation. Do anybody else know this answer?
Did you check Xray documentation on how to create tests and test executions using REST API here:
Xpand Add-ons Team
It is never about setting up a process and being done with it. Rather, the focus should always be on optimizing it for the best outcomes. Thus, we didn’t stop at setting up JSM for our recruitment pr...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events