You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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

Automated Test Assignment resource

This resource supports the following methods: DELETE, GET, PUT

Methods

DELETE


Delete automated test assignment by it's unique Identifier

Required Permissions

  • TestManagement/ManageExecutions/Delete

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 request completed successfully.
403 - ForbiddenReturned if the required permissions to delete this automated test assignment have not been met.
404 - NotFoundReturned if no automated test assignment with the specified identifier exists.

Example - Delete Assignment

Example of deleting an automated test assignment.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{id}4bb709c2-e0e7-4af3-9f60-a045016a9610GUID Identifier of the automated test assignment to delete.

Response Headers

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

Status Code

200 - OK

GET


Retrieves a single automated test assignment by its unique identifier.

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 is completed successfully.
403 - ForbiddenReturned if the required permission to view this automated test assignment have not been met.
404 - NotFoundReturned if no automated test assignment with the specified identifier exists.

Example - GET

Example of retrieving a automated test assignment

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{id}4bb709c2-e0e7-4af3-9f60-a045016a9610GUID Identifier of assignment to retrieve.

Response Headers

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

Response Body

{
  "Id": "4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "AutomatedTestId": "5ef6c545-6ef8-472e-bae7-b1cc3d3fbab0",
  "Name": "My Test",
  "Status": "Not Run",
  "AssignedTo": null,
  "AssignedToId": null,
  "PackageId": "f6ed1282-bd89-4f8f-8e94-47e344bba905",
  "Expands": [
    "Package"
  ],
  "Self": "http://localhost/api/automatedtestassignment/4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "Links": [
    {
      "Href": "http://localhost/api/automatedtestassignment/4bb709c2-e0e7-4af3-9f60-a045016a9610/allrelationships",
      "Rel": "AllRelationships"
    },
    {
      "Href": "http://localhost/api/automatedtest/5ef6c545-6ef8-472e-bae7-b1cc3d3fbab0",
      "Rel": "AutomatedTest"
    },
    {
      "Href": "http://localhost/api/executionpackage/f6ed1282-bd89-4f8f-8e94-47e344bba905",
      "Rel": "ExecutionPackage"
    },
    {
      "Href": "http://localhost/api/automatedtestassignment/4bb709c2-e0e7-4af3-9f60-a045016a9610/relationships",
      "Rel": "Relationships"
    },
    {
      "Href": "http://localhost/api/automatedtestassignment/4bb709c2-e0e7-4af3-9f60-a045016a9610/runs",
      "Rel": "Runs"
    }
  ]
}

Status Code

200 - OK

PUT


Update automated test assignment

Required Permissions

  • TestManagement/ManageExecutions/Edit

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 automated test assignment has been updated successfully.
403 - ForbiddenReturned if the request could not be completed successfuly (normally due to lack of permissions or validation failure).

Example - PUT (update package for the automated test assignment)

Updating the package that the automated test assignment belongs to.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{id}4bb709c2-e0e7-4af3-9f60-a045016a9610GUID Identifier of package to delete.

Request Body

{
  "Id": "4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "PackageId": "f6ed1282-bd89-4f8f-8e94-47e344bba905",
  "AutomatedTestId": "888f8e22-0137-440a-bcf2-173b9d6f543f"
}

Response Headers

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

Response Body

{
  "Id": "4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "AutomatedTestId": "888f8e22-0137-440a-bcf2-173b9d6f543f",
  "Name": "My Test",
  "Status": "Not Run",
  "AssignedTo": null,
  "AssignedToId": null,
  "PackageId": "f6ed1282-bd89-4f8f-8e94-47e344bba905",
  "Expands": [
    "Package"
  ],
  "Self": "http://localhost/api/automatedtestassignment/4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "Links": [
    {
      "Href": "http://localhost/api/automatedtestassignment/4bb709c2-e0e7-4af3-9f60-a045016a9610/allrelationships",
      "Rel": "AllRelationships"
    },
    {
      "Href": "http://localhost/api/automatedtest/888f8e22-0137-440a-bcf2-173b9d6f543f",
      "Rel": "AutomatedTest"
    },
    {
      "Href": "http://localhost/api/executionpackage/f6ed1282-bd89-4f8f-8e94-47e344bba905",
      "Rel": "ExecutionPackage"
    },
    {
      "Href": "http://localhost/api/automatedtestassignment/4bb709c2-e0e7-4af3-9f60-a045016a9610/relationships",
      "Rel": "Relationships"
    },
    {
      "Href": "http://localhost/api/automatedtestassignment/4bb709c2-e0e7-4af3-9f60-a045016a9610/runs",
      "Rel": "Runs"
    }
  ]
}

