There are more than 500 Cucumber Feature files in our automation test suite and I am trying to import them into Xray. I am using Jenkins to do that with XrayImportFeatureBuilder class. As suggested in Importing Cucumber Tests - REST doc, Feature section will not be imported because it is assumed to be there already in Jira as a Requirement Issue. Now since there are those many Feature files it's really time consuming to manually add each Feature title and description into Jira to have it linked with Tests when I run the import job.
Would be great to know if there a way to only import Feature section?
I have Jira DC v3.9.0 installed with Xray v3.6.6
The process of importing the cucumber .feature files is detailed here and mentions precisely that it's not possible to import Feature section, as that will correspond to, usually, an existing Story issue. This whole idea assumes that people are using Jira in the most common scenario. Stories usually follow a process, where someone is responsible for creating and reviewing them. Nevertheless, if you want to provision them, the only option I see would be to make some code/script to parse the .feature files and then either build out a CSV that could be imported by Jira's CSV Importer or do REST API requests to the Jira API directly to create those issues. However, you would end with 500 Story issues that you would need to link by hand to the corresponding scenarios/tests. To make that linkage more or less automatic, you would need to edit the .feature files (after importing them), and add a tag with the requirement/story issue created earlier before the "Feature: " section. This would be a challenging thing though as you have many .feature files.