Gathering detailed insights and metrics for gulp-protractor
Gathering detailed insights and metrics for gulp-protractor
Gathering detailed insights and metrics for gulp-protractor
Gathering detailed insights and metrics for gulp-protractor
@types/gulp-protractor
TypeScript definitions for gulp-protractor
gulp-angular-protractor
Based on the gulp-protractor plugin with an option to start / stop automatically the webdriver server
gulp-protractor-qa
Gulp Protractor QA warns you on the fly whether all element() selectors could be found or not within your AngularJS view files.
gulp-protractor-cucumber
Gulp plugin for protractor using cucumber framework
npm install gulp-protractor
Typescript
Module System
Min. Node Version
Node Version
NPM Version
53.5
Supply Chain
85.8
Quality
74.2
Maintenance
50
Vulnerability
94.1
License
JavaScript (97.71%)
HTML (2.29%)
Total Downloads
13,772,623
Last Day
2,229
Last Week
15,321
Last Month
72,476
Last Year
912,575
136 Stars
150 Commits
80 Forks
8 Watching
8 Branches
30 Contributors
Minified
Minified + Gzipped
Latest Version
4.1.1
Package Id
gulp-protractor@4.1.1
Size
7.78 kB
NPM Version
6.4.1
Node Version
10.13.0
Publised On
27 Nov 2018
Cumulative downloads
Total Downloads
Last day
-25.6%
2,229
Compared to previous day
Last week
-7.6%
15,321
Compared to previous week
Last month
-12.4%
72,476
Compared to previous month
Last year
-14.5%
912,575
Compared to previous year
5
Run your angular protractor tests with gulp
First, install gulp-protractor
as a development dependency:
1npm install --save-dev gulp-protractor
Then, add it to your gulpfile.js
:
1 2var protractor = require("gulp-protractor").protractor; 3 4gulp.src(["./src/tests/*.js"]) 5 .pipe(protractor({ 6 configFile: "test/protractor.config.js", 7 args: [ 8 '--baseUrl', 'http://127.0.0.1:8000', 9 '--suite', 'login', 10 '--params.environment', 'test' 11 ] 12 })) 13 .on('error', function(e) { throw e })
You have to update and start a standalone selenium server. Please read the offical instructions.
You can also ensure that the driver is installed by using the webdriver_update
task. Have a look at the example folder.
You have 2 options to start the selenium server.
The first one is to let Protractor handle it automatically, including stopping it once your tests are done. To do that, simply point to the selenium jar in the protractor config file (you will need to update the version number accordingly) instead of the address:
1 2 // The file path to the selenium server jar () 3 seleniumServerJar: './node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.2.0.jar', 4 // seleniumAddress: 'http://localhost:4444/wd/hub', 5
The second option is to let the gulp task handle it with the built-in webdriver snippet. If you decide to start it that way, the task will keep running indefinitely.
1var webdriver_standalone = require("gulp-protractor").webdriver_standalone; 2gulp.task('webdriver_standalone', webdriver_standalone);
Type: String
Default: null
The path to your protractor config
Type: Array
Default: []
Arguments get passed directly to the protractor call Read the docs for more information
Type: Boolean
Default: false
Enables Protractor's debug mode, which can be used to pause tests during execution and to view stack traces.
Type: Array
Default: []
1// Download and update the selenium driver 2var webdriver_update = require('gulp-protractor').webdriver_update_specific; 3 4// Downloads the selenium webdriver - stupid solution to pass extra args like ignore_ssl 5gulp.task('webdriver_update', webdriver_update({ 6 webdriverManagerArgs: ['--ignore_ssl'] 7}));
If you want to avoid using a plugin at all, here are gulp tasks which install the webdriver and start protractor:
First install the protractor package:
npm install --save-dev protractor
Then add these tasks to your gulpfile.js
:
1 2// gulpfile.js should be in workspace root for this example 3var gulp = require('gulp'); 4var path = require('path'); 5var child_process = require('child_process'); 6 7function getProtractorBinary(binaryName){ 8 var winExt = /^win/.test(process.platform)? '.cmd' : ''; 9 var protractorBin = path.join('node_modules', '.bin', binaryName); 10 return path.join(protractorBin, winExt); 11} 12 13gulp.task('protractor-install', function(done){ 14 child_process.spawn(getProtractorBinary('webdriver-manager'), ['update'], { 15 stdio: 'inherit' 16 }).once('close', done); 17}); 18 19gulp.task('protractor-run', function (done) { 20 var argv = process.argv.slice(3); // forward args to protractor 21 child_process.spawn(getProtractorBinary('protractor'), argv, { 22 stdio: 'inherit' 23 }).once('close', done); 24}); 25
You can add command line arguments for protractor behind the gulp task:
gulp protractor-run --specs=runOnlyThisFile.js
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 4/17 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More