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 installInstall selenium-standalone service to be able to run selenium server on local machine. This is a one time step.
npm run selenium-installRun the selenium local server so that web-driver-io can run the tests.
npm run selenium-startFinally, run the tests.
npm run testGenerate allure reports
npm run allure-reportOpen allure reports in browser (http://localhost:7777)
npm run allure-serveThe 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