【问题标题】:gulp-protractor reports skipped tests as failedgulp-protractor 报告跳过的测试失败
【发布时间】:2015-07-07 23:10:40
【问题描述】:

运行开箱即用的“量角器”命令会按预期运行我的整个 E2E 目录。我禁用的测试报告为已跳过。

但是,我现在使用 gulp-protractor 来处理 E2E。但是当我运行 gulp protractor 时,禁用的测试报告为失败。

我似乎无法弄清楚问题所在。

这是控制我的 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);

【问题讨论】:

    标签: gulp protractor jasmine2.0


    【解决方案1】:

    原来我的 gulp 任务依赖项没有按顺序处理,这是需要的。

    这很有帮助:http://schickling.me/synchronous-tasks-gulp/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-04-05
      • 1970-01-01
      • 2020-12-12
      • 1970-01-01
      • 2012-01-13
      • 1970-01-01
      • 2020-06-19
      相关资源
      最近更新 更多