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:
1
module.exports = {
2
3
"iterations": 1,
4
"parallel": 1,
5
6
"url": "http://localhost:4444/wd/hub",
7
8
suites: [{
9
name: 'case1',
10
cases: [{
11
path: "./test-script.js"
12
}],
13
},
14
{
15
name: 'case2',
16
cases: [{
17
path: "./second-test-script.js"
18
}],
19
}],
20
21
"environment": {
22
"some_parameter": "foo",
23
"another_parameter": "bar"
24
},
25
26
"capabilities": [
27
{
28
"browserName": "chrome"
29
}
30
],
31
32
"options": {
33
"autoReopen": true
34
}
35
36
}
Copied!
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:
1
cd C:\Users\YOUR-USER\AppData\Roaming\npm\node_modules\oxygen-cli
Copied!
Now run the following command: cls && node build\lib\cli
followed by the path to oxygen.conf.js file
1
cls && node build\lib\cli C:\Desktop\YourProject\oxygen.conf.js
Copied!
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 modified 1yr ago
Copy link