Running Multiple Tests (Suites) on Windows

Oxygen also provides the option to run several tests one by one or parallel

First, we need to create a new file called oxygen.conf.js inside our project folder

The file should look like this:

module.exports = {
    
  "iterations": 1,
  "parallel": 1,
    
  "url": "http://localhost:4444/wd/hub",
    
    suites: [{
        name: 'case1',
        cases: [{
            path: "./test-script.js"
        }],
      },
      {
        name: 'case2',
        cases: [{
            path: "./second-test-script.js"
        }],
    }],
    
  "environment": {
    "some_parameter": "foo",
    "another_parameter": "bar"
  },
    
  "capabilities": [
    { 
      "browserName": "chrome"
    }
  ],
    
  "options": {
    "autoReopen": true
  }
    
}

We can config the number of iterations, number of parallel browsers, and add test cases inside suites

And just like running a single test script, let's open the oxygen-cli folder inside node modules,

open cmd and navigate to the following path:

cd C:\Users\YOUR-USER\AppData\Roaming\npm\node_modules\oxygen-cli

Now run the following command: cls && node build\lib\cli

followed by the path to oxygen.conf.js file

cls && node build\lib\cli C:\Desktop\YourProject\oxygen.conf.js

Before running the test, make sure Selenium is running either in oxygen or as a standalone

And that's it, once again a report will be generated inside your project folder

Last updated