Table of Contents |
---|
Info | ||
---|---|---|
| ||
Please look at Sample Projects and Code Snippets sections for a more concrete end-to-end example. |
...
Method : POST
REQUEST HEADER :
- Content-Type : application/json
- {generated-api-key}
- Basic ZnJlZDpmcmVk
Authorization
This Automation REST API is protected by the restrictions provided by JIRA. You need to log in Jira using the basic Auth header. Follow below steps to generate basic Auth and pass it to request header :
1. Build a string of the form username:password
2. Encode the string in Base64 format.
3. Pass an "Authorization" header with content "Basic " followed by the encoded string. For example, the string "fred:fred" encodes to "ZnJlZDpmcmVk" in base64, so you would make the request as follows.
Authorization: Basic ZnJlZDpmcmVk |
Notes
- zip file must contain files of same format given in the 'format' param.
- Request must contain json raw body payload, form-data is not supported.
...
Parameter | Type | Required | Description | Default |
---|---|---|---|---|
format | string | Yes | Format of result file to be imported. Supported formats:
| NA |
testCycleToReuse | string | No | Issue Key of the test cycle to be reused | New Test Cycle will be created. |
environment | string | No | Name of the environment on which test cycle has to be executed | No Environment |
build | string | No | Name of the build for test case execution | Blank |
isZip | boolean | No (Yes for QAF) | Pass true for ZIP upload or pass false for single file upload | false |
attachFile | boolean | No | Pass true to upload attachments in execution. For more details, Refer automation help documents. This parameter is supported only for-
| false |
fields | JSON | No | Provide additional fields to be added on test case or test cycle level. Refer to following table for more. Note : If cycle is reused, fields of test cycle will be ignored. | Blank |
...
Responses
Response | Description | ||||||
---|---|---|---|---|---|---|---|
STATUS 200 | Returned if results file is uploaded successfully. The import process might take a while and you would be notified (by email or checking the status of the created test run) once the process completed. Example
| ||||||
| Returned if import fails If unsupported framework is sent in request
If zip file is not sent in QAF framework request
If one or more fields have invalid value
|
2.2 Upload test result file
...
URL : {{URL generated from step 1}}
Method : POST
Request Header
- Content-Type :
multipart/form-data
- {generated-api-key}
- Basic ZnJlZDpmcmVk
Request Body - Result file to be uploaded. Supported file extensions: .json, .xml and .zip (zip file must contain files of the format given in the 'format' param).
...
Responses
Response | Description | ||
---|---|---|---|
STATUS 200 | Returned if file is uploaded successfully. | ||
STATUS 400 | Returned if file upload happens after URL expiration time or if Content-type=multipart/form-data header is not passed Example URL Expiry
| ||
STATUS 204 | Returned if file format is not valid. No Content |
2.3 Check Progress
...
GET
application/json
apiKey : {generated-api-key}
Responses
Response | Description | ||
---|---|---|---|
SUCCESS | Returned if parameters are validated successfully. Example
| ||
FAILED | Returned if any validation fails Example
|
...