Retrieving Execution Result
Results from executing a test suite or test scenario can be retrieved through the two URLs below. The first returns the overall result while the second returns all the details of the result including the log, the resulting abstract syntax three of the result and detailed code coverage information. Detailed result might be deleted automatically from the server after a number of days. The simple result returned is in same format as the result returned by the API for executing a test scenario or test suite.
Resource URL
- GET:
- /testcase/{id}/result/{resultId}
- /suite/{id}/result/{resultId}
- /result/{resultId}
- GET:
- /testcase/{id}/result/{resultId}/details
- /suite/{id}/result/{resultId/details
- /result/{resultId}/details
Header parameters
Example request to Get Result
- GET /testcase/59c8a10e01fa9346123b2490/result/59cb78db0b1d2608840dab46
- Headers
Example response
{
"id": "59cb78db0b1d2608840dab46",
"type": "TEST",
"contextId": "59c8a10e01fa9346123b2490",
"testCaseResults": [],
"state": "COMPLETED",
"started": "2017-09-27T10:09:31.217+0000",
"ended": "2017-09-27T10:09:34.406+0000",
"message": "",
"executedBy": "XATUSER",
"validationFailures": [],
"useCodeCoverage": true,
"codeCoverage": [
{
"componentName": "XARISCAL",
"coveragePercentage": 78
}
]
}
"id": "59cb78db0b1d2608840dab46",
"type": "TEST",
"contextId": "59c8a10e01fa9346123b2490",
"testCaseResults": [],
"state": "COMPLETED",
"started": "2017-09-27T10:09:31.217+0000",
"ended": "2017-09-27T10:09:34.406+0000",
"message": "",
"executedBy": "XATUSER",
"validationFailures": [],
"useCodeCoverage": true,
"codeCoverage": [
{
"componentName": "XARISCAL",
"coveragePercentage": 78
}
]
}
Example request to get detailed result
- GET /testcase/59c8a10e01fa9346123b2490/result/59cb78db0b1d2608840dab46
- Headers
Example response
{
"id": "59cb8faa0b1d2609aa31acd9",
"type": "TEST",
"contextId": "59c8a10e01fa9346123b2490",
"testCaseResults": [],
"state": "COMPLETED",
"started": "2017-09-27T11:46:50.360+0000",
"ended": "2017-09-27T11:46:53.554+0000",
"message": "",
"executedBy": "XATUSER",
"validationFailures": [],
"useCodeCoverage": true,
"report": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<XaUnitResult result..."
"log": "13:46:50.388 COMMENT XaUnit XaUnit execution started\n13:46..."
"codeCoverage": [
{
"componentName": "XARISCAL",
"coveragePercentage": 78,
"level": "LINE",
"tags": [],
"sourceCode": "000100 Identification division.
"hitLines": [
23,25,29,31,32,35,39
],
"untouchedLines": [
36,40
],
"executionCount": 1
}
]
}
"id": "59cb8faa0b1d2609aa31acd9",
"type": "TEST",
"contextId": "59c8a10e01fa9346123b2490",
"testCaseResults": [],
"state": "COMPLETED",
"started": "2017-09-27T11:46:50.360+0000",
"ended": "2017-09-27T11:46:53.554+0000",
"message": "",
"executedBy": "XATUSER",
"validationFailures": [],
"useCodeCoverage": true,
"report": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<XaUnitResult result..."
"log": "13:46:50.388 COMMENT XaUnit XaUnit execution started\n13:46..."
"codeCoverage": [
{
"componentName": "XARISCAL",
"coveragePercentage": 78,
"level": "LINE",
"tags": [],
"sourceCode": "000100 Identification division.
"hitLines": [
23,25,29,31,32,35,39
],
"untouchedLines": [
36,40
],
"executionCount": 1
}
]
}