Testy status is a Structure attribute, that can be requested from Structure via REST interface
URL: /rest/structure/2.0/value
It has to be a POST request, that have to contain at least these headers:
Accept:application/json, text/javascript, */*; q=0.01
Content-Type:application/json; charset=UTF-8
CODE
and authorization headers as well
Sample request body:
{
"requests": [{
"forestSpec": {"structureId": 103, "title": true},
"rows": [182, 184, 212],
"attributes": [ {
"id":"com.almworks.testy.status-report",
"format":"json",
"params":{
"testRun":4
}
}]
}]
}
CODE
You have to specify row ids (rows) in the request body.
The response will look like this:
{
"responses": [
{
"forestSpec": {
"structureId": 103,
"title": true
},
"rows": [
182,
184,
212
],
"data": [
{
"attribute": {
"id": "com.almworks.testy.status-report",
"params": {
"testRun": 4
},
"format": "json"
},
"values": [
{
"value": "FAILED",
"self": "FAILED",
"FAILED": 1,
"BLOCKED": 1
},
{
"value": "BLOCKED"
},
{
"value": "FAILED"
}
],
"trailMode": "INDEPENDENT,AGGREGATE",
"trails": [
"",
"",
""
]
}
],
"forestVersion": {
"signature": -1385959428,
"version": 1
}
}
],
"itemTypes": {},
"itemsVersion": {
"signature": -558220658,
"version": 1
}
}
CODE
The response contain values array with statuses. Groups will contain aggregating info like this:
"FAILED": 1,
"BLOCKED": 1
CODE