javascriptcucumberjswdio-v6

Unable to run tests when passing multiple cucumber tags as run time argument in package.json


I am trying to run multiple cucumber tags when I am passing them from package.json. it is not able to invoke any tests however it works if i hardcode them in wdio.conf.js. I am using below statement in my package json file

"testscript": "npx wdio run ./wdio.conf.js --browser=chrome --parallel=true --cucumberOpts.tagExpression='@Login or @API'",

I am using cucumber framework 7.12.0 and Wdio cli version 7.16.10


Solution

  • I have managed to get it working you need to below syntax

    "scripts": {
    "RunTest": "npx wdio run ./wdio.conf.js --cucumberOpts.tagExpression=\\\"@Login or @TCILogin\\\""
    

    }