# Executing tests in multiple browser instances

Note

The number of concurrent tests you can run is the based on the number of agents you've purchased.

# Configuration

Add multiple to gondola.json as below:

{
    ...
    "multiple": {
        "regression": {
            "browsers": [
                "chrome",
                "firefox",
                "internet explorer"
            ]
        },
        "smoke": {
            "grep": "@smoke_test",
            "browsers": [
                "chrome",
                "firefox"
            ]
        },
    }
}

In this example, we've defined 2 test suites:

regression will run all of the tests in Chrome, Firefox and Internet Explorer

smoke will run the tests tagged with @smoke_test in Chrome and Firefox

# Execution

the `gondola` command may not have been added to your %Path% on Windows or $Path on Linux/OSx. In that case you may have to run

./node_modules/.bin/gondola run-multiple parallel --reporter mochawesome

Run the test suites:

gondola run-multiple regression
gondola run-multiple smoke

Or if you'd like to run them in specific browsers:

gondola run-multiple regression:chrome
gondola run-multiple smoke:chrome regression:firefox

# Automatic Test Distribution

# Configuration

Specify the chunks option under the multiple section of gondola.json. You may need to add a multiple section to gondola.json if it's not already there:

{

    "multiple": {
        "regression": {
            "chunks": 2,
            "browsers": [
                "chrome",
                "firefox",
                "internet explorer"
            ]
        }
    }
}

Then execute the tests using run-multiple:

gondola run-multiple regression

# How It Works

With the above configuration, Gondola will execute two (2) test modules at the same time. Each test module will also launch 3 browsers. Therefore, we will see 6 browser instances at the same time.

Let's say you have 11 test modules. You would see (6*3) 18 test reports. The 11 test modules would be divided into 6 buckets with 2 modules each. Each bucket of 2 test modules would be run in 3 browsers.

Last Updated: 8/14/2020, 12:49:56 PM