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/View
Supported Expansions
- Totals
- Assignment
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).
| Status | Description |
|---|---|
| 200 - OK | Returned if the request was completed successfully. |
| 403 - Forbidden | Returned if ET would not complete request (normally due to a validation failure or you don't have the necessary permissions to complete the request). |
Retrieves automated test runs matching a TQL query.
Request Headers
| Key | Value | Description |
|---|---|---|
| Accept | application/json |
Request Parameters
| Key | Value | Description |
|---|---|---|
| tql | Status = Passed | The TQL query to execute. |
| $top | 5 | The maximum number of results to return (defaults to 25). |
| $skip | 0 | The number of results to skip before return the $top number of results matching the query. |
Response Headers
| Key | Value | Description |
|---|---|---|
| Content-Type | application/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
Retrieves all automated test runs
Request Headers
| Key | Value | Description |
|---|---|---|
| Accept | application/json |
Request Parameters
| Key | Value | Description |
|---|---|---|
| $top | 5 | The maximum number of results to return (defaults to 25). |
| $skip | 0 | The number of results to skip before return the $top number of results matching the query. |
Response Headers
| Key | Value | Description |
|---|---|---|
| Content-Type | application/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
Retrieves all automated test runs, including Totals
Request Headers
| Key | Value | Description |
|---|---|---|
| Accept | application/json |
Request Parameters
| Key | Value | Description |
|---|---|---|
| $top | 5 | The maximum number of results to return (defaults to 25). |
| $skip | 0 | The number of results to skip before return the $top number of results matching the query. |
| $expand | Totals |
Response Headers
| Key | Value | Description |
|---|---|---|
| Content-Type | application/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