Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gulp end event not firing in 2.0.0 #41

Closed
stevejhiggs opened this issue Mar 30, 2016 · 6 comments · Fixed by #47
Closed

gulp end event not firing in 2.0.0 #41

stevejhiggs opened this issue Mar 30, 2016 · 6 comments · Fixed by #47
Labels

Comments

@stevejhiggs
Copy link

In v1.0.3 I use the gulp 'end' event to shutdown my selenium server:

return gulp.src('./wdio.conf.js'))
    .pipe(webdriver({
      wdioBin:  path.join(__dirname, 'node_modules', '.bin', wdioCommand)
    })).once('end', () => {
      selenium.child.kill();
    });`

however in 2.0.0 the 'end' event never fires. Is this intentional?

@christian-bromann
Copy link
Contributor

@stevejhiggs yeah that was unfortunate implemented. I fixed it and published a new version v2.0.1

@azaslavsky
Copy link
Contributor

Hi,
I'm using 2.0.1, and I am still experiencing the error described above. My code:

  gulp.src('wdio.conf.js')
      .pipe(wdio({
        host: 'localhost',
        port: 1234,
        logLevel: args.verbose ? 'verbose' : 'error',
        capabilities: capabilities
      }))
      .on('error', function(e) {
        //throw e;
      })
      .on('end', function() {
        console.log('I\'m finished!');
        if (!args.serverless) {
          servers.forEach(function(server) {
            server.kill();
          });
        }
        done();
      });

Any thoughts as to what I am doing wrong?

@christian-bromann
Copy link
Contributor

Why can't you use the selenium-webdriver service? It seems that the end event is not propagated correctly

@azaslavsky
Copy link
Contributor

I use appium for tests under certain configurations, so sometimes I need a plain old selenium server, whereas in other cases I need an appium server, or sometimes both. I just run shells scripts to create my own as child processes as needed, then kill them once the test runner has done its thing.

Either way, the "end" event should be fired for a gulp plugin.

@azaslavsky
Copy link
Contributor

azaslavsky commented Jun 15, 2016

Is there a workaround I could use in the meantime, something that will be able to pick up when the test suite is over at least? If that were the case, I could kill the process myself.

@azaslavsky azaslavsky mentioned this issue Jul 6, 2016
@christian-bromann
Copy link
Contributor

Let's continue the conversation in #47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants