Returns a list of saved test runs a project contains.
Use the operation to get a list of all saved test runs available in the Run History of a QAComplete project.
To get information on a specific test run, use the …/testruns/{Id} (GET)
operation.
Authentication
Basic authentication using a user’s login and password. See Authentication for details.
Security Rights
The authenticating user must belong to a security group that has the Read privilege for the Test Library.
Request Format
To get information on test runs, send a GET request to the following URL:
ProjectId : integer, required
The ID of the project.
offset : integer, default: 0
The number of test runs to skip before counting the returned runs. The default value is 0, which is the offset of the first item. For details, see Paging Through Results Using Offset and Limit.
limit : integer, default: 25
The maximum number of test runs to return in the response.
filter : string
The filter expression to apply to the returned list. See Search Filters.
A sample request:
GET http://yourserver.com/rest-api/service/api/v2/projects/98429/testruns HTTP/1.1
Host: yourserver.com
Connection: keep-alive
Accept: application/json
Authorization: Basic am9obkBleGFtcGxlLmNvbTpwQHNzd29yZA==
A sample request made by using cURL:
curl -u [email protected]:p@ssword -H "Accept: application/json" http://yourserver.com/service/api/v2/testruns/98429/testruns
Response Format
If successful, the operation responds with HTTP status code 200 and returns a JSON object with information about the test runs.
A sample response:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 957
{
"metadata": {
"result_set": {
"count": 1,
"offset": 0,
"limit": 1,
"total": 620
},
"permissions": {
"acl": 7
}
},
"results": [
{
"id": 663528,
"test_set_id": 277958,
"test_set_name": "Show",
"test_config_id": 57266,
"configuration_name": "Edge",
"release_id": 115444,
"project_id": 98429,
"run_by_user_id": 130457,
"run_by_user_name": "Smith, John ",
"is_sequential": true,
"status_code": "Passed",
"execution_type": "Manual",
"date_started": "2016-09-23T06:42:04.6530000",
"date_finished": "2016-09-23T06:42:16.7700000",
"nbr_tests": 28,
"nbr_passed": 28,
"nbr_failed": 0,
"nbr_blocked": 0,
"nbr_awaiting_run": 0,
"run_time": 0,
"run_time_formated": "00:00:00",
"release_name": "11.2/11.2.328",
"schedule_id": "0",
"test_host": ""
}
]
}
Metadata about the list of test runs.
Pagination information about the list of test runs. (See Paging Through Results Using Offset and Limit).
The number of returned test runs.
The offset of the first test run requested.
The maximum number of test runs requested.
The total number of test runs.
The authenticating user’s rights to access test runs.
Access rights:
- 0 - None
- 1 - Read
- 2 - Update
- 3 - Read and update
- 4 - Delete
- 5 - Read and delete
- 7 - Full access
An array of test runs.
The ID of the test run.
The ID of the test set the test run belongs to.
The name of the test set the test run belongs to.
The ID of the configuration used to perform the test run.
The name of the configuration used to perform the test run.
The ID of the release for which the test run is performed.
The ID of the project the test run belongs to.
The ID of the user who performed the test run.
The name of the user who performed the test run.
Shows if the test belongs to a sequence.
The status code of the test run.
Shows how that test is executed.
The date the test run started.
The date the test run finished.
The number of tests performed during the run.
Shows how many tests passed successfully for the run.
Shows how many tests failed during the run.
Shows how many tests were blocked during the run.
Shows how many tests were not performed during the run (for paused runs).
The overall test run time in seconds.
The overall test run time in the HH:MM:SS
format.
The name of the release for which the test run is performed.
The ID of the test run in the schedule.
The name of the test host used to perform the run (for automated tests).
Error responses
If the operation fails, it returns the appropriate status code and (optionally) the error description in the response body.
If the project with the specified ProjectId does not exist or the authenticating user does not have rights to access the project, the operation returns the Access is denied
error.