Automated Test Assignment Runs

Automated Test Assignment Runs

Resource: Automated Test Assignment Runs ( /api/automatedtestassignment/{id}/runs )

A collection resource that can be used for creating new automated test assignment runs from a test results file via POST request, or retrieving the list of existing runs

This resource supports the following methods: GET, POST

 

Methods

GET


Retrieves the set of runs associated with the automated test assignment

This method supports the OData parameters $filter, $top, $take, $orderby and $inlinecount. See OData Topic for more details.

Required Permissions

  • TestManagement/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).

Status

Description

200 - OK

Returned if request completed successfully.

403 - Forbidden

Returned if you do not have permission to view the test assignment.

404 - NotFound

Returned if automated test assignment does not exist.

 

Example - Retrieve all runs

 

Retrieve all runs of automated test assignment

Request Headers

Key

Value

Description

Accept

application/json

 

Request Parameters

Key

Value

Description

{id}

FC68461E-5921-4240-BB8B-2D00549D923A

Unique identifier of automated test assignment

Response Headers

Key

Value

Description

Content-Type

application/json; charset=utf-8

 

Response Body

{ "Skip": 0, "Top": 25, "Total": 2, "Items": [ { "RunByDisplayName": "joeb", "RunBy": "joeb", "RunById": "7564ff5c-7e17-4e05-a06c-9e6e64bf2afc", "AssignmentId": "00000000-0000-0000-0000-000000000000", "Id": "a4257c03-7c3c-47c8-a637-ba3927b6b127", "Status": "Failed", "ImportedAt": "2012-01-03T23:00:00Z", "StartedAt": "2012-01-01T14:04:05Z", "FinishedAt": "2012-01-02T15:05:06Z", "Self": "http://localhost/api/automatedtestrun/a4257c03-7c3c-47c8-a637-ba3927b6b127" }, { "RunByDisplayName": "joeb", "RunBy": "joeb", "RunById": "7564ff5c-7e17-4e05-a06c-9e6e64bf2afc", "AssignmentId": "00000000-0000-0000-0000-000000000000", "Id": "d3996027-1672-43e2-9c1f-6b4e74a5b12b", "Status": "Failed", "ImportedAt": "2012-02-03T23:00:00Z", "StartedAt": "2012-02-02T15:05:06Z", "FinishedAt": "2012-02-02T16:00:00Z", "Self": "http://localhost/api/automatedtestrun/d3996027-1672-43e2-9c1f-6b4e74a5b12b" } ] }

Status Code

200 - OK

 

 

POST


Creates a new automated test run, via an upload or by pointing to a results file

Required Permissions

  • TestManagement/ExecuteTests

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 request completed successfully.

 

Example - Mime multipart file upload

 

Import via a file upload

Request Headers

Key

Value

Description

Content-Type

multipart/mixed; boundary=65bf6b94-c91c-442c-abe7-f41444d7c71f

 

Request Parameters

Key

Value

Description

{id}

E0B7E86E-86F2-43BE-83CC-8309C07F3F38

Unique identifier of the automated test assignment

Request Body

------65bf6b94-c91c-442c-abe7-f41444d7c71f Content-Disposition: form-data; name="fileUpload"; filename="NUnit.xml" Content-Type: text/xml ... ------65bf6b94-c91c-442c-abe7-f41444d7c71f--

Response Headers

Key

Value

Description

Content-Type

application/json; charset=utf-8

 

Response Body

{ "Complete": false, "TotalElements": 0, "ProcessedElements": 0, "StartedAt": "2012-07-04T10:58:22Z", "ProgressInPercent": 0.0, "Id": "automatedtestimport_a7505ca4-1658-404e-b458-9cc9e5d0a219", "Self": "http://localhost/EnterpriseTester/api/backgroundtask/automatedtestimport_a7505ca4-1658-404e-b458-9cc9e5d0a219" }

Status Code

202 - Accepted

 

Example - POST - via on-server file

 

Import results via an on-server file

Request Headers

Key

Value

Description

Content-Type

multipart/mixed; boundary=65bf6b94-c91c-442c-abe7-f41444d7c71f

 

Request Parameters

Key

Value

Description

{id}

E0B7E86E-86F2-43BE-83CC-8309C07F3F38

Unique identifier of the automated test assignment

Request Body

{ "Parameters": { "ResultFile": "D:\\testoutput\\NUnit-simple.xml" } }

Response Headers

Key

Value

Description

Content-Type

application/json; charset=utf-8

 

Response Body

{ "Complete": false, "TotalElements": 0, "ProcessedElements": 0, "StartedAt": "2012-07-04T10:58:22Z", "ProgressInPercent": 0.0, "Id": "automatedtestimport_a7505ca4-1658-404e-b458-9cc9e5d0a219", "Self": "http://localhost/EnterpriseTester/api/backgroundtask/automatedtestimport_a7505ca4-1658-404e-b458-9cc9e5d0a219" }

Status Code

202 - Accepted