Skip to content

Instantly share code, notes, and snippets.

@rhysd
Last active June 13, 2016 02:27
Show Gist options
  • Save rhysd/4abb1ef12b2bd4cba6d4cc3bc9b5e877 to your computer and use it in GitHub Desktop.
Save rhysd/4abb1ef12b2bd4cba6d4cc3bc9b5e877 to your computer and use it in GitHub Desktop.
wdio suite usage?
$ npm install
$ ./node_modules/.bin/wdio --suite=test/google.js
// test/google.js
const assert = require('assert');
describe('google.com', function() {
it('shows a title of page', function() {
browser.url('https://google.com');
assert(browser.getTitle() !== '');
});
});
{
"name": "wdio-bug",
"version": "0.0.0",
"private": true,
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"wdio-mocha-framework": "^0.3.1",
"webdriverio": "^4.0.9"
}
}
exports.config = {
specs: [
'./tests/*.js'
],
exclude: [
],
maxInstances: 10,
capabilities: [{
maxInstances: 5,
browserName: 'firefox'
}],
sync: true,
logLevel: 'result',
coloredLogs: true,
screenshotPath: './errorShots/',
baseUrl: 'http://localhost',
waitforTimeout: 10000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
framework: 'mocha',
mochaOpts: {
ui: 'bdd'
},
}
// test/yahoo.js
const assert = require('assert');
describe('yahoo.com', function() {
it('shows a title of page', function() {
browser.url('https://yahoo.com');
assert(browser.getTitle() !== '');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment