You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/parallel.md
+56
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,62 @@ By default the tests are assigned one by one to the available workers this may l
32
32
npx codeceptjs run-workers --suites 2
33
33
```
34
34
35
+
## Parallel Execution by Workers on Multiple Browsers
36
+
37
+
To run tests in parallel across multiple browsers, modify your `codecept.conf.js` file to configure multiple browsers on which you want to run your tests and your tests will run across multiple browsers.
38
+
39
+
Start with modifying the `codecept.conf.js` file. Add multiple key inside the config which will be used to configure multiple profiles.
40
+
41
+
```
42
+
exports.config = {
43
+
helpers: {
44
+
WebDriver: {
45
+
url: 'http://localhost:3000',
46
+
desiredCapabilties: {}
47
+
}
48
+
},
49
+
multiple: {
50
+
profile1: {
51
+
browsers: [
52
+
{
53
+
browser: "firefox",
54
+
desiredCapabilties: {
55
+
// override capabilties related to firefox
56
+
}
57
+
},
58
+
{
59
+
browser: "chrome",
60
+
desiredCapabilties: {
61
+
// override capabilties related to chrome
62
+
}
63
+
}
64
+
]
65
+
},
66
+
profile2: {
67
+
browsers: [
68
+
{
69
+
browser: "safari",
70
+
desiredCapabilties: {
71
+
// override capabilties related to safari
72
+
}
73
+
}
74
+
]
75
+
}
76
+
}
77
+
};
78
+
```
79
+
To trigger tests on all the profiles configured, you can use the following command:
80
+
```
81
+
npx codeceptjs run-workers 3 all -c codecept.conf.js
82
+
```
83
+
This will run your tests across all browsers configured from profile1 & profile2 on 3 workers.
84
+
85
+
To trigger tests on specific profile, you can use the following command:
0 commit comments