UNPKG

2.08 kBMarkdownView Raw
1# gulp-protractor [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url]
2
3> Run your [angular protractor](https://github.com/angular/protractor) tests with [gulp](https://github.com/wearefractal/gulp)
4
5## Usage
6
7First, install `gulp-protractor` AND `protractor` as a development dependency:
8
9```shell
10npm install --save-dev gulp-protractor protractor
11```
12
13Then, add it to your `gulpfile.js`:
14
15```javascript
16var protractor = require("gulp-protractor").protractor;
17
18gulp.src(["./src/tests/*.js"])
19 .pipe(protractor({
20 configFile: "test/protractor.config.js"
21 }))
22 .on('error', function(e) { throw e })
23```
24
25### Protractor Webdriver
26You have to update and start a standalone selenium server. [Please read the offical instructions](https://github.com/angular/protractor#appendix-a-setting-up-a-standalone-selenium-server). You can use the build in webdriver snippet.
27
28```javascript
29var webdriver = require("gulp-protractor").webdriver;
30gulp.task('webdriver', webdriver);
31```
32
33## API
34
35### protractor(options)
36
37#### options.configFile
38Type: `String`
39Default: `null`
40
41The path to your protractor config
42
43#### options.args
44Type: `Array`
45Default: `[]`
46
47Arguments get passed directly to the protractor call [Read the docs for more information](https://github.com/angular/protractor/blob/master/docs/getting-started.md#setup-and-config)
48
49
50#### options.debug
51Type: `Boolean`
52Default: `false`
53
54Runs protractor with the debug flag [Protractor Debugging documentation](https://github.com/angular/protractor/blob/master/docs/debugging.md#timeouts)
55
56
57## License
58
59[MIT License](http://en.wikipedia.org/wiki/MIT_License)
60
61[npm-url]: https://npmjs.org/package/gulp-protractor
62[npm-image]: https://badge.fury.io/js/gulp-protractor.png
63
64[travis-url]: http://travis-ci.org/mllrsohn/gulp-protractor
65[travis-image]: https://secure.travis-ci.org/mllrsohn/gulp-protractor.png?branch=master
66
67[depstat-url]: https://david-dm.org/mllrsohn/gulp-protractor
68[depstat-image]: https://david-dm.org/mllrsohn/gulp-protractor.png