Selenium tests with Docker and Kubernetes: to infinity and beyond

Docker is a container technology that has become pervasive in current software architecture and infrastructure nowadays. Kubernetes is a container orchestration platform, allowing large numbers of containers to work together. This presentation presents how Docker and Kubernetes can be used to create advance Selenium tests. The use of containers allows using different types of web browsers and Android devices in Docker containers out of the box, allowing to create functional or compatibility (using different devices and/or browsers types and versions) in an effortless manner. The use of a Kubernetes cluster allows to scale up the approach, allowing to a use huge number of browsers to develop performance or load tests with Selenium. All these mechanisms have been implemented in Selenium-Jupiter, a JUnit 5 extension for Selenium which provides seamless integration with Docker and Kubernetes.

Moreover, Selenium-Jupiter can be executed as a Server which speaks the JSON wire protocol/W3C WebDriver, becoming into a Selenium Server. In this case, Selenium-Jupiter acts as a scalable hub (using the Selenium Grid jargon), providing browsers for any kind of Selenium script (Java, JavaScript, Python, etc.) using Docker and Kubernetes internally to allocate the requested browsers types (Chrome, Firefox, Opera, Explorer, Edge, and Android devices) and versions (stable, beta, dev).


Outline/Structure of the Talk

  1. Introduction to Docker and Kubernetes
  2. Reference implementation: Selenium-Jupiter
    1. Using browsers and Android devices in Docker devices
    2. Scaling using Kubernetes
    3. Test templates
    4. Integration with Jenkins
    5. Scalable Selenium Server

Learning Outcome

  • Main features of Docker and Kubernetes
  • How to use Selenium from JUnit 5 for web and mobile testing
  • How Docker can be used to ease functional, compatibility or performance tests
  • How to use Selenium-Jupiter as a scalable Selenium server

Target Audience


schedule Submitted 1 year ago

Public Feedback