I’m having trouble with my Jenkins pipeline’s Xray integration. The pipeline step for importing test results is failing with a 400 error. It says my Test Execution issue doesn’t exist or isn’t the right type. But I’ve double-checked and it definitely is a Test Execution issue in Jira.
The error message shows some weird characters around my issue key. It looks like \u0027TEST-123\u0027 instead of just TEST-123. I think these might be quotation marks, but I’m not sure why they’re there or how to get rid of them.
I’ve tried using double quotes and removing quotes altogether, but nothing seems to work. Has anyone run into this before? Any ideas on how to fix it?
I encountered a similar issue in our CI/CD pipeline. The problem might be related to how Jenkins is handling the string interpolation for the testExecKey. Have you tried using a variable instead of a hardcoded string? Something like this:
This approach helped us bypass the strange encoding issue. If that doesn’t work, you might want to check your Jenkins and Xray plugin versions for compatibility issues. Sometimes, updating to the latest versions resolves these quirks.
I’ve dealt with this exact issue before, and it’s a real headache. In my case, the problem was actually with the Xray plugin version in Jenkins. We were using an older version that had some bugs with string handling.
Updating the Xray plugin to the latest version fixed it for us. You can do this through the Jenkins plugin manager. After updating, we also had to restart our Jenkins instance for the changes to take effect.
If that doesn’t solve it, you might want to check your Jenkins console output for any additional error messages. Sometimes there are hidden clues there that don’t show up in the pipeline error.
Also, double-check your Jira permissions. Even if the issue exists, your Jenkins credentials might not have the right access to it. That can sometimes cause cryptic errors like this.
Hope this helps. Let us know if you get it sorted!