Info | ||
---|---|---|
| ||
Please look at Sample Projects and Code Snippets sections for a more concrete end-to-end example. |
...
This Automation REST API is protected by the same restrictions which are provided via JIRA. This means that you need to log in in JIRA to access this API.
Option 1:
To supply basic Auth header, perform the following steps:
1. Build a string of the form username:password
→ Password: Password refers to the API token generated from the API Token Authentication for Jira app.
Expand | ||
---|---|---|
| ||
1. Install the API Token Authentication for Jira app in Jira. 2. Go to Administration > User Management. 3. Locate the API Token Authentication option on the navigation bar and generate the API Token. Use this API Token as a password. |
2. Encode the string in Base64 format.
3. Supply 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 |
Option 2:
Note: This option will be applicable only from QTM4J v4.1.9.1 onwards.
To use personal access token, perform the following steps:
Go to User Profile.
Click on Personal Access Tokens and click on Create token.
Supply an "Authorization" header with content "Bearer" followed by generated token.
Authorization: |
...
Parameter | Type | Required | Description |
---|---|---|---|
apiKey | string | Yes | Your API Key. API Key is unique for a specific user in a single project. The result will be imported for the project associated with the given API Key. |
format | string | Yes | Format of result file to be imported. Supported formats:
|
testAssetHierarchy | string | No | Level of Hierarchy : Test Scenario-Test Case Or Test Case-Test Step |
testCaseUpdateLevel | number | No | Test Case update level while reusing test case, starts from 0 to 2. (This is only applicable when you use TestCase-TestStep Hierarchy option) 0 Append test steps while reusing Test Case. |
testRunName | string | No | Name of the test run to be created. Default value: Test Run |
platform | string | No | Name of Platform on which test run to be executed. |
labels | string | No | Comma separated names of Labels to be added to the test run. |
versions | string | No | Comma separated names of versions to be added to the test run. |
components | string | No | Comma separated names of Components to be added to the test run. |
sprint | string | No | Name of Sprint to be added to the test run. |
comment | string | No | Comment to be added to the test run. |
testRunKey | string | No | Provide Test Run key to append new results to existing Test Run. |
attachFile | boolean | No | Pass true for attachments upload in execution. Default value: false. |
JIRAFields | JSON | No | Check specific Automation custom fields possible value and format here. |
...