Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
fork-grunt-protractor-runner
Advanced tools
A Grunt plugin for running Protractor runner.
This plugin requires Grunt ~0.4.1
and Protractor 1.x.x
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-runner --save-dev
This plugin will install protractor
module locally as a normal dependency.
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-protractor-runner');
Finally you need a Selenium server. If you don't have one set up already, you can install a local standalone version with this command:
./node_modules/grunt-protractor-runner/node_modules/protractor/bin/webdriver-manager update
In your project's Gruntfile, add a section named protractor
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
protractor: {
options: {
configFile: "node_modules/protractor/example/conf.js", // Default config file
keepAlive: true, // If false, the grunt process stops when the test fails.
noColor: false, // If true, protractor will not use colors in its output.
args: {
// Arguments passed to the command
}
},
your_target: { // Grunt requires at least one target to run so you can simply put 'all: {}' here too.
options: {
configFile: "e2e.conf.js", // Target-specific config file
args: {} // Target-specific arguments
}
},
},
})
Type: String
Default value: node_modules/protractor/referenceConf.js
relative to where protractor module is installed.
A protractor config file.
Type: Boolean
Default value: false
(true
before v1.0.0)
If true, grunt process continues even if the test fails. This option is useful when using with grunt watch. If false, grunt process stops when the test fails.
Type: Boolean
Default value: false
If true, protractor will not give colored output. If false, protractor will give colored output, as it does by default.
Type: Boolean
Default value: false
If true, grunt will pass 'debug' as second argument to protractor CLI to enable node CLI debugging as described in Protractor Debugging documentation.
Type: Object
Default value: {}
Arguments passed to the command. These arguments can also be supplied via command-line too. Ex.grunt protractor --specs=specs/some-test.js
Supported arguments are below.
string
: A running selenium address to usestring
: Location of the standalone selenium server .jar filestring
: Optional port for the standalone selenium serverstring
: URL to prepend to all relative pathsstring
: Element housing ng-app, if not html or bodyarray
: Array of spec files to test. Ex. ["spec1.js","spec2.js"]
array
: Array of files to exclude from testing. Ex. ["spec2.js"]
string
: Name of test suite to runboolean
: Print stack trace on errorboolean
: Print full spec namesstring
: Browser name, e.g. chrome or firefoxobject
: Param object to be passed to the test as browser.paramsstring
: Location of chrome driver overridng the property in config fileboolean
: Bypass Selenium for Chrome only testingboolean
: To connect directly to the browser Drivers. This option is only available for Firefox and Chrome.string
: Username for a SauceLabs accountstring
: Access Key for a SauceLabs accountstring
: Customize the URL Protractor uses to connect to sauce labs (for example, if you are tunneling selenium traffic through a sauce connect tunnel). Default is ondemand.saucelabs.com:80/wd/hub
object
: Capabilities object to be passed to the test, e.g. browserName, platform and versionstring
: Limited support for using mocha as the test framework instead of jasmine.object
: Cucumber framework options object to be passed to the test, e.g. require, tags and formatobject
: Mocha test framework options object to be passedType: String
Default value: false
The file that the task should output the results to.
Type: String
Default value: node
Path to the node binary file. Useful if node is not on the PATH.
Run npm install
to install dependencies.
Then run grunt
or npm test
to test the module. You will encounter these.
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.
This plugin installs protractor
module locally as a normal dependency.
In case you want to use the plugin with the global installed protractor command. You can do it with these steps below.
rm -rf node_modules/protractor
protractor
globally with npm install -g protractor
require()
mechanism. See Module loading from the global folders for more information.webdriver-manager update
to install/update selenium driver for global install protractor.You need to install/update selenium webdriver for protractor.
webdriver-manager update
or node scripts/webdriver-manager-update
or node ./node_modules/protractor/bin/webdriver-manager update
1.2.1
split
and through2
from devDependencies to dependencies (#104)1.2.0
options.nodeBin
to specify node binary (#96)1.1.4
webdriver-manager update
step from problematic postinstall to pretest1.1.3
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
options.keepAlive
to false (#50)0.2.5
0.2.4
0.2.3
0.2.2
protractor
module as a normal dependency and automatically download/update webdriver with webdriver-manager
after installed (#29, #39)0.2.1
0.2.0
require()
function works (#29)peerDependencies
to devDependencies
. These changes might break some user modules. (See FAQ above for explanation) (#29)0.1.11 - Support SauceLabs account config in options.args (#27)
0.1.10
0.1.9
0.1.8 - Support --chromeDriver in options.args (#17)
0.1.7 - Support --browser and --params arguments passed to the protractor command using config in options.args (#12)
0.1.6 - Change protractor(peerDependencies) to support version to 0.x (#8, #9, #10)
0.1.5 - Added options.debug
(#7)
0.1.4 - Change protractor(peerDependencies) to support version to 0.10.x - 0.11.x (#6)
0.1.3 - Fixed Windows command
0.1.2 - Added keepAlive option.
FAQs
A Grunt plugin for running protractor runner.
The npm package fork-grunt-protractor-runner receives a total of 7 weekly downloads. As such, fork-grunt-protractor-runner popularity was classified as not popular.
We found that fork-grunt-protractor-runner demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.