Giter Club home page Giter Club logo

Comments (8)

sgronblo avatar sgronblo commented on May 18, 2024 6

Why was this issue closed?

from nightwatch.

wayneseymour avatar wayneseymour commented on May 18, 2024

Interesting!

from nightwatch.

jordan112 avatar jordan112 commented on May 18, 2024

I don't believe nightwatch supports this yet, testing of two browsers at the same time. What if you had two different nightwatch sessions running at the same time and passed in a different environment with the --env operation?

from nightwatch.

beatfactor avatar beatfactor commented on May 18, 2024

No, it doesn't but it's certainly something to consider for the future.

On Fri, Feb 21, 2014 at 3:26 PM, jordan112 [email protected] wrote:

I don't believe nightwatch supports this yet, testing of two browsers at
the same time. What if you had two different nightwatch sessions running at
the same time and passed in a different environment with the --env
operation?

Reply to this email directly or view it on GitHubhttps://github.com/beatfactor/nightwatch/issues/49#issuecomment-35734143
.

from nightwatch.

acroix avatar acroix commented on May 18, 2024

@beatfactor Yes that would be a really interesting feature. Btw it was possible to do it with the selenium protocol so maybe we can see how implement the feature
@jordan112 To do it I need to open another terminal to start a new nightwatch runner... That's a problem because running a new terminal depend on your system configuration.

from nightwatch.

beatfactor avatar beatfactor commented on May 18, 2024

I think it might be possible using the cluster module and spawning a new
worker for each target browser.

On Fri, Feb 21, 2014 at 3:52 PM, Alexandre Croix
[email protected]:

@beatfactor https://github.com/beatfactor Yes that would be a really
interesting feature. Btw it was possible to do it with the selenium
protocol so maybe we can see how implement the feature
@jordan112 https://github.com/jordan112 To do it I need to open another
terminal
to start a new nightwatch runner... That's a problem because
running a new terminal depend on your system configuration.

Reply to this email directly or view it on GitHubhttps://github.com/beatfactor/nightwatch/issues/49#issuecomment-35736660
.

from nightwatch.

acroix avatar acroix commented on May 18, 2024

Ok I did a test with cluster and workers, that's working !
So first, thanks !

Here is the poc:

var cluster = require('cluster');
var exec = require('child_process').exec;

if (cluster.isMaster) {

    cluster.fork().on('online', function () {
        exec('./nightwatch local -e chrome -t tests/chat/client1.js', function (error, stdout, stderr) {
            console.log('stdout: ' + stdout);
            if (error !== null) {
                console.log('exec error: ' + error);
            }
        });

        this.kill();
    });

    cluster.fork().on('online', function () {
        exec('./nightwatch local -e chrome -t tests/chat/client2.js', function (error, stdout, stderr) {
            console.log('stdout: ' + stdout);
            if (error !== null) {
                console.log('exec error: ' + error);
            }
        });

        this.kill();
    });
}

Possible next step can be :

  • Target browsers we want to use
    • with nightwatch cli ?
  • If the user want to use "multibrowser"
    • new workers for each target browser
    • each workers start a new nightwatch runner

@beatfactor What do you think ?

from nightwatch.

beatfactor avatar beatfactor commented on May 18, 2024

Yes, this is a good start.
On Feb 24, 2014 5:00 PM, "Alexandre Croix" [email protected] wrote:

Ok I did a test with cluster and workers, that's working !
So first, thanks !

Here is an example:

var cluster = require('cluster');var exec = require('child_process').exec;
if (cluster.isMaster) {

cluster.fork().on('online', function () {
    exec('./nightwatch local -e chrome -t tests/chat/client1.js', function (error, stdout, stderr) {
        console.log('stdout: ' + stdout);
        if (error !== null) {
            console.log('exec error: ' + error);
        }
    });

    this.kill();
});

cluster.fork().on('online', function () {
    exec('./nightwatch local -e chrome -t tests/chat/client2.js', function (error, stdout, stderr) {
        console.log('stdout: ' + stdout);
        if (error !== null) {
            console.log('exec error: ' + error);
        }
    });

    this.kill();
});}

Possible next step can be :

  • Target browsers we want to use
    • with cli ?
      • If the user want to use "multibrowser"
    • new workers for each target browser
    • each workers start a new nightwatch runner

@beatfactor https://github.com/beatfactor What do you think ?

Reply to this email directly or view it on GitHubhttps://github.com/beatfactor/nightwatch/issues/49#issuecomment-35900944
.

from nightwatch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.