Xray: feature name blank in exported Cucumber .feature files

majchman March 6, 2017

We are using Xray plugin for JIRA for managing our automated tests for Cucumber. When exporting the .feature-files from Xray, the feature name is blank. Like in this example:

Feature: 
    #description
    @TestLabel
    Scenario: Just as test scenario
        Given User is on the homepage
        When User clicks the login button
        Then the test is a success
In the plugin documentation it is stated, that the feature name is taken from the requirement issue summary connected with this test. I assume since we do not use requirement issues for our tests, there is no summary that can be used as feature name?
How can Xray be configured, so that the feature name is based for example on the test summary and exported properly?

1 answer

1 accepted

2 votes
Answer accepted
Sergio Freire - Xblend
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2017

Hi @majchman,

that behaviour is currently hard-coded, so it takes the summary from the "requirement" issue.

Having it taken from the test summary I guess it wouldn't work, since you may be exporting multiple tests at the same time, but this has to be properly evaluated. I would ask you to open an improvement request in our project in JIRA, detailing the exact behavior, so it can be analyzed and we also see feedback from other users.

Please use Xray's service desk so we can properly track and give you on time feedback.

Regards,

Sergio

Anshuman Wadhera March 28, 2019

Hi @Sergio Freire - Xblend ,

 

Even after linking the requirement with the test, the feature name is blank in exported cucumber files.

One thing i have noticed is that our project is not listed as "Requirement" project in admin. Is it necessary to enable that to get feature names in exported cucumber files?

This is important as we generate multiple feature files for parallel execution using cucumber-jvm-parallel, but without a feature name, all scenarios(as "Test" issue type) in a test set end up in a single feature file prolonging execution.

Sergio Freire - Xblend
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 28, 2019

Hi,

yes, you must enable requirement coverage on that project.

You may do it from the Requirements Projects administration tab settings or from the project settings page as mentioned here: https://confluence.xpand-it.com/display/XRAY/Quick+Setup

If you still face issues, please reach our support so they can help you out.

Regards

Sergio

Rahul Kasana February 27, 2020

Hi,

 

If we are exporting multiple tests from X-Ray, can we just hard code the feature description to something like "Multiple Tests from X-Ray" or anything. We are running our tests via serenity and absence of Description is causing our builds to fail.

Rahul Kasana February 27, 2020

@Sergio Freire - Xblend any thoughts?

Sergio Freire - Xblend
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 15, 2020

Hi @Rahul_Kasana ,

sorry but I missed this message.

No, you can't harcode the feature description. It is filled automatically from the requirement's description. If the tests are not linked to any requirement, it will generate an invalid .feature file (missing the "Feature: " section). We may improve this in the near future to have there a dummy feature like "Feature: default".

As I've mentioned, you can and should reach out our support team in the future; they will be glad to help you out. Here's the service desk link.

Regards,

Sergio

Rahul Kasana May 15, 2020

Hi @Sergio Freire - Xblend ,

Thanks for your reply, I am good for now. I have added a step to modify the downloaded feature file to insert something like "Feature: As a bamboo agent I want to run tests from xyz" before actually starting with the test execution.

 

Regards,

Rahul

Suggest an answer

Log in or Sign up to answer