Hi,
I am running a set of test cases in Gitlab pipeline and have added a python file as below to upload the test results to JIRA.
import requests
CLIENT_ID="**********"
CLIENT_SECRET="***********"
response = requests.post("https://xray.cloud.getxray.app/api/v1/authenticate", data={"client_id":CLIENT_ID,"client_secret":CLIENT_SECRET})
access_token = response.json()
headers = {'Content-Type': 'application/xml', 'Authorization' : f'Bearer {access_token}'}
data = open('/builds/digitalxc-qa/digitalxc-appstore-api-test/src/test/java/api-robot/reports/final.xml','r', encoding='utf-8').read().encode('utf-8')
print(headers)
final_res = requests.post("https://xray.cloud.getxray.app/api/v1/import/execution/robot?projectKey=DAAT", data=data, headers=headers)
print("final line uploaded")
This is executed successfully in the gitlab pipeline but the results are not uploaded in JIRA -- Test Execution Issue Type is not displayed under Issues
What are the possible causes?? Please guide on the same.
Client ID and secret was generated from Jira settings > Apps > Xray > API Keys
I am the JIRA administrator.
Found the problem. API keys was generated for some duplicate ID.
Works fine. Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.