update a xray execution run, status and comments

Demiank100 September 29, 2020

 i am trying to use the Api to update the status and the comments of a execution run using xray 1.0 api, 

this is what i am doing:

data = {"status": "FAIL", "comment": "blabla"}
url = "https://my_site.net/rest/raven/1.0/api/testrun/33632"
req = requests.put(url, auth=(user, password), json=data)

that gives error 405,  pasting the URL in the browser I get the json with all the information from that run. so i know that ID does exists.

 

i am doing something wrong? i try to pass the data as string, just sending the status,  instead json=data, did data=data etc...      thanks guys

 

So what i ended up doing is doing 2 api calls, one to the status, and another to the comments:

url = "https://my_site.net/rest/raven/1.0/api/testrun/33632/status?status=FAIL"

req = requests.put(url, auth=(user, password))

url_comment = "https://my_site.net/rest/raven/1.0/api/testrun/33632/comment"

response = requests.put(url_comment , auth=(user, password), data="raw string for the comment")

 

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.
September 30, 2020

Hi @Demiank100 , 

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

 

Best Regards, 

Sérgio Freire, Solution Architect and Testing Advocate @Xray

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

Follow me on Twitter: https://twitter.com/darktelecom

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events