Selenium tests with dockers or without

Let say I have some automated tests written in Selenium WebDriver. As far as I know I can use dockerized Firefox browser or even Selenium Grid. But my question is what is an advantage of docker firefox over standart firefox borwser? The same question when it comes to Selenium Grid in docker over standard Selenium Grid without docker.

Can anyone tell me why one is better than another? Or in what cases is better to use docker in Selenium tests?


Some docker advantages:

  • Docker can provide clean and isolated environment for every test.
  • Docker can help to scale your browser consumption (as no need to set up any kind of VM - just install docker anywhere and run more browsers)
  • Docker can help to run multiple versions of one browser in parallel
  • Some disadvantages:

  • You don't see what happens inside, until getting a VNC server in container
  • You need some tool for orchestration to run these containers automatically
  • You need to install docker
  • You can look to some projects helping with selenium and docker:

  • https://github.com/aerokube/selenoid (very fast and scalable tool, ready to use on any kind of environment - local, standalone, has one binary and 2MB docker container)
  • https://github.com/zalando/zalenium (can redirect some rare browsers to external providers)
  • 链接地址: http://www.djcxy.com/p/65342.html

    上一篇: java:comp / env /做什么?

    下一篇: 硒测试与码头或不带