I’m facing an issue when attempting to upload my JUnit test results to Xray within JIRA. Whenever I go to import the XML file, it prompts an error message.
This sounds like a permissions or project config issue. I’ve hit this before - the project had specific field requirements for test executions that weren’t getting filled during import. Check if your DEMO project has mandatory custom fields set up for Test Execution issue types. You can test this by manually creating a test execution in Jira to see what’s actually required. Also double-check your Bearer token scopes - it needs both read and write permissions for that specific project. Sometimes tokens work fine for other stuff but bomb out when creating new issues because of scope limits.
This usually happens because your XML structure is incomplete. You’ve got failures=“1” but no element inside the testcase to explain why it failed. Xray needs consistent data to create test executions properly. Either add a element if the test actually failed, or change it to failures=“0” if it passed. Also double-check that Xray’s configured correctly in your project and that auto-creation of test cases is enabled in your settings. I’ve seen this same issue when the XML has mismatched result data that Jira can’t turn into proper test execution issues.
had this same error just a bit ago. make sure ur auth token has the correct permissions for the project. also, consider adding a Content-Length header to your curl command - xray can be a bit picky with that stuff.