Help Contents

 

Automated Test Runs

Resource: Automated Test Runs ( /api/automatedtestruns )

Automated Test Runs collection resource.

Root Relation: AutomatedTestRuns

This resource supports the following methods: GET

Methods

GET


Retrieves all (or a subset) of automated test runs that are visible to the user.

This method supports the TQL query parameters tql, $top, $take and $inlinecount. See TQL Topic for more details.

Required Permissions

  • TestManagement/ManageExecutions/View

Supported Expansions

For more details on expansions, please see the Expand help topic.

Status Codes

These are the expected status codes returned by the service. In addition, some other status codes may be returned if either an internal error occurs or there is an authentication issue (such as an expired OAuth token).

StatusDescription
200 - OKReturned if the request was completed successfully.
403 - ForbiddenReturned if ET would not complete request (normally due to a validation failure or you don't have the necessary permissions to complete the request).

Example - GET (filtered by TQL Query)

Retrieves automated test runs matching a TQL query.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
tqlStatus = PassedThe TQL query to execute.
$top5The maximum number of results to return (defaults to 25).
$skip0The number of results to skip before return the $top number of results matching the query.

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Response Body

{
  "Skip": 0,
  "Top": 5,
  "Total": 1,
  "Items": [
    {
      "RunByDisplayName": "joeb",
      "RunBy": "joeb",
      "RunById": "191375f2-ae6e-4b52-8bed-4192e34b6486",
      "AssignmentId": "979ce5f8-efb7-432d-8848-c9cdf3151977",
      "Id": "02cbe373-a042-4f7b-8ba3-e03b1588dbfa",
      "Status": "Passed",
      "ImportedAt": "2013-01-16T16:15:00Z",
      "StartedAt": "2013-01-16T15:05:06Z",
      "FinishedAt": "2013-01-15T16:00:00Z",
      "Expands": [
        "Assignment",
        "Totals"
      ],
      "Self": "http://localhost/api/automatedtestrun/02cbe373-a042-4f7b-8ba3-e03b1588dbfa"
    }
  ],
  "Self": "http://localhost/api/api/automatedtestruns?tql=Status=Passed&$top=5&$skip=0"
}

Status Code

200 - OK

Example - GET (no filter)

Retrieves all automated test runs

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
$top5The maximum number of results to return (defaults to 25).
$skip0The number of results to skip before return the $top number of results matching the query.

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Response Body

{
  "Skip": 0,
  "Top": 5,
  "Total": 2,
  "Items": [
    {
      "RunByDisplayName": "joeb",
      "RunBy": "joeb",
      "RunById": "191375f2-ae6e-4b52-8bed-4192e34b6486",
      "AssignmentId": "979ce5f8-efb7-432d-8848-c9cdf3151977",
      "Id": "02cbe373-a042-4f7b-8ba3-e03b1588dbfa",
      "Status": "Passed",
      "ImportedAt": "2013-01-16T16:15:00Z",
      "StartedAt": "2013-01-16T15:05:06Z",
      "FinishedAt": "2013-01-15T16:00:00Z",
      "Expands": [
        "Assignment",
        "Totals"
      ],
      "Self": "http://localhost/api/automatedtestrun/02cbe373-a042-4f7b-8ba3-e03b1588dbfa"
    },
    {
      "RunByDisplayName": "joeb",
      "RunBy": "joeb",
      "RunById": "191375f2-ae6e-4b52-8bed-4192e34b6486",
      "AssignmentId": "979ce5f8-efb7-432d-8848-c9cdf3151977",
      "Id": "02cbe373-a042-4f7b-8ba3-e03b1588dbfa",
      "Status": "Failed",
      "ImportedAt": "2013-01-17T16:15:00Z",
      "StartedAt": "2013-01-17T15:05:06Z",
      "FinishedAt": "2013-01-17T16:06:00Z",
      "Expands": [
        "Assignment",
        "Totals"
      ],
      "Self": "http://localhost/api/automatedtestrun/02cbe373-a042-4f7b-8ba3-e03b1588dbfa"
    }
  ],
  "Self": "http://localhost/api/api/automatedtestruns?$top=5&$skip=0"
}

Status Code

200 - OK

Example - GET (no filter) with Totals expanded

Retrieves all automated test runs, including Totals

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
$top5The maximum number of results to return (defaults to 25).
$skip0The number of results to skip before return the $top number of results matching the query.
$expandTotals

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Response Body

{
  "Skip": 0,
  "Top": 5,
  "Total": 2,
  "Items": [
    {
      "RunByDisplayName": "joeb",
      "RunBy": "joeb",
      "RunById": "191375f2-ae6e-4b52-8bed-4192e34b6486",
      "AssignmentId": "979ce5f8-efb7-432d-8848-c9cdf3151977",
      "Id": "02cbe373-a042-4f7b-8ba3-e03b1588dbfa",
      "Status": "Passed",
      "ImportedAt": "2013-01-16T16:15:00Z",
      "StartedAt": "2013-01-16T15:05:06Z",
      "FinishedAt": "2013-01-15T16:00:00Z",
      "Expands": [
        "Assignment"
      ],
      "Totals": {
        "Errors": 0,
        "Failed": 0,
        "Iterations": 0,
        "NotRun": 0,
        "Passed": 10,
        "Skipped": 0,
        "Warnings": 0,
        "Done": 0,
        "Infos": 0,
        "TotalNodes": 10,
        "TotalResults": 10
      },
      "Self": "http://localhost/api/automatedtestrun/02cbe373-a042-4f7b-8ba3-e03b1588dbfa"
    },
    {
      "RunByDisplayName": "joeb",
      "RunBy": "joeb",
      "RunById": "191375f2-ae6e-4b52-8bed-4192e34b6486",
      "AssignmentId": "979ce5f8-efb7-432d-8848-c9cdf3151977",
      "Id": "02cbe373-a042-4f7b-8ba3-e03b1588dbfa",
      "Status": "Failed",
      "ImportedAt": "2013-01-17T16:15:00Z",
      "StartedAt": "2013-01-17T15:05:06Z",
      "FinishedAt": "2013-01-17T16:06:00Z",
      "Expands": [
        "Assignment"
      ],
      "Totals": {
        "Errors": 2,
        "Failed": 0,
        "Iterations": 0,
        "NotRun": 0,
        "Passed": 0,
        "Skipped": 8,
        "Warnings": 0,
        "Done": 0,
        "Infos": 0,
        "TotalNodes": 10,
        "TotalResults": 10
      },
      "Self": "http://localhost/api/automatedtestrun/02cbe373-a042-4f7b-8ba3-e03b1588dbfa"
    }
  ],
  "Self": "http://localhost/api/api/automatedtestruns?$expand=Totals&$top=5&$skip=0"
}

Status Code

200 - OK