Date: Thu, 28 Mar 2024 22:39:58 +0000 (UTC) Message-ID: <1525785841.10596.1711665598896@docs.getxray.app> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_10595_1480351734.1711665598896" ------=_Part_10595_1480351734.1711665598896 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
You can manage Tests directly through the Jira REST API.
Xray Test issues can be created and edited though the <= a href=3D"https://docs.atlassian.com/jira/REST/latest/" class=3D"external-l= ink" rel=3D"nofollow">Jira REST API.
Learn more
All Test issue custom fields provided by Xray can be modified using the = Jira REST API:
The custom field IDs can be obtained using the Jira REST API Browse= r tool included in Jira. Each ID is of the form "customfield_ID".
Another option, which does not require Jira administration rights, = is to invoke the "Get edit issue meta" in an existing issue (e.g., in a Tes= t issue) as mentioned h= ere.
Example: GET http:= //yourserver/rest/api/2/issue/CALC-1/editmeta
{ "fields":{ "customfield_10004":{ "steps":[ { "index":1, "fields":{ "action":"Step 1", "data":"input Data 1", "expected result":"Excepted result 1" } }, { "index":2, "fields":{ "action":"Step 2", "data":"input Data 2", "expected result":"Excepted result 2" } }, { "index":3, "fields":{ "action":"Step 4", "data":"input Data 3", "expected result":"Excepted result 3" } } ] } } } =09
Currently, it's not possible to add attachments to steps at the moment o= f creation. This needs to be done afterward, using the proper endpoint desc= ribed in Test Steps - REST= .
Below is a full Test creation example using Jira's REST API endpoint for= creating issues.
To export tests to JSON, you need to specify the keys, the ID of the fil= ter or JQL query of the issues you want to export. At least one query param= eter has to be specified, but all 3 can be sent at the same time.
It is possible to get all Test Statuses available in Xray sorted by rank= .
To export the test runs of a Test, you need to specify the key of the Te= st you wish to export the test runs from. You can filter the Test runs by T= est Environment.
To export the pre-conditions of a Test, you need to specify the key of t= he Test you wish to export the test pre-conditions from
To export the test sets of a Test, you need to specify the key of the Te= st you wish to export the test sets from
To export the test executions of a Test, you need to specify the key of = the Test you wish to export the test executions from
To export the test plans of a Test, you need to specify the key of the T= est you wish to export the test plans from
To export the test sets of a Test, you need to specify the key of the Te= st you wish to export the test sets from.