Resolving errors in WebdriverIO - 'no test specified' | 'missing )'
June 23, 2020
The errors ‘echo error no test specified && exit 1’ and ‘missing ) after argument list’ sometimes occur when running your WedbriverIO tests with npm run test.
If you get that error after running your test first check that the test script in your package.json
has the correct command.
Check that you are not actually echoing out that error.
If you are change what is in your test script to
"test": "wdio",
and run your test again. Ensure that you have a wdio.conf.js file with the correct path to your specs.
You can also try
node ./node_modules/.bin/wdio ./wdio.conf.js
Be sure verify that the path to your specs in your wdio.conf file is correct.
Then rerun your test.
Some persons still get the error after they have made that change, or they get this error
missing ) after argument list
To resolve this error remove node from the command to have
./node_modules/.bin/wdio ./wdio.conf.js
If you are still getting an error try to use the npm package npx.
npx wdio run wdio.conf.js
or
wdio wdio.conf.js
You can read up more on this module as it can be very useful.
After this rerun your test and it should pass.
Check out the Youtube Tutorial for this blog.