I am using below end point for getting the test runs of test case in Xray , however the JSON response I get multiple test runs the test cases is linked to.
Is there a way to add a sort/order parameter to an API url query string so that latest test run should come at the top of list.
GET /rest/raven/2.0/api/test/{testKey}/testruns
Sample response :
{
"id": 7,
"status": "PASS",
"testKey": "test-2345",
"testExecKey": "test-1234",
"avatar": "https://s3.amazonaws.com/uifaces/faces/twitter/follettkyle/128.jpg"
},
{
"id": 2,
"status": "TODO",
"testKey": "test-2345",
"testExecKey": "test-8956",
"avatar": "https://s3.amazonaws.com/uifaces/faces/twitter/araa3185/128.jpg"
}
]}
Xray has no such feature and all endpoint options available are detailed on our REST API documentation, so when available it will be listed there.
Any other response has to be handled on the user's side, you have to adjust and create such ordering.
For more information on our REST, please review the link REST API.
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
Thanks @Sergio Freire - Xblend . Also could you please help me with below query ?
I have been trying to send the evidence of test runs to Xray using below PUT method, but unable to attach files to test execution
PUT: https://jira.****.net/rest/raven/2.0/api/testrun/****
Note: Test Run Status is getting updated but the file is not getting attached. Can "filename" accept file path ?
JSON Body:
{
"status": "PASS",
"comment":"{TD Test Comment}",
"evidence":{
"add:[{
"filename":"C:\\Users\\tda090\\Desktop\\provar.pdf",
"contentType": "application/pdf",
"data": "(base64 encoding...)" }
] }
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Sergio Freire - Xblend
Is there a way to pass the file path as I need to pull the file from specific folder in project. Tried storing the path with filename into variable and passing the variable as a string in "filename" but its not helping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Perhaps as a comment or as a Test Run custom field...?
Please have a look at:
https://docs.getxray.app/display/XRAY/v2.0#/Test%20Run/put_testrun__id_
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!
Help us plant more trees
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.