GET/projects/{ProjectId}/testruns/{Id}/items

Applies to QAComplete 12.80 SaaS, last modified on April 20, 2021

Returns a list of test run items (tests).

Use the operation to get a list of items (tests) ran during the test run specified by its ID and the ID of the project to which the test run belongs.

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 Test Library.

Request Format

To get information on the test run items, send a GET request to the following URL:

http://{server}/rest-api/service/api/v2/projects/{ProjectId}/testruns/{Id}/items

Id  :  integer, required

The ID of the test run whose items you want to get.

ProjectId  :  integer, required

The ID of the project to which the test run belongs.

offset  :  integer, default: 0

The number of test run items to skip before counting the test set items to return. 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 run items to return.

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/647894/items HTTP/1.1
Host: yourserver.com
Connection: keep-alive
Accept: application/json
Authorization: Basic am9obkBleGFtcGxlLmNvbTpwQHNzd29yZA==

A sample request made by using cURL:

curl -u john@example.com:p@ssword -H "Accept: application/json" http://yourserver.com/service/api/v2/projects/98429/testruns/647894/items

Response Format

If successful, the operation responds with HTTP status code 200 and returns a JSON object with the test run items information.

A sample response:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2921



{
  "metadata": {
    "result_set": {
      "count": 2,
      "offset": 0,
      "limit": 25,
      "total": 2
    },
    "permissions": {
      "acl": 7
    }
  },
  "results": [
    {
      "id": 3623363,
      "test_set_id": 277294,
      "project_id": 98393,
      "test_run_id": 647894,
      "test_id": 3218458,
      "test_name": "Add new user with valid name and details",
      "version": 2,
      "sequence_number": 1,
      "seq_token": 0,
      "status_code": "Passed",
      "date_started": "2015-07-29T12:35:44.0200000",
      "date_finished": "2015-07-29T12:35:44.0200000",
      "run_time": 57,
      "run_time_formated": "00:00:57",
      "is_stopped_on_fail": false,
      "last_run_by_name": "Smith, John "
      "release_id": 112537,
      "release_name": "eCommerce Application: Release 1.0/Sprint 1",
      "test_config_id": 57081,
      "configuration_name": "IE10, Win 8",
      "test_set_name": "User Login Processes",
      "avg_run_time": 57,
      "avg_run_time_formated": "00:00:57",
      "folder_name": "eCommerce Tests/Log in page",
      "test_description": "

Add new user with valid name and details

",
      "last_run_date": "2015-07-29T12:35:44.0200000",
      "is_tokenized": false,
      "test_run_started": "2015-07-29T12:34:41.1170000",
      "run_by_user_id": 130457,
      "last_run_status": "Passed",
      "status_updated_by": 130457,
      "status_updated_by_user_name: "Smith, John "
      "test_run_results": [],
      "file_report": "",
      "file_log": "",
      "automated": false,
      "test_host": ""
      "update_user_id": 0
    },
    {
      "id": 3623364,
      "test_set_id": 277294,
      "project_id": 98393,
      "test_run_id": 647894,
      "test_id": 3218457,
      "test_name": "Add new user with invalid name and details",
      "version": 2,
      "sequence_number": 2,
      "seq_token": 0,
      "status_code": "Failed",
      "date_started": "2015-07-29T12:38:12.6030000",
      "date_finished": "2015-07-29T12:38:12.6030000",
      "run_time": 145,
      "run_time_formated": "00:02:25",
      "is_stopped_on_fail": false,
      "last_run_by_name": "Smith, John "
      "release_id": 112537,
      "release_name": "eCommerce Application: Release 1.0/Sprint 1",
      "test_config_id": 57081,
      "configuration_name": "IE10, Win 8",
      "test_set_name": "User Login Processes",
      "avg_run_time": 145,
      "avg_run_time_formated": "00:02:25",
      "folder_name": "Log in page",
      "test_description": "

Add new user with invalid name and details

",
      "last_run_date": "2015-07-29T12:38:12.6030000",
      "is_tokenized": false,
      "test_run_started": "2015-07-29T12:34:41.1170000",
      "run_by_user_id": 130457,
      "last_run_status": "Passed",
      "status_updated_by": 130457,
      "status_updated_by_user_name: "Smith, John "
      "test_run_results": [],
      "file_report": "",
      "file_log": "",
      "automated": false,
      "test_host": ""
      "update_user_id": 0
    }
  ]
}    

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.

See Also

Test Runs Resources

Highlight search results