Get Test Execution Properties
To get information on a test execution, send a GET request to /rest/zapi/latest/execution/{id}
.
Request URL
GET /rest/zapi/latest/execution/{id}
The id parameter in the request path is the identifier of the desired test execution. If you created this execution through the Zephyr API, you can find the ID in the response to the corresponding request. For information on how to get the ID for an existing test execution, see Get IDs.
The request body is not used.
Other request parameters
Every request must include authentication parameters. See Zephyr Squad Server REST API.
Example
Operation reference
Response
A successful response has the HTTP status 200 OK
. Its body contains the JSON object with properties of the specified test execution, for example:
Description of response properties
Property | Description |
---|---|
| Number. The test execution ID. |
| Number. The special identifier that Zephyr uses to form the test execution order. It changes every time you reorder test executions in their folder or cycle. |
| Number. Specifies the ID of the test execution status (UNEXECUTED, WIP, and others). For information on getting the status IDs and names, see Update Test Execution Status. |
| The Jira workflow status of the test execution. Typically, |
| String. Specifies the date and time of the test execution. |
| A number that encodes the execution date and time. Can be helpful in automated processing. |
| The Jira ID of the user who started the test execution. |
| String. The name of the user who started the test execution. |
| The test execution’s comment in the plain text format. This comment is visible, for example, in the Details view of the cycle or folder, or on the view page of a Test issue in the Test Executions section. |
| The test execution’s comment in the HTML format. See above for information on how to view the comment. |
| Number. The ID of the test cycle to which the test execution belongs. |
| String. The name of the test cycle to which the test execution belongs. |
| Number. The ID of the folder to which the test execution belongs. |
| String. The name of the folder to which the test execution belongs. |
| Number. The ID of the project version to which the test execution belongs (version or release). |
| String. The name of the project version to which the test execution belongs (version or release). |
| Number. The Jira ID of the project to which the test execution belongs. Jira uses this ID for its internal operations. Don’t confuse it with the project key (see below). |
| String. The “visible” identifier of the Jira project to which the test execution belongs. Project keys are part of issue keys. For example, in the |
| The Jira ID of the user who created the test execution. |
| String. The name of the Jira user account that created the test execution. |
| String. The name of the user who created the test execution. |
| The Jira ID of the user who changed properties of the test execution last time. |
| String. Specifies the date and time when the test execution was created. |
| Number. The encoded date and time of the test execution creation. |
| Number. The Jira ID of the Test issue to which the test execution corresponds (see Adding Tests to Test Cycles). Typically, this ID is used internally. In the UI, you refer Jira items by their keys (see below). |
| Number. The key of the Test issue to which the test execution corresponds. Issue keys typically look like |
| The Summary field value of the Test issue. |
| The value of the Description field of the Test issue. |
| The labels of the Test issue. |
| The value of the Components field of the Test issue. |
| Boolean values that reflect attributes of the Test issue to which the test execution corresponds. These values are for internal use. |
| An array of JSON objects that has information on Jira items linked to the test execution. If the execution has no linked items, the property is absent. |
| The number of Jira items linked to the test execution, but not to its test steps. |
| The number of Jira items linked to all test steps of the test execution. |
| The total number of Jira items linked to the test execution and to its test steps (that is, this number is a sum of stepDefectCount and executionDefectCount). |
| A JSON object with the names and values of custom fields the test execution has. |
In case of an error, the server typically returns 4xx or 5xx response code. The response body contains the description of the error (with certain exceptions). Here are some examples:
If Zephyr has no test execution with the specified ID, the response code will be
400 Bad request,
and the response body will contain the error description:{ "error": "Execution 1,234,567 is Invalid." }
If the ID is not specified, the response code will be
500 Internal Server Error
, and the response body will contain the exception text and call stack.If the request has invalid authentication parameters, the response code is
200 OK
, and the response body contains the following:{ "errorDesc": "You do not have the permission to make this request. Login Required.", "errorId": "ERROR" }