运行开箱即用的'protractor‘命令会运行我的整个E2E目录。我禁用的测试被报告为已跳过。
但是,我现在使用gulp-protractor来处理E2E。但是当我运行gulp量角器时,禁用的测试报告为失败。
我似乎不知道问题出在哪里。
这是控制我的吞咽e2e任务的代码。
'use strict';
var
gulp = require('gulp'),
load = require('gulp-load-plugins')(),
browserSync = require('browser-sync'),
paths = gulp.paths;
//starts protractor
function runProtractor(done) {
gulp.src(paths.e2e + '/**/**/*.js')
.pipe(load.protractor.protractor(
{
configFile: 'protractor.conf.js'
}
))
.on('error', function (e) {
// Make sure failed tests cause gulp to exit non-zero
throw e;
})
.on('end', function () {
// Close browser sync server
browserSync.exit();
done();
});
}
//starts local, selenium, and then starts protractor
gulp.task('protractor:src', ['serve:e2e', 'webdriver-update'], runProtractor);
// Downloads the selenium webdriver
gulp.task('webdriver-update', load.protractor.webdriver_update);发布于 2015-07-07 23:10:40
事实证明,我的吞咽任务依赖项不是按顺序处理的,而这正是需要的。
这很有帮助:http://schickling.me/synchronous-tasks-gulp/
https://stackoverflow.com/questions/30647909
复制相似问题