2
我需要使用gulp來執行xvfb和量角器。 Gulp運行xvfb,但是當運行量角器時它不使用我開始的xvfb。 我不知道的另一件事是如何停止正在運行的任務,例如在運行量角器測試後停止xvfb任務。如何使用Xvfb +量角器+ Gulp
我的代碼是:
// Include gulp and gulp-angular-protractor
var gulp = require('gulp');
var angularProtractor = require('gulp-angular-protractor');
var shell = require('gulp-shell');
var runSequence = require('run-sequence');
gulp.task('xvfb-start', shell.task([
"Xvfb :99 -ac -screen 0 1600x1200x24",
"export DISPLAY=:99"
]));
gulp.task('protractor-run', shell.task([
"Xvfb :99 -ac -screen 0 1600x1200x24",
"protractor ../../e2e-tests/protractor.conf.js"
]));
gulp.task('default', ['xvfb-start', 'protractor-run']);