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?
I am also facing this issue, this looks to be a bug to me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.