Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/markelog/gulp-wdio
Better gulp plugin for webdriver.io
https://github.com/markelog/gulp-wdio
browserstack gulp integration selenium test wdio webdriver
Last synced: about 1 month ago
JSON representation
Better gulp plugin for webdriver.io
- Host: GitHub
- URL: https://github.com/markelog/gulp-wdio
- Owner: markelog
- License: mit
- Created: 2016-05-23T11:27:43.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-05T21:15:41.000Z (almost 8 years ago)
- Last Synced: 2024-11-09T11:14:43.548Z (about 2 months ago)
- Topics: browserstack, gulp, integration, selenium, test, wdio, webdriver
- Language: JavaScript
- Size: 56.6 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# gulp-wdio [![Build Status](https://travis-ci.org/markelog/gulp-wdio.svg?branch=master)](https://travis-ci.org/markelog/gulp-wdio)
Same as [gulp-webdriver](https://github.com/webdriverio/gulp-webdriver) with three key differences:
- built-in browserstack support
- built-in selenium support
- included webdriver.io package (so you wouldn't have to)So you could just simple do –
```js
const wdio = require('gulp-wdio');gulp.task('e2e', () => {
return gulp.src('path/to/wdio.conf.js').pipe(wdio({// Omit "type" property if you want start wdio without additional layers
type: 'selenium', // or "browserstack"
wdio: {} // Same arguments as with `wdio --help`
}));
});
```Instead of something like this (taken [from](https://github.com/webdriverio/gulp-webdriver/blob/72c088ece031c70e568296583ef6170bec4ac58d/gulp/test.js) `gulp-webdriver` test script) –
```js
// For local selenium
import gulp from 'gulp'
import selenium from 'selenium-standalone'
import webdriver from '../lib/index'export default options => {
let errorLog = options.errorHandler('Selenium start')gulp.task('selenium:start', done => {
selenium.install({
logger (message) {
process.stdout.write(`${message} \n`)
},
progressCb: (totalLength, progressLength) => {
process.stdout.write(`Downloading drivers ${Math.round(progressLength / totalLength * 100)}% \r`)
}
}, err => {
if (err) return done(err)selenium.start({
spawnOptions: {
stdio: 'ignore'
}
}, (err, child) => {
selenium.child = child
errorLog(err)
done()
})
})
})gulp.task('test', ['selenium:start'], () => {
return gulp.src(`${options.test}/wdio.*`)
.pipe(webdriver({
logLevel: 'verbose',
waitforTimeout: 12345,
framework: 'mocha',
// only for testing purposes
cucumberOpts: {
require: 'nothing'
}
})).once('end', () => {
selenium.child.kill()
})
})
}
```