Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cucumberJson doesn't contain all tests when multiple example tables are present in the feature file #629

Closed
sham-christopher opened this issue Oct 7, 2021 · 3 comments

Comments

@sham-christopher
Copy link

Current behavior

When there are multiple Example tables in a a Scenario Outline and when only one of the tags is run, the cucumberJson file will only contain the scenarios of the last table.

Desired behavior

cucumberJson should contain the tests of the correct tag executed

Test code to reproduce

Here's an example feature file


Feature: An example feature file

@abc
Scenario Outline: Verify that a customer can do something
Given that the applicatoin is open
And the user searches for the
When the user does something
Then the operation has performed

@test
Examples:
  | customerNumber |
  | 2193542483     |

@release
Examples:
  | customerNumber |
  | 5560121237     |

Scenario 1: Run the tests for the @test tag

npx cypress run TAGS=@test --spec xyz.feature

Actual Result

cucumberJson file is generated with only the skipped scenarios of @Release and not the passed or failed tests of @test

Scenario 2: Run the tests for the @Release tag

npx cypress run TAGS=@Release --spec xyz.feature

Actual Result

cucumberJson file is generated with only the passed/failed scenarios of @Release

In both cases, only the tests of the Example table shown last is present in the json file, be it passed, failed or skipped.

Versions

  • Cypress version: 7.7.0, however this has the same behavior with the latest as well
  • Preprocessor version: 4.3.0
  • Node version: 14
@aman1080
Copy link

I tried Cytorus and it supports multiple examples.

@avikashg
Copy link

avikashg commented Jan 1, 2022

I also tried. It does execute as expected. Spec results also show it correctly. Issue is with json report. It only contains the entries of last example table of scenario.

@badeball
Copy link
Owner

Due to personal reasons, the previous maintainers of this package are stepping down and handing the reigns over to me, a long-time contributor to the project and a user of it myself. This is a responsibility I'm very excited about. Furthermore, I'd like to thank @lgandecki ++ for all the work that they've done so far.

Read more about the transfer of ownership here.

The repository has however moved and all outstanding issues are being closed. This is not a reflection of the perceived importance of your reported issue. However, if after upgrading to the new version, you still find there to be an issue, feel free to open up another ticket or comment below. Please make sure to read CONTRIBUTING.md before doing so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants