#grunt-protractor A grunt plugin for protractor
Integrating Protractor with Grunt
This plugin requires Grunt.
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-protractor --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-protractor');
In your project's Gruntfile, add a section named protractor
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
protractor: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
})
Any option that is enabled in Protractor can be passed. Full Set of Options
Type: String
Default value: undefined
A path to a config file (in the Protractor style) relative to the Gruntfile.js for the project. Any options passed in through the Gruntfile will take precendence over the config file options.
At the bare minimum, specs have to be passed in. These can be passed in directly in the config option, or specify a config file with them specified there.
grunt.initConfig({
protractor: {
local: {
options: {
specs: ['test/integration/**.js', 'test/e2e/**.js'],
}
},
},
})
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
See the Changelog
Copyright (c) 2014 Eddie Monge. Licensed under the MIT license.