Skip to main content

Farm configuration

Our currently preferred farm setup is using the open-source project Selenoid.

We have added a couple of additional components that act as proxies when testing other endpoints than websites. Those are reusing the concept of Capabilities. A Capability is a specific environment / version of the client host application used to access the remote system under test. Traditionally this is a browser but in our case it can be a REST client, SQL client, etc.

Capabilities configuration

Capabilities available on the farm are listed in the configuration file config/browsers.json. Updating capabilities requires usually pulling new versions of images using the docker pull command and specifying the image to pull. After that it is also required to restart the selenoid component which can be done as docker restart selenoid.

Example browsers.json:

{
"<capability name>": {
"default": "latest",
"versions": {
"<version>": {
"image": "<full dockerhub image path>",
"port": "4444"
}
}
},
"firefox": {
"default": "latest",
"versions": {
"87.0": {
"image": "selenoid/vnc:firefox_87.0",
"port": "4444"
}
}
},
"private-image": {
"default": "latest",
"versions": {
"latest": {
"image": "private-repo.azurecr.io/private/driver:latest",
"port": "4444"
}
}
}
}

This was just an example. Selenoid has a rather complete documentation se we advise to further dig into the links provided below.

Per-test capabilities configuration

While some capabilities can be configured on the test farm and then referenced only from tests, some of them can be overridden by each session when started from a test.

The most important of such capabilities is the session timeout. By default, the timeout is 60s. For cases when longer responses from systems under tests are expected, it is key to increase the timeout sufficiently.

@Capability(key = "sessionTimeout", value = "600s")

Those features all come from Selenoid. To see examples hot to use those capabilities in the code, please have a look in the Test configuration

Further reading