Status Code

200 - OK

Example - PUT (assign automated test assignment to user)

Updating a automated test assignment to be assigned to a new user (this does not change the tester for any active script runs associated with this assignment).

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{id}4bb709c2-e0e7-4af3-9f60-a045016a9610GUID Identifier of the package to delete.

Request Body

{
  "Id": "4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "PackageId": "f6ed1282-bd89-4f8f-8e94-47e344bba905",
  "AssignedToId": "203f8f8a-20a7-40ff-bb9c-dbed4fcfcd98",
  "AutomatedTestId": "888f8e22-0137-440a-bcf2-173b9d6f543f"
}

Response Headers

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

Response Body

{
  "Id": "4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "AutomatedTestId": "888f8e22-0137-440a-bcf2-173b9d6f543f",
  "Name": "My Test",
  "Status": "Not Run",
  "AssignedTo": "joeb",
  "AssignedToId": "203f8f8a-20a7-40ff-bb9c-dbed4fcfcd98",
  "PackageId": "f6ed1282-bd89-4f8f-8e94-47e344bba905",
  "Expands": [
    "Package"
  ],
  "Self": "http://localhost/api/automatedtestassignment/4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "Links": [
    {
      "Href": "http://localhost/api/automatedtestassignment/4bb709c2-e0e7-4af3-9f60-a045016a9610/allrelationships",
      "Rel": "AllRelationships"
    },
    {
      "Href": "http://localhost/api/automatedtest/888f8e22-0137-440a-bcf2-173b9d6f543f",
      "Rel": "AutomatedTest"
    },
    {
      "Href": "http://localhost/api/executionpackage/f6ed1282-bd89-4f8f-8e94-47e344bba905",
      "Rel": "ExecutionPackage"
    },
    {
      "Href": "http://localhost/api/automatedtestassignment/4bb709c2-e0e7-4af3-9f60-a045016a9610/relationships",
      "Rel": "Relationships"
    },
    {
      "Href": "http://localhost/api/automatedtestassignment/4bb709c2-e0e7-4af3-9f60-a045016a9610/runs",
      "Rel": "Runs"
    }
  ]
}

Status Code

200 - OK

Example - PUT (unassign a previously assigned script)

Updating an automated test assignment to be unassigned (A null value cannot be passed because this will be ignored, due the implementation of partial updates. An empty GUID will be passed instead.)

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{id}4bb709c2-e0e7-4af3-9f60-a045016a9610GUID Identifier of the package to delete.

Request Body

{
  "Id": "4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "PackageId": "f6ed1282-bd89-4f8f-8e94-47e344bba905",
  "AssignedToId": "00000000-0000-0000-0000-000000000000",
  "AutomatedTestId": "888f8e22-0137-440a-bcf2-173b9d6f543f"
}

Response Headers

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

Response Body

{
  "Id": "4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "AutomatedTestId": "888f8e22-0137-440a-bcf2-173b9d6f543f",
  "Name": "My Test",
  "Status": "Not Run",
  "AssignedTo": null,
  "AssignedToId": null,
  "PackageId": "f6ed1282-bd89-4f8f-8e94-47e344bba905",
  "Expands": [
    "Package"
  ],
  "Self": "http://localhost/api/automatedtestassignment/4bb709c2-e0e7-4af3-9f60-a045016a9610",
  "Links": [
    {
      "Href": "http://localhost/api/automatedtestassignment/4bb709c2-e0e7-4af3-9f60-a045016a9610/allrelationships",
      "Rel": "AllRelationships"
    },
    {
      "Href": "http://localhost/api/automatedtest/888f8e22-0137-440a-bcf2-173b9d6f543f",
      "Rel": "AutomatedTest"
    },
    {
      "Href": "http://localhost/api/executionpackage/f6ed1282-bd89-4f8f-8e94-47e344bba905",
      "Rel": "ExecutionPackage"
    },
    {
      "Href": "http://localhost/api/automatedtestassignment/4bb709c2-e0e7-4af3-9f60-a045016a9610/relationships",
      "Rel": "Relationships"
    },
    {
      "Href": "http://localhost/api/automatedtestassignment/4bb709c2-e0e7-4af3-9f60-a045016a9610/runs",
      "Rel": "Runs"
    }
  ]
}

Status Code

200 - OK

  • No labels