Hey everyone,
I’m working on a project where I need to import a bunch of tests into JIRA X-Ray. I’ve got a CSV file with all the test details, including steps. Here’s the tricky part: some steps in my tests are actually calls to other tests (like templates).
In my CSV, I’ve set up a special column for each step that contains the ID of the test it should call, if applicable. Not all steps have this, just the ones that are meant to reference other tests.
I know X-Ray supports this kind of test referencing, but I’m not sure how to make it work with the built-in test case importer. Is there a way to set this up so I can import everything in one go, including these test-to-test calls?
Any tips or tricks would be super helpful. Thanks!
hey jumpingrabbit, i get yur frustration. try using scriptrunner add-on—it lets u script custom fixes. a groovy script can update test steps and refs. this might be a quicker fix than manual updates.
I’ve been down this road before, and it’s definitely a tricky one. The built-in importer is great for basic stuff, but falls short with complex relationships like test-to-test references. Here’s what worked for me:
I ended up writing a custom Python script that does a two-phase import. First, it uses the JIRA API to create all the tests without references. Then, it goes through a second pass to update the tests with the proper step references.
The script reads the CSV, creates a mapping of your custom IDs to the actual JIRA issue keys, and then uses that to update the steps. It’s not a plug-and-play solution, but it’s flexible and can handle large imports.
One tip: Use the bulk update endpoint if you’re dealing with a massive number of tests. It’ll save you a ton of time. Also, make sure to implement proper error handling and logging. Trust me, you’ll thank yourself later when troubleshooting.
It took some time to set up, but now we can import complex test structures with ease. If you’re comfortable with coding, this approach could save you a lot of manual work in the long run.
I’ve tackled a similar challenge with JIRA X-Ray imports. Unfortunately, the built-in importer doesn’t handle test-to-test references out of the box. However, I found a workaround that might help.
First, import all your tests without the references. Then, use JIRA’s REST API to update the tests with the step references. You’ll need to write a script that reads your CSV, matches the IDs, and sends PUT requests to update each test.
It’s not as straightforward as a one-step import, but it’s reliable. You’ll need some coding skills or maybe involve a developer. The JIRA API documentation is quite good, so that should help you get started.
This approach worked well for my team, allowing us to maintain complex test structures while leveraging bulk import capabilities.