Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How get TestRunStatus from REST API

Viktor Procházka July 19, 2018

Hello, is there some way, how to get TestRunStatus in one field? Calculated on server side? Just get values like "", "PASS", "FAILED"?

Because sometime I get in JQL under my test under fields some collection with executions. 

It is complicated to harvest correct answer - if is PASS or FAILED:

"fields": {
"customfield_10528": {
"issueId": 825968,
"statuses": [{
"statusResults": [{
"latest": 0,
"latestFinal": 0
}]
}]
}

Sometime I get this simple (but only when no execution):

JSON QUERY:
fields.customfield_10528.statuses.name

 

1 answer

0 votes
Gonchik Tsymzhitov
Community Champion
September 8, 2018

Hi! 

Looks like it is custom field from plugin.

Could you add related custom plugin tag, then I hope developers will help you?

 

Cheers,

Gonchik Tsymzhitov

Viktor Procházka September 8, 2018

Yes, we have XRAY 2 on our server. 

If I want to use current testExecutionStatus, in JIRA is visible. Somehow is calculated based on my settings. I have set "last execution status". 

But when I try get it from server by REST, I get collection of execution's results. Means, when runs in past 2 time, then 2 collection - and there is only version, based on I can order this collections. So I am lost now. 

I assume, that there is custom field "testRunStatus", but this not return anything. I must use this "customfield_10528" with collections. 

How to do that easily? there is no way?

José Domingues [Xray]
Atlassian Partner
September 25, 2018

Hi Viktor,

You can get the TestRunStatus by using the REST API for Test Runs.
Yes, the results are based on the settings so result are coherent.
As for the Test Execution Status, yes it returns the status of all the Tests that are associated with the Test Execution.

 

Best regards,

Xray Team

Suggest an answer

Log in or Sign up to answer