Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info
titleWorking Sample

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
titleHow to generate API Token?

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:

  1. Go to User Profile.

  2. Click on Personal Access Tokens and click on Create token.

  3. Supply an "Authorization" header with content "Bearer" followed by generated token. 

Authorization: Bearer NTE1NTYzMTg4MDEzOit5OlIjghTQQEH/YZ7HNrpSxvcU

...

ParameterTypeRequiredDescription
apiKeystringYesYour 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.
formatstringYes

Format of result file to be imported. Supported formats:

 

testAssetHierarchystringNo

Level of Hierarchy : Test Scenario-Test Case Or Test Case-Test Step

testCaseUpdateLevelnumberNoTest 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.
1 Override test steps while reusing Test Case.
2 No change in test steps while reusing Test Case.
Default :- No change in test steps while reusing Test Case.

testRunNamestringNoName of the test run to be created. Default value: Test Run
platformstringNoName of Platform on which test run to be executed.
labelsstringNoComma separated names of Labels to be added to the test run.
versionsstringNoComma separated names of versions to be added to the test run.
componentsstringNoComma separated names of Components to be added to the test run.
sprintstringNoName of Sprint to be added to the test run.
commentstringNoComment to be added to the test run.
testRunKeystringNoProvide Test Run key to append new results to existing Test Run.
attachFile
booleanNoPass true for attachments upload in execution. Default value: false.
JIRAFieldsJSONNoCheck specific Automation custom fields possible value and format here.

...