Based on documentation here, I tried to import my JUnit-style XML using the following inputs. curl -H "Content-Type:multipart/form-data" -u mylogin:mypassword -F "file=@output.xml" https://jira.nayax.com/rest/raven/1.0/import/execution/junit?projectKey=TGP&testPlanKey=TGP-25
I used this article to convert my JMeter XML output to JUnit format using XSL. The output is:
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite>
<testcase classname="httpSample" name="Set-up Thread: loginUsingPOST - Success"
time="0.789">
<failure/>
</testcase>
<testcase classname="httpSample" name="Set-up Thread: loginUsingPOST - Success"
time="0.631">
<failure/>
</testcase>
<testcase classname="httpSample" name="createNfcTagUsingPOST - Success" time="0.282">
<failure/>
</testcase>
<testcase classname="httpSample" name="handleTagDetectionUsingPOST - Success"
time="0.311">
<failure>Test failed: code expected to equal /
****** received : [[[403]]]
****** comparison: [[[200]]]
/</failure>
</testcase>
</testsuite>
</testsuites>
The output was:
{"error":"Error assembling issue data: Field \u0027customfield_11033\u0027 cannot be set. It is not on the appropriate screen, or unknown."}
When I looked at a Test in the source-code view in the browser, that field was hidden:
<input type="hidden" name="raven-testexec-test-customFieldId" id="raven-testexec-test-customFieldId" value="customfield_11033"/>
So it is simply customFieldId
.
Now what?
When I looked at a Test Execution in the source-code view and searched for 11033
, I did not find it at all.
I read on XRay's documentation site that one can use the multipart
variety of the API, but I get the same result.
curl -H "Content-Type:multipart/form-data" -u login:password -F "file=@output.xml" -F "testInfo=@test_info.json" -F "info=@test_exec_info.json" https://jira.nayax.com/rest/raven/1.0/import/execution/junit/multipart
{
"fields": {
"project": {
"id": "12900",
"key": "TGP"
},
"summary": "Test Execution for JMeter Execution"
}
}
{
"fields": {
"description": "Game Activation"
}
}
Does anyone have constructive recommendations? Been several days. Thanks.
Hi @guy
This is a community, not a support service. If you have urgency, it is best to contact the support service of the respective Apps (https://marketplace.atlassian.com/apps/1211769/xray-test-management-for-jira?hosting=datacenter&tab=support).
In this case, the Xray Support (http://Xraysupport.getXray.app).
About the issue you are reporting, the error message states that the custom field with ID 11033 is not present in the screen of the Test Execution or the Test (depending on the issue that you are updating).
Changing to a multipart API will not help because the issue is with the custom field not being found.
You need to look up the custom fields and check if it exists, and if so, check the screens where the custom field is found. It should be missing on the Test Execution or the Test screens, or both.
If the custom field does not exist in your instance, it should not be used since you should not reference a custom field that does not exist. If you are using the documentation examples, please remember that custom fields IDs change from instance to instance, so you cannot assume that it will have the same ID in your instance.
Thank you.
Kind regards,
Rogerio Paiva [Xray Support Team]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.