Hey folks, I’m having trouble with the Jira Zephyr API. I made a test cycle and tried to add a test to it, but now it’s taking forever. Here’s what I did:
Created a test cycle using POST to /rest/zapi/latest/cycle
Tried to add a test using POST to /rest/zapi/latest/execution/addTestsToCycle
Received a jobProgressToken to check the job status
The job has been running for over 30 minutes, and when I try to delete the cycle, it shows that the process is still in progress. I’m not sure what went wrong or how to complete the process. Any suggestions?
I’ve encountered similar issues with the Zephyr API before. In my experience, the problem often lies with the version ID. You’re using ‘-1’ for versionId, which might be causing the delay. Try specifying an actual version ID from your project instead.
Also, I’ve found that large test cycles or adding multiple tests simultaneously can cause extended processing times. If possible, try creating a smaller test cycle or adding tests one at a time to isolate the issue.
Another potential solution is to implement a timeout mechanism in your code. This way, you can catch and handle long-running processes more gracefully. You might also want to check your Jira instance’s performance and ensure it’s not overloaded.
If the problem persists, I’d recommend reaching out to Atlassian support. They can provide more detailed insights into your specific Jira configuration and any potential API limitations you might be hitting.
I’ve dealt with similar Zephyr API issues, and it can be frustrating. One thing that’s worked for me is breaking down the process into smaller chunks. Instead of adding all tests at once, try adding them in batches of 10 or 20. This approach has helped me avoid those never-ending job statuses.
Another tip: double-check your API permissions. Sometimes, the API user doesn’t have the right access levels, which can cause weird behavior like this. It might be worth reviewing the user’s permissions in Jira and making sure they have full access to Zephyr.
If you’re still stuck, consider using the Zephyr Scale API instead of the older Zephyr API. In my experience, it’s more reliable and has better documentation. The endpoints are different, but the functionality is similar, and it might solve your current headache.
Lastly, don’t forget to implement proper error handling and logging in your code. It’s saved me countless hours of debugging when dealing with finicky APIs like this one.
hey man, ive run into this before. its a pain! have u tried checking ur network connection? sometimes a slow connection can make the API hang. also, make sure ur not hitting any rate limits. Jira can be picky bout that stuff. if nothing else works, maybe try using the REST API directly instead of the Zephyr endpoints. Good luck!