I’m facing an issue when I attempt to upload my JUnit XML test results to Xray in JIRA. I get the same error message stating “Error creating issues in Jira!” each time I make an attempt.
Had this exact error a few months ago - it’s usually a test case mapping problem. Xray can’t find existing Test issues in your project that match your JUnit test names. That test name “User authentication … Confirm login for regular user @auth_tests” probably doesn’t match any Test issue summary or key in JIRA. Here’s what fixed it for me: either create Test issues in JIRA first with summaries that exactly match your test names, or modify your JUnit XML to reference existing Test issue keys directly. Also check your API token permissions - you need rights to create and link issues in both JIRA and Xray. I’d try a simpler test name first without special characters to see if that fixes the mapping issue.
This usually happens when your project config doesn’t match the API endpoint you’re hitting. Had the same issue last year - turns out it was my Content-Type header. Switch it to application/xml instead of text/xml. Xray’s picky about that. Also check your bearer token has the right scopes for reading AND writing to your project. Make sure your project actually exists and is set up for Xray too. The error message can be misleading - might actually be an auth or access rights problem. I’d test with minimal XML first to figure out if it’s your data format or config that’s broken.
First, check if your xray license is active - I’ve hit this exact error when our subscription expired without us noticing. Also try adding the testPlanKey parameter to your curl command. Xray sometimes needs it even though the docs don’t make that clear. Your xml looks fine, but maybe remove that @auth_tests tag from the test name. Special characters can cause issues.