[XRAY] Add Testcases to an Test Execution using REST API

Sven Geissler July 24, 2020

Hey Friends,

XRay Version : 3.4.3

i wanted to create an Testexecution and adding Test to that execution. Although i didnt succeed to add the Test while creating the textexecution (also founds no hints in the documentation) i changed to add the via the POST Request

POST /rest/raven/1.0/api/testexec/{testExecKey}/test 

although this post works more than fine over the REST API Browser in my Jira, its not working as an REST command.

I do get the Error

<status><status-code>500</status-code><message>Unrecognized field "add" (Class com.xpandit.raven.issue.view.testexec.beans.TestExecUpdateBean), not marked as ignorable

My REST Command looks, at least for me, perfectly fine.

{\"add\":[\"TEST-123\",\"TEST-124\"]}


Please Help .D

1 answer

0 votes
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 25, 2020

Hi @Sven Geissler 

whenever importing results using any of the endpoints described at https://confluence.xpand-it.com/display/XRAY/Import+Execution+Results+-+REST, it will create a Test Execution containing the corresponding Tests.

Depending on the format you use, Test issues can be autoprovisioned or not; if you want to report against existing Tests, then you can either use Xray JSON or NUnit, TestNG or Robot framework format. I think you may want to use our own Xray JSON format.

For example, if you use the Xray JSON format, you can import the results in one shot which will create the Test Execution and will allow you report the results against existing Test issues.

 

https://confluence.xpand-it.com/display/XRAY/Import+Execution+Results+-+REST#ImportExecutionResultsREST-XrayJSONresults

 

We've also recently published an open-source project that contains Postman collections that show API calls; if you want to give it a look,  please check https://github.com/Xray-App/xray-postman-collections

 

Concerning the concrete error you're having, you'll need to provide more information so I recommend you to reach out Xray support and the team will be glad to help you out.

 

Regards

Sergio

 

=======================================

Personal blog on testing, Agile and software development: https://sergiofreire.com

Follow me on Twitter: @darktelecom

Sven Geissler August 3, 2020

Thanks Sergio,

i will look futher into the https://confluence.xpand-it.com/display/XRAY/Import+Execution+Results+-+REST#ImportExecutionResultsREST-XrayJSONresults format.

Already used that to edit and update my testexecutions.

Like Sergio Freire - Xblend likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events