Hi,
I am trying to import robotframework execution result to execution cycle in xray using REST API. Refering the following link
response = requests.post('https://<server>/api/v1/import/execution/robot?testExecKey=XX-15275',auth=('<user_name>','<key>'),data=xml,headers=headers)
The issue(testExecKey) menntioned is already existing in the environment.
headers = {'Content-Type':'text/xml'}
Getting 404
Tried following,
curl -H "Content-Type: text/xml" -X POST -H "<user_name>:<key>" --data @"output.xml" https://<server>/api/v1/import/execution/robot?testExecKey=XX-15782
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>Oops, you've found a dead link. - JIRA</title><link type='text/css' rel='stylesheet' href='/static-assets/metal-all.css' media='all'><script src='/static-assets/metal-all.js'></script><!--[if lt IE 9]><link type='text/css' rel='stylesheet' href='/static-assets/metal-all-ie.css' media='all'><script src='/static-assets/metal-all-ie.js'></script><![endif]--><!--[if IE 9]><link type='text/css' rel='stylesheet' href='/static-assets/metal-all-ie9.css' media='all'><![endif]--><meta name="decorator" content="none" /></head><body class=" error-page error404"><script type="text/javascript">document.body.className += " js-enabled";</script><div id="page"><header id="header" role="banner"></header><!-- #header --><section id="content" role="main"><div class="aui-page-panel"><div class="aui-page-panel-inner"><section class="aui-page-panel-content lowerContent"><div id="error-state"><span class="error-type"></span><h1>Oops, you've found a dead link.</h1><ul><li>Go back to the <a href="javascript:window.history.back()">previous page</a></li><li>Go to the <a href="/secure/MyJiraHome.jspa">Home Page</a></li></ul></div></section><!-- .aui-page-panel-content --></div><!-- .aui-page-panel-inner --></div><!-- .aui-page-panel --></section><!-- #content --><footer id="footer" role="contentinfo"><section class="footer-body">
<ul class="atlassian-footer">
<li>
Atlassian JIRA <a class="seo-link" href="https://www.atlassian.com/software/jira">Project Management Software</a>
<span id="footer-build-information">(v1001.0.0-SNAPSHOT#100125-<span title='84eb0935209574a9983e2839ed793f423c8e12fe' data-commit-id='84eb0935209574a9983e2839ed793f423c8e12fe}'>sha1:84eb093</span>)</span>
</li>
<li>
<a id="about-link" href="/secure/AboutPage.jspa">About JIRA</a>
</li>
<li>
<a id="footer-report-problem-link" href="/secure/ContactAdministrators!default.jspa">Report a problem</a>
</li>
</ul>
It seems the syntax of curl command in the documentation is incorrect. Following command worked (this is for Cloud, where you dont need to replace the domain url with your server url but keep it as it is as http://xray.cloud.getxray.app) :
curl --location 'http://xray.cloud.getxray.app/api/v1/import/execution/robot/multipart' \
--header 'Authorization: Bearer <enter token here>’ \
--form 'results=@"/Users/xyz/output.xml"' \
--form 'info=@"/Users/xyz/create_test_exec.json"'
create_test_exec.json
{ "fields": { "project": { "id": "10402" }, "summary": "Brand new Test execution", "issuetype": { "id": "10007" } }, "xrayFields": { "testPlanKey": "DEMO-15" } }
I also tried with id instead of username but no luck.
Can anyone pls help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
any one got solution to this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It seems the syntax of curl command in the documentation is incorrect. Following command worked:
curl --location 'http://xray.cloud.getxray.app/api/v1/import/execution/robot/multipart' \
--header 'Authorization: Bearer <enter token here>’ \
--form 'results=@"/Users/xyz/output.xml"' \
--form 'info=@"/Users/xyz/create_test_exec.json"'
create_test_exec.json
{ "fields": { "project": { "id": "10402" }, "summary": "Brand new Test execution", "issuetype": { "id": "10007" } }, "xrayFields": { "testPlanKey": "DEMO-15" } }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.