19. October 2021
Comment utiliser QF-Test pour exécuter des tests web avec des navigateurs "non supportés" (Brave, Vivaldi, Yandex...)
Luckily, all of the above (and a lot of even smaller browsers) are based on the Chromium engine that is behind Google Chrome.
Because QF-Test understands the CDP protocol for controlling Google Chrome, it can also work with a lot of the browsers above, but we'll need to trick QF-Test a little for it to agree to run those unsupported browsers.
To run any Chromium-based browser, we need to make QF-Test believe it's simply running Chrome. This only takes four edits in our "Start web engine" node:
- We keep "chrome" as our "Browser type" of choice to make QF-Test think what we're doing is business as usual.
- Under "Directory of browser installation", we sneakily insert the path to our Browser, for example "C:\Program Files\BraveSoftware\Brave-Browser\Application" (or "/Applications/Brave.app" on macOS).
- To tell QF-Test how the .exe file of the Browser is called (Certainly not "GoogleChrome.exe"!), add the following to the "Executable parameters" section:
-Dqftest.web.webdriver.browserFileName=brave.exe(Or whatever your browser of choice is called). This is not necessary on macOS.
- To make sure your custom browser does not share any settings or caches with your Google Chrome installation, you should override the profile path with a second parameter:
Of course, you can still use
$(variables) in pretty much any field of the "Start web engine" node. You can easily customize the browser to use and even run the same test suite in a bunch of different browsers using data drivers.
This whole thing was an interesting experiment, but in the end you should keep the following in mind: Because these browsers all use the same Chromium engine under the hood, they will generally perform very similarly. In most cases, you will be fine just sticking to the default "chrome" Browser type for all your Chromium-based-browser-testing needs.
Another clear advantage: If something doesn't work properly during web testing with one of the officially supported browsers, the QF-Test support team at support@ will be happy to help. qfs.de
But there are a lot of other, lesser known browsers that you may want to test with anyway, such as (takes deep breath)