Friday, August 18Be an Automation Engineer

Configuring wdio test runner

Run the below command in your project location to make the ‘webdriverio’ library available in your project.

npm install webdriverio

Run the below command to configure wdio test runner.

./node_modules/webdriverio/bin/wdio config

A questioner will be displayed as below image. Answer the simple question to configure your project to run webdriverio tests.

Questions and sample answers:
Q: Where do you want to execute your tests?
A: On my local machine

Q: Which framework do you want to use?
A: jasmine

Q: Shall I install the framework adapter for you?
A: Yes (just press enter)

Q: Where are your test specs located?
A: ./test/specs/*/.js (just press enter)

Q: Which reporter do you want to use?
A: dot (just press space and enter)

Q: Shall I install the reporter library for you?
A: Yes (just press enter)

Q: Do you want to add a service to your test setup?
A: selenium-standalone –
e-service (just press space and enter)

Q: Level of logging verbosity:
A: silent (just press enter)

Q: In which directory should screenshots gets saved if a command fails?
A: ./errorShots/ (just press enter)

Q: What is the base url?
A: (just press enter)

Wait for the configurator to install required dependencies and observe that wdio.conf.js is displayed in your project folder.

Now, let’s create folder structure in the project.

$ mkdir -p ./test/specs
Project Structure will look like below:


%d bloggers like this: