badeball / cypress-cucumber-preprocessor

Run cucumber/gherkin-syntaxed specs with Cypress
MIT License
1.32k stars 149 forks source link

How to run a scenario based on scenario name #369

Closed abhinaba-ghosh closed 2 years ago

abhinaba-ghosh commented 4 years ago

Hi,

in other tools, we have an option to run a specific scenario with scenario name like:

--cucumberOpts.name="this is first test"

In native cucumberJS, it's like:

cucumber-js --name="this is first test"

Do we have an option here with cypress?

jprealini commented 4 years ago

I think cypress doesn't support that.. but, if what you are intending is to just run a specific scenario in your local environment (maybe you have a feature file with 30 tests, and you are working on just one of them, so you don't want the whole 30 to be executed every time you run the feature) you can use smart tagging... I tag the tests I am working on as @focus, and have my config file setup to execute only tests tagged as @focus .. and that's it

abhinaba-ghosh commented 4 years ago

Hi @jprealini , the TAG concept works just fine. But I am in process to develop a plugin for Cucumberjs integrative tools to run scenarios easily. Its called Cucumber-Quick This needs a scenario name to execute a particular scenario. As native cucumber-js supports selective execution based on scenario name or scenario line number, will there be a plan to enhance cypress-cucumber-preprocessor to support scenario name-based execution in the near future?

lgandecki commented 4 years ago

Not possible currently, but no reasons why to not have it - if someone was willing to put the work and create a PR that would be great.

badeball commented 2 years ago

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.