Resource: Script Run ( /api/scriptrun/{id} )
A resource for managing a single script run. When updating a script run you can have the opportunity to 'complete' the run without supplying values for all the step results i.e. if the first step result is failed, you can skip providing the remainder of the step results - see the PUT examples for more information.
This resource supports the following methods: DELETE, GET, PUT
Methods
DELETE
Delete script run by its 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).
Status | Description |
---|---|
200 - OK | Returned if request completed successfully. |
403 - Forbidden | Returned if the required permissions to delete this automated test run have not been met. |
404 - NotFound | Returned if no script run with the specified identifier exists. |
An example of deleting a script run.
Request Parameters
Key | Value | Description |
---|---|---|
{id} | 4bb709c2-e0e7-4af3-9f60-a045016a9610 | The unique identifier (GUID) of the script run to delete. |
Status Code
200 - OK
GET
Retrieves a single script run 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).
Status | Description |
---|---|
200 - OK | Returned if the request was completed successfully. |
403 - Forbidden | Returned if you do not have permission to view the script run. |
404 - NotFound | Returned if no script run with that identifier exists. |
Retrieves a script by its unique identifier.
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
{id} | 74A91027-C1FB-46FF-B0F9-471F7D8DB2BC | Unique identifier of script run. |
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json; charset=utf-8 |
Response Body
{ "Id": "74a91027-c1fb-46ff-b0f9-471f7d8db2bc", "ActualDuration": "5 minutes", "ScriptId": "15710485-6aba-4158-8b67-4e0120bc8c09", "ScriptVersion": 1, "AssignmentId": "6cb9a282-53b0-4acb-91f3-10363adfecf9", "CreatedAt": "2012-01-01T14:04:05Z", "LastUpdatedAt": "2012-02-02T15:05:06Z", "CreatedById": "e4051ca5-c8e5-4068-a177-66fa30708460", "CreatedBy": "joeb", "RunById": "e4051ca5-c8e5-4068-a177-66fa30708460", "RunBy": "joeb", "LastUpdatedById": "e4051ca5-c8e5-4068-a177-66fa30708460", "LastUpdatedBy": "joeb", "Status": "In Progress", "Expands": [ "Assignment", "Widgets", "FieldValues", "StepResults" ], "Self": "http://localhost/api/scriptrun/74a91027-c1fb-46ff-b0f9-471f7d8db2bc" }
Status Code
200 - OK
PUT
Updates a script run.
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).
Status | Description |
---|---|
200 - OK | Returned if the request was completed successfully. |
403 - Forbidden | Returned if you do not have permission to update the script run. |
404 - NotFound | Returned if no script run with that identifier exists. |
Update a script run with a failed step (with no attempt to complete the run).
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
{id} | 74A91027-C1FB-46FF-B0F9-471F7D8DB2BC | The unique identifier (GUID) of script run. |
Request Body
{ "ActualDuration": "5m", "StepResults": [ { "ActualResult": "Step 1 failed", "Outcome": "Failed", "Id": "2e67b67f-0d25-4545-bcca-3be5ed25944a" } ] }
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json; charset=utf-8 |
Response Body
{ "Id": "74a91027-c1fb-46ff-b0f9-471f7d8db2bc", "ActualDuration": "5 minutes", "ScriptId": "15710485-6aba-4158-8b67-4e0120bc8c09", "ScriptVersion": 1, "AssignmentId": "6cb9a282-53b0-4acb-91f3-10363adfecf9", "CreatedAt": "2012-01-01T14:04:05Z", "LastUpdatedAt": "2012-02-02T15:05:06Z", "CreatedById": "e4051ca5-c8e5-4068-a177-66fa30708460", "CreatedBy": "joeb", "RunById": "e4051ca5-c8e5-4068-a177-66fa30708460", "RunBy": "joeb", "LastUpdatedById": "e4051ca5-c8e5-4068-a177-66fa30708460", "LastUpdatedBy": "joeb", "Status": "In Progress", "Completed": false, "Expands": [ "Assignment", "Widgets", "FieldValues", "StepResults" ], "Self": "http://localhost/api/scriptrun/74a91027-c1fb-46ff-b0f9-471f7d8db2bc" }
Status Code
200 - OK
Update a script run with a failed step (and attempt to complete the run).
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
{id} | 74A91027-C1FB-46FF-B0F9-471F7D8DB2BC | Unique identifier of script run. |
Request Body
{ "AttemptToComplete": true, "ActualDuration": "5m", "StepResults": [ { "ActualResult": "Step 1 failed", "Outcome": "Failed", "Id": "2e67b67f-0d25-4545-bcca-3be5ed25944a" } ] }
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json; charset=utf-8 |
Response Body
{ "Id": "74a91027-c1fb-46ff-b0f9-471f7d8db2bc", "ActualDuration": "5 minutes", "ScriptId": "15710485-6aba-4158-8b67-4e0120bc8c09", "ScriptVersion": 1, "AssignmentId": "6cb9a282-53b0-4acb-91f3-10363adfecf9", "CreatedAt": "2012-01-01T14:04:05Z", "LastUpdatedAt": "2012-02-02T15:05:06Z", "CreatedById": "e4051ca5-c8e5-4068-a177-66fa30708460", "CreatedBy": "joeb", "RunById": "e4051ca5-c8e5-4068-a177-66fa30708460", "RunBy": "joeb", "LastUpdatedById": "e4051ca5-c8e5-4068-a177-66fa30708460", "LastUpdatedBy": "joeb", "Status": "Failed", "Completed": true, "Expands": [ "Assignment", "Widgets", "FieldValues", "StepResults" ], "Self": "http://localhost/api/scriptrun/74a91027-c1fb-46ff-b0f9-471f7d8db2bc" }
Status Code
200 - OK
Update a script run with two passed steps (the script has 3 steps, so the last step remains as 'Not Run') and attempt to complete the run. Note: In this example the run can not be completed because for a script to pass in ET, all its steps must pass.
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
{id} | 74A91027-C1FB-46FF-B0F9-471F7D8DB2BC | Unique identifier of script run |
Request Body
{ "AttemptToComplete": true, "ActualDuration": "5m", "StepResults": [ { "ActualResult": null, "Outcome": "Passed", "Id": "2e67b67f-0d25-4545-bcca-3be5ed25944a" }, { "ActualResult": null, "Outcome": "Passed", "Id": "88d20ccc-62bb-4bb0-9691-f4b9bad8bd38" }, { "ActualResult": null, "Outcome": "Not Run", "Id": "91e474e0-a6d9-41b6-b010-36b46995b024" } ] }
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json; charset=utf-8 |
Response Body
{ "Id": "74a91027-c1fb-46ff-b0f9-471f7d8db2bc", "ActualDuration": "5 minutes", "ScriptId": "15710485-6aba-4158-8b67-4e0120bc8c09", "ScriptVersion": 1, "AssignmentId": "6cb9a282-53b0-4acb-91f3-10363adfecf9", "CreatedAt": "2012-01-01T14:04:05Z", "LastUpdatedAt": "2012-02-02T15:05:06Z", "CreatedById": "e4051ca5-c8e5-4068-a177-66fa30708460", "CreatedBy": "joeb", "RunById": "e4051ca5-c8e5-4068-a177-66fa30708460", "RunBy": "joeb", "LastUpdatedById": "e4051ca5-c8e5-4068-a177-66fa30708460", "LastUpdatedBy": "joeb", "Status": "In Progress", "Completed": false, "Expands": [ "Assignment", "Widgets", "FieldValues", "StepResults" ], "Self": "http://localhost/api/scriptrun/74a91027-c1fb-46ff-b0f9-471f7d8db2bc" }
Status Code
200 - OK