A small POC to get started with web-driver-io
using selenium-standalone
as a local selenium service. Make sure you have JRE & JDK installed before proceeding.
The POC also uses spec
& allure
reporters apart from default dot
reporter to generate reports.
Install node dependencies.
npm install
Install selenium-standalone
service to be able to run selenium server on local machine. This is a one time step.
npm run selenium-install
Run the selenium local server so that web-driver-io
can run the tests.
npm run selenium-start
Finally, run the tests.
npm run test
Generate allure reports
npm run allure-report
Open allure reports in browser (http://localhost:7777)
npm run allure-serve
The test report generated using allure
is available here
exports.config = {
specs: [
'./test/**/*.js'
],
exclude: [],
maxInstances: 10,
capabilities: [{
maxInstances: 5,
browserName: 'chrome'
}],
sync: true,
logLevel: 'command',
coloredLogs: true,
deprecationWarnings: true,
bail: 0,
screenshotPath: './errorShots/',
waitforTimeout: 10000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
framework: 'mocha',
reporters: ['dot', 'spec', 'allure'],
reporterOptions: {
allure: {
outputDir: 'allure-results'
}
},
mochaOpts: {
ui: 'bdd'
},
}
Manoj Chalode (chalodem@gmail.com)
Copyright - github.com/manojc