Resource: Automated Tests ( /api/automatedtests )
Automated tests (collection) resource
Root Relation: AutomatedTests
This resource supports the following methods: GET, POST
Methods
GET
Retrieves all (or a subset) of automated tests that are visible.
This method supports the TQL query parameters tql, $top, $take and $inlinecount. See TQL Topic for more details.
Required Permissions
- TestManagement/View
Supported Expansions
- Assignments
- Configuration
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 could not complete request (normally due to a validation failure or the necessary permissions to complete the request were not met). |
Retrieve all automated tests
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json; charset=utf-8 |
Response Body
Code Block | ||
---|---|---|
| ||
{ "Skip": 0, "Top": 25, "Total": 2, "Items": [ { "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" } ] }, { "Id": "08348cb0-1313-4721-bfcb-b9e02a0cd5bc", "Type": "Selenium", "Name": "Login Tests", "CreatedAt": "2012-03-02T15:05:06Z", "LastUpdatedAt": "2012-04-02T16: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": 2, "Expands": [ "Assignments", "Configuration" ], "Self": "http://localhost/api/automatedtest/08348cb0-1313-4721-bfcb-b9e02a0cd5bc", "Links": [ { "Href": "http://localhost/api/automatedtest/08348cb0-1313-4721-bfcb-b9e02a0cd5bc/relationships", "Rel": "Relationships" }, { "Href": "http://localhost/api/automatedtest/08348cb0-1313-4721-bfcb-b9e02a0cd5bc/allrelationships", "Rel": "AllRelationships" }, { "Href": "http://localhost/api/automatedtest/08348cb0-1313-4721-bfcb-b9e02a0cd5bc/assignments", "Rel": "Assignments" } ] } ] } |
Status Code
200 - OK
Retrieve automated tests matching TQL query
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
tql | Type = UnitTest |
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json; charset=utf-8 |
Response Body
Code Block | ||
---|---|---|
| ||
{ "Skip": 0, "Top": 25, "Total": 1, "Items": [ { "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
POST
Creates a new automated test
Required Permissions
- TestManagement/ManageScripts
Supported Expansions
- Assignments
- Configuration
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 |
---|---|
201 - Created | Returned if the request was completed successfully. |
403 - Forbidden | Returned if ET could not complete request (normally due to a validation failure or the necessary permissions to complete the request were not met.). |
Create automated test
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
{id} | DFF56A5F-40FA-41D5-8BC8-33C3D0014368 | The unique identifier of automated test to return. |
Request Body
Code Block | ||
---|---|---|
| ||
{ "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
Key | Value | Description |
---|---|---|
Location | http://localhost/api/automatedtest/4bb709c2-e0e7-4af3-9f60-a045016a9610 | |
Content-Type | application/json; charset=utf-8 |
Response Body
Code Block | ||
---|---|---|
| ||
{ "Id": "4bb709c2-e0e7-4af3-9f60-a045016a9610", "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/4bb709c2-e0e7-4af3-9f60-a045016a9610", "Links": [ { "Href": "http://localhost/api/automatedtest/4bb709c2-e0e7-4af3-9f60-a045016a9610/relationships", "Rel": "Relationships" }, { "Href": "http://localhost/api/automatedtest/4bb709c2-e0e7-4af3-9f60-a045016a9610/allrelationships", "Rel": "AllRelationships" }, { "Href": "http://localhost/api/automatedtest/4bb709c2-e0e7-4af3-9f60-a045016a9610/assignments", "Rel": "Assignments" } ] } |
Status Code
201 - Created