Closed silvenon closed 8 years ago
Ideally it should just log the error and not emit an error event when the tests fail. Right now this can't be used in CI since it will stop the process.
Edit: @silvenon for now you can do the following:
gulp.task('webdriver', function (done) {
return gulp.src('wdio.conf.js')
.pipe(webdriver())
.on('error', function(){
done();
});
});
That will make the process continue.
@Robinfr thanks, but in this case won't the process hang if it does not emit an error?
is
stream.emit('error', new gutil.PluginError('gulp-webdriver', 'wdio exited with code ' + code, {
showStack: false
}));
not the proper way to finish the gulp task with an error?
@matia no it won't block if there is no error.
@christian I'm not sure. All I know is that if a error is emitted in a gulp task, the execution is stopped. So I would say that it's probably not the correct way for this case.
In this case, the tests failing does not mean that the gulp task failed that's why.
The gulp task is a success as long as all the tests have been run.
This got obsolete with v2.0.0
The task doesn't finish when tests fail, so gulp just waits forever.