Resource: Automated Test ( /api/automatedtest/{id} )

Automated test resource

Methods

DELETE


Deletes the automated test by its unique identifier

Required Permissions

  • TestManagement/ManageScripts

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 was deleted successfully.
403 - ForbiddenReturned if the automated test can not be deleted (normally if the necessary permissions to complete the request have not been met, or the automated test has associated assignments).
404 - NotFoundReturned if the automated test package was not found.

Example - Delete automated test

Delete automated test by its unique identifier.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{id}7FABE725-28A0-4C48-A6AF-AAF4041223D2The Unique identifier of automated test to delete.

Response Headers

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

Status Code

200 - OK

GET


Retrieves an automated test by its unique identifier.

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).

StatusDescription
200 - OKReturned if the request is completed successfully.
403 - ForbiddenReturned if the required permissions to view the automated test have not been met.
404 - NotFoundReturned if the automated test does not exist.

Example - Get automated test

Retrieve automated test by its unique identifier.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{id}DFF56A5F-40FA-41D5-8BC8-33C3D0014368Unique identifier of the automated test to return.

Response Headers

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

Response Body

{
  "Id": "dff56a5f-40fa-41d5-8bc8-33c3d0014368",
  "Type": "UnitTest",
  "Name": "JUnit Results",
  "CreatedAt": "2012-01-02T15:05:06Z",
  "LastUpdatedAt": "2012-02-02T15:05:06Z",
  "CreatedById": "f10c226f-1778-4038-b0d4-2eae86bd5a9e",
  "CreatedBy": "joeb",
  "LastUpdatedById": "f10c226f-1778-4038-b0d4-2eae86bd5a9e",
  "LastUpdatedBy": "joeb",
  "AssignedToId": "f10c226f-1778-4038-b0d4-2eae86bd5a9e",
  "AssignedTo": "joeb",
  "PackageId": "68f38eb7-9882-41b8-9749-712c43dc3f51",
  "ProjectId": "4f0d1bc3-3247-4ad0-b753-aaa538d8c523",
  "ProjectName": "Test Project",
  "PackageName": "Script Library",
  "OrderNumber": 1,
  "Expands": [
    "Assignments",
    "Configuration"
  ],
  "Self": "http://localhost/api/automatedtest/dff56a5f-40fa-41d5-8bc8-33c3d0014368",
  "Links": [
    {
      "Href": "http://localhost/api/automatedtest/dff56a5f-40fa-41d5-8bc8-33c3d0014368/relationships",
      "Rel": "Relationships"
    },
    {
      "Href": "http://localhost/api/automatedtest/dff56a5f-40fa-41d5-8bc8-33c3d0014368/allrelationships",
      "Rel": "AllRelationships"
    },
    {
      "Href": "http://localhost/api/automatedtest/dff56a5f-40fa-41d5-8bc8-33c3d0014368/assignments",
      "Rel": "Assignments"
    }
  ]
}

Status Code

200 - OK

PUT


Creates a new automated test.

Required Permissions

  • TestManagement/ManageScripts

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
201 - CreatedReturned if the request is completed successfully.
403 - ForbiddenReturned if ET could not complete the request (normally due to a validation failure or the necessary permissions to complete the request have not been met).
404 - NotFoundReturned if the automated test does not exist.

Example - Update Automated Test

Update automated test.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{id}DFF56A5F-40FA-41D5-8BC8-33C3D0014368Unique identifier of the automated test to return.

Request Body

{
  "Id": "dff56a5f-40fa-41d5-8bc8-33c3d0014368",
  "Type": "UnitTest",
  "Name": "Cycle 2 JUnit Results",
  "AssignedToId": "f10c226f-1778-4038-b0d4-2eae86bd5a9e",
  "PackageId": "68f38eb7-9882-41b8-9749-712c43dc3f51",
  "OrderNumber": 1,
  "Configuration": {
    "Type": "JUnit"
  }
}

Response Headers

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

Response Body

{
  "Id": "dff56a5f-40fa-41d5-8bc8-33c3d0014368",
  "Type": "UnitTest",
  "Name": "Cycle 2 JUnit Results",
  "CreatedAt": "2012-01-02T15:05:06Z",
  "LastUpdatedAt": "2012-02-02T15:05:06Z",
  "CreatedById": "f10c226f-1778-4038-b0d4-2eae86bd5a9e",
  "CreatedBy": "joeb",
  "LastUpdatedById": "f10c226f-1778-4038-b0d4-2eae86bd5a9e",
  "LastUpdatedBy": "joeb",
  "AssignedToId": "f10c226f-1778-4038-b0d4-2eae86bd5a9e",
  "AssignedTo": "joeb",
  "PackageId": "68f38eb7-9882-41b8-9749-712c43dc3f51",
  "ProjectId": "4f0d1bc3-3247-4ad0-b753-aaa538d8c523",
  "ProjectName": "Test Project",
  "PackageName": "Script Library",
  "OrderNumber": 1,
  "Expands": [
    "Assignments",
    "Configuration"
  ],
  "Self": "http://localhost/api/automatedtest/dff56a5f-40fa-41d5-8bc8-33c3d0014368",
  "Links": [
    {
      "Href": "http://localhost/api/automatedtest/dff56a5f-40fa-41d5-8bc8-33c3d0014368/relationships",
      "Rel": "Relationships"
    },
    {
      "Href": "http://localhost/api/automatedtest/dff56a5f-40fa-41d5-8bc8-33c3d0014368/allrelationships",
      "Rel": "AllRelationships"
    },
    {
      "Href": "http://localhost/api/automatedtest/dff56a5f-40fa-41d5-8bc8-33c3d0014368/assignments",
      "Rel": "Assignments"
    }
  ]
}

Status Code

200 - OK

  • No labels