Last active
June 13, 2016 02:27
-
-
Save rhysd/4abb1ef12b2bd4cba6d4cc3bc9b5e877 to your computer and use it in GitHub Desktop.
wdio suite usage?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm install | |
$ ./node_modules/.bin/wdio --suite=test/google.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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() !== ''); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
}, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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