'Randomising env for tests in Lambdatest
I'm wondering how can I set up my LambdaTest config so it runs each scenario in a different env. At the moment my setup is Windows - Chrome v88.0 and the config looks like this:
capabilities: [{
alwaysMatch: {
browserName: "Chrome",
build: build,
platform: "Windows 10",
version: "88.0",
resolution: "1680x1050",
console: true,
]},
}
What I want is basically to run
- Scenario 1 on Windows with Chrome v88.0
- Scenario 2 on MacOS with Chrome v91.0
- Scenario 3 on Windows with Chrome v90.0 Etc.
I noticed that various browser versions or the OS that I'm running my app on has a very big impact on the way the app behaves so I need to make sure that I have as many as possible of them covered. I had a look at the documentation and didn't find anything that would allow me to set up my runs this way, anyone has any idea if this is even possible?
Solution 1:[1]
An easy solution would be to create an array of platforms and browser versions which you want to use and iterate through the loop to create multiple sessions if you don't want to have a separate file.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Japneet Singh Chawla |