You are here

Efficient Selenium Infrastructure with Selenoid

Selenoid is an alternative lightning fast open-source Selenium protocol implementation running browsers and Android emulators inside Docker containers. It is distributed with a set of ready-to-use Docker images corresponding to the majority of popular browser versions, has a one-command installation utility and works slightly more efficiently than traditional Selenium Grid.

This tutorial shows how to build efficient and scalable browser automation infrastructure using Selenoid and related tools. You will be taught why running browsers in containers is so efficient, how to easily install Selenoid and use its powerful features.

Tutorial covers

  • Selenium:
    • 10 mins of theory Brief Selenium history
    • Current WebDriver architecture
    • how Selenoid works and it motivation
  • Selenoid installation for tests development
    • What is required to start Selenoid
    • Manual installation: creating config file, pulling browser images, starting Selenoid Shorter way: fully automated installation via CM tool Selenoid UI installation and features
  • Basic Selenoid features:
    • Custom screen resolution
    • Looking at live browser screen Recording and downloading video
    • Custom test name
    • Updating browsers
  • Selenium clusters theory
    • Why Selenium Grid is not suitable
    • Client-side load balancing
    • Server-side load-balancing
  • How to share state
    • Session ID magic
  • Ggr server
    • How it works
    • Setting up Ggr - Creating users file
    • Creating quota file
    • Starting Ggr
    • Running tests against Ggr
  • Cluster Maintenance
    • Changing available browsers with no downtime
    • Adding users with no downtime
    • How to deal with multiple quota files
    • Proxying to external commercial Selenium services
    • Proxying video, logs, downloaded files
    • Adding more Ggr instances
    • Health checking instances
  • Ggr UI
    • How it works
    • Setting up and linking with Selenoid UI
    • Advanced Selenoid features for big clusters
  • Advanced browsers configuration file fields
    • Volumes
    • Environment variables
    • Tmpfs
    • Hosts entries
    • ShmSize
  • Sending logs to centralized logs storage
    • Why?
    • Centralized logging storages
    • How to configure Selenoid to send logs
  • Sending statistics to centralized metrics storage /status API
    • Configuring Telegraf to upload statistics
    • Creating statistics dashboard with Grafana
  • Sending logs to centralized logs storage (ELK-stack)
    • What is ELK stack
    • Configuring Selenoid to send logs to ELK-stack
    • Searching across logs
  • Building custom browser images
    • What's inside browser image
    • Ready to use browser images
    • How to build custom image
  • Selenoid for Windows browsers
    • How it works without Docker
    • Difference in configuration file
    • How to run multiple isolated sessions under Windows

 

Takeaways:

  • Why Selenium should always be run in Docker containers How to forget about Selenium issues with Selenoid
  • How to efficiently scale Selenium cluster to easily have thousands of browsers running in parallel
  • Where to take ready to use browser images How to use powerful browser tests debugging features in Selenoid