在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):rochejul/gulp-angular-protractor开源软件地址(OpenSource Url):https://github.com/rochejul/gulp-angular-protractor开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):gulp-angular-protractor
Install$ npm install --save-dev gulp-angular-protractor Side dependenciesYou should declare what expected version of protractor and webdriver manager you want to use: {
"name": "example-gulp-protractor",
"version": "0.0.1",
"description": "",
"scripts": {
"gulp": "node node_modules/gulp/bin/gulp.js",
"test": "npm run gulp protractor"
},
"devDependencies": {
"gulp": "latest",
"gulp-angular-protractor": "latest",
"protractor": "4.0.11",
"webdriver-manager": "10.2.8"
}
} Be carefull: some protractor and webdriver dependencies version required:
Usagevar gulp = require('gulp');
var angularProtractor = require('gulp-angular-protractor');
gulp.src(['./src/tests/*.js'])
.pipe(angularProtractor({
'configFile': 'test/protractor.config.js',
'args': ['--baseUrl', 'http://127.0.0.1:8000'],
'autoStartStopServer': true,
'debug': true
}))
.on('error', function(e) { throw e }) Full example/*jshint node: true, camelcase: false*/
/*global require: true*/
'use strict';
var gulp = require('gulp'),
gulpProtractorAngular = require('gulp-angular-protractor');
// Setting up the test task
gulp.task('protractor', function(callback) {
gulp
.src(['example_spec.js'])
.pipe(gulpProtractorAngular({
'configFile': 'protractor.conf.js',
'debug': false,
'autoStartStopServer': true
}))
.on('error', function(e) {
console.log(e);
})
.on('end', callback);
}); APIangularProtractor(options)optionsoptions.autoStartStopServerType: If true, the plugin will update the WebDriver, launch the WebDriver server before launching tests and stop it at the end automatically options.configFileType: The path to your protractor config options.argsType: Arguments get passed directly to the protractor call Read the docs for more information options.debugType: Enables Protractor's debug mode, which can be used to pause tests during execution and to view stack traces. options.verboseType: options.protractorModulePathType: If you want to use another protractor version instead the default one options.webDriverUpdateType: options.webDriverUpdate.skipType: options.webDriverUpdate.browsersType: List of browsers to update the webdriver options.webDriverUpdate.argsType: Additional arguments to pass for the update of the webdriver options.webDriverStartType: options.webDriverStart.argsType: Additional arguments to pass for the start of the webdriver LicenseMIT © Julien Roche |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论