Would like to integrate Postman results with JIRA XRay

I have a Postman collection where we are maintaining the structure in this format-
Epic Folder
-User Story Folder(inside epic Folder)
-Test Case Id folder(inside user Story Folder)
-Request1(inside Test case id folder)
-Request2(inside Test case id folder)
-Request3(inside Test case id folder)

Using newman-junit xray report, creates test case for each request. But I want the test case to be recorded only for the last request(request3) Under Test Case-id Folder.
Request1 and Request2 are like Pre-request which needs to be run prior of running Request3. But Request1 and Request2 are not the actual test.
Hoe can we generate such junit-xray report?

Once the report is created using junitxray, how is it pushed to Jira Xray?

@leah9876

I haven’t worked with this for several years as I have moved on from that company.
Look at Import Execution Results - REST - Xray Server + DC - Xray and Import Execution Results - Xray Server + DC - Xray.
I believe we used the REST API as part of our CI/CD pipeline in Bamboo to import the results into JIRA.

Mick

Thank you! Still puzzling over this (but I’m new to REST APIs) but will let you know if I get it to work.

~WRD0000.jpg

Finally managed to an import of JUNIT XML using the Xray REST API: Some notes:

curl -H “Content-Type: application/json” -X POST --data “{”“client_id”“: ““Insert client id””,”“client_secret”“: ““insert client secret””}” https://xray.cloud.getxray.app/api/v1/authenticate

curl.exe -H “Content-Type: text/xml” -X POST -H “Authorization: Bearer Insert a very long bearer key here” --data @“yourpath\examples\xray\result.xml” https://xray.cloud.getxray.app/api/v2/import/execution/junit?testExecKey=KEY-123

1 Like

Here’s a link to the XRAY docs for Developing and testing APIs using Postman.

https://docs.getxray.app/display/XRAYCLOUD/Developing+and+testing+APIs+using+Postman

Posting this link was in response to the previous poster’s request to “re-post” a link that is no longer accurate. Hence, my posting the above link.