1
votes

I'm using the below command to run one of test case using nightwatch, but getting the below error npm run test:cucumber -- --tag Seleniumeasy

[email protected] test:cucumber C:\Users****\Desktop\Automation

mkdirp report && cucumber-js --require cucumber.conf.js --require step-definitions --format node_modules/cucumber-pretty --format json:report/cucumber_report.json "--tag" "Seleniumeasy"

error: unknown option --tag' npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] test:cucumber:mkdirp report && cucumber-js --require cucumber.conf.js --require step-definitions --format node_modules/cucumber-pretty --format json:report/cucumber_report.json "--tag" "Seleniumeasy"` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] test:cucumber script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

1
I'm not particularly familiar with Cucumber, but it's probable that some dependency is missing. Try running it without the --tag argument. Also, make sure that cucumber is installed and it's the correct version. also, why is there an empty argument -- ? Maybe you ought to try it without that as well?QualiT
@QualiT that is the format for running a particular test scenario using nightwatchnevergiveup
Does it run for other scenarios?QualiT
No, if I try to insert 'tag' option it throws that errornevergiveup
Thanks for the help!.. I have solved it.nevergiveup

1 Answers

0
votes

This worked for me

npm run test:cucumber -- --tags "@Seleniumeasy"