Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Xray adds Examples to a Scenario (not to a Scenario Outline) during export

rkrisztian
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 31, 2024

In Xray Cloud, let's say I create a Cucumber test with a Dataset added to the scenario (using the Dataset button that brings up the table editor for the parameters). Then the resulting scenario after exporting the features will look like this (not a meaningful example, it's just for demonstrating the syntax):

Scenario: Login works
When I log in with "<username>" and "<password>"
Then I am logged in
 Examples:
| username | password |
| john | test1 |
| bob | test2 |

As you can see, Xray forgets to change the Scenario to Scenario Outline.

This isn't a problem when I define the Examples: keyword directly in the scenario text box, and I don't use the Dataset button. In such cases, Xray exports the scenario with the Scenario Outline keyword:

Scenario Outline: Login works
When I log in with "<username>" and "<password>"
Then I am logged in
 Examples:
| username | password |
| john | test1 |
| bob | test2 |

As you can see, specifying the Examples manually yields the correct syntax.

Could you please explain if this is a bug? I think it is, because the Gherkin standard, as far as I know, does not say anywhere that Scenario with Examples is valid in Gherkin. It happens to work in cucumber-js, but we shouldn't expect that every tool will just happily support this.

Also, why is it possible to define the examples in two ways? Shouldn't we always use the Dataset button?

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Krishnan Govindarajan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 10, 2024

I am also facing this issue, this looks to be a bug to me

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events