I am trying to run just one feature file in protractor. I know that I can declare that file in protractor.conf.js, but I have also seen a solution by use of a tag:
In a feature file one would insert a tag at the beginning of the file like so:
@onlyRunThis
and protractor would only execute that file. (One could call it an E2E-equivalent of "fdescribe")
How would I implement such a tag? Can I even implement my own tags in protractor/cucumber? As you see I am quite sketchy on the whole matter.
I did find another question here on SO, which addresses the same issue (How to run only one feature file when running protractor with cucumber?) but none of the solutions work for me.
Thanks! :-)
The above solution did not work for me. The following should work
protractor conf.js --cucumberOpts.tags="@onlyRunThis"
This will run all scenarios which have the tag @onlyRunThis set. When you add a tag to a feature then all scenarios inside it are run.
If you don't want to use tags for this you can call the command
protractor conf.js --specs=path/to/feature
Both work for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With