How can I update Xray Test Execution or Test Cases with Postman or Newman Test Results?

Rohan Russell October 24, 2017

Guys,

I am fairly new to API testing, moreover API automated testing.  I am familiar with manual testing in Postman Pro and running test collections with Postman Runner. I am also familiar with running collections using Newman from Postman API Collections endpoint and from a JSON file.

What is the best approach and software tools to use to update Xray Test Cases or and Xray Test Execution in Jira with my Postman test results. Furthermore, if there are any code examples (Python etc.), it will be greatly appreciated.

 

Thanks

 

1 answer

1 vote
José Domingues [Xray]
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
February 14, 2018

Hi Rohan Russell,

 

If you want to update Test Executions or Test issues in Xray, you can use Xray's built-in REST API.

From our understanding, you need to get visibility of the automated tests implemented in Postman.

From Newman's Github project page, it seems that it is able to generate a JUnit XML report. https://github.com/postmanlabs/newman#junitxml-reporter-options

Thus, you can use it to submit the results to Xray by invoking the REST API for the submission of JUnit results (either the standard or the multipart variant), as detailed here: https://confluence.xpand-addons.com/display/XRAY/Import+Execution+Results+-+REST 

 

You may want to give a look at this page (https://confluence.xpand-addons.com/display/XRAY/Integrating+with+Testing+Frameworks) which has some tutorials related with with automated testing, including JUnit and its capabilities.

 

Best regards,

Xpand Add-ons Team

Jorge De andrade November 12, 2018

Hi there

following the instructions I get an 415 Unsupported Media Type when trying to post the test executions report in JUnit following a CLI newman run with reporter as junit.

XML/Text or XML/Application in the Content-Type makes no difference.

When I do the import manually from the UI, I do not have any issues.

Help would be appreciated

 

br,

Jorge

Sergio Freire - Xblend
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2019

Hi @Jorn Dua , were you able to solve this?

If not, can you please share with me if you're using Xray Cloud or Xray on-premises (server/datacenter)? If it's on-premises, which version are you using?

Regards

Sergio

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events