Parallel Running Automation Solution with Docker, Jenkins and Zalenium Andrada, Nelly, Emilian
Contents - Why the previous solution is not good enough - The goals we’ve had when starting to think at a new solution - How new solution achieves the goals we’ve set - About Docker - Zalenium - Configuration and Demo - Challenges - Improvements & Feedback
Previous solution - Jenkins installed on one machine and 3 virtual machines installed on a different machine - virtual machine = 1 node - tests where sent in parallel to each node - nr. of nodes = nr. of tests run in parallel Disadvantages: - difficult to set-up - parallelism was created by the number of virtual machines
Goals - parallelize tests and reduce the time needed for testing - reduce hardware resources - quick up & running solution & easy to scale up - allow developers to “jump in” and run tests whenever they need to
New solution - Jenkins and slave nodes as containers - fast start: `docker-compose up` - scale up nodes very easy as necessary `docker-compose up --scale slave=n` - configure slave nodes with multiple executors and send multiple tests to same node in parallel - use Zalenium to open on demand browsers in docker containers
About Docker - a software containerization platform - a container is launched by running an image - a container is an alternative to virtual machine - an image is an executable package that includes everything needed to run an application--the code, a runtime, libraries, environment variables, a particular OS and configuration files - Docker Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services
Containers vs. Virtual Machines
Zalenium vs. Selenium grid Challenges: Setting up selenium grid & maintaining is not very easy: ● Downloading and setting up all the dependencies for each node. ● Manually restarting the nodes in case of issues. ● Maintenance is expensive. ● Scalability issues.
Zalenium - a grid that scales up and down dynamically - opens/close browser containers/nodes (docker-selenium) on demand - requested browser: Chrome/Firefox - requested browser: IE/Safari -> if configured, request to BrowserStack, SauceLabs - records video with the test - allows visual representation with opened containers
Zalenium
Zalenium
Example of Zalenium Configuration
Zalenium Live Preview
Zalenium Report
Configuration & DEMO
Hardware & Software Specs - 4 Cores & 8 G Ram - Linux 4.9.0-8-amd64 SMP Debian - Docker version 17.09.0-ce - Docker-compose version 1.16.1 - Java 1.8 - Jenkins 2.141 (not docker) - Zalenium
Challenges
Why to use - open source app - allow anyone to have a flexible Selenium Grid infrastructure - quick up & running solution - easy to scale up - reduce hardware resources
THANK YOU

Parallel Running Automation Solution with Docker, Jenkins and Zalenium

  • 1.
    Parallel Running AutomationSolution with Docker, Jenkins and Zalenium Andrada, Nelly, Emilian
  • 2.
    Contents - Why theprevious solution is not good enough - The goals we’ve had when starting to think at a new solution - How new solution achieves the goals we’ve set - About Docker - Zalenium - Configuration and Demo - Challenges - Improvements & Feedback
  • 3.
    Previous solution - Jenkinsinstalled on one machine and 3 virtual machines installed on a different machine - virtual machine = 1 node - tests where sent in parallel to each node - nr. of nodes = nr. of tests run in parallel Disadvantages: - difficult to set-up - parallelism was created by the number of virtual machines
  • 4.
    Goals - parallelize testsand reduce the time needed for testing - reduce hardware resources - quick up & running solution & easy to scale up - allow developers to “jump in” and run tests whenever they need to
  • 5.
    New solution - Jenkinsand slave nodes as containers - fast start: `docker-compose up` - scale up nodes very easy as necessary `docker-compose up --scale slave=n` - configure slave nodes with multiple executors and send multiple tests to same node in parallel - use Zalenium to open on demand browsers in docker containers
  • 6.
    About Docker - asoftware containerization platform - a container is launched by running an image - a container is an alternative to virtual machine - an image is an executable package that includes everything needed to run an application--the code, a runtime, libraries, environment variables, a particular OS and configuration files - Docker Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services
  • 7.
  • 9.
    Zalenium vs. Seleniumgrid Challenges: Setting up selenium grid & maintaining is not very easy: ● Downloading and setting up all the dependencies for each node. ● Manually restarting the nodes in case of issues. ● Maintenance is expensive. ● Scalability issues.
  • 10.
    Zalenium - a gridthat scales up and down dynamically - opens/close browser containers/nodes (docker-selenium) on demand - requested browser: Chrome/Firefox - requested browser: IE/Safari -> if configured, request to BrowserStack, SauceLabs - records video with the test - allows visual representation with opened containers
  • 11.
  • 12.
  • 13.
    Example of ZaleniumConfiguration
  • 14.
  • 15.
  • 16.
  • 17.
    Hardware & SoftwareSpecs - 4 Cores & 8 G Ram - Linux 4.9.0-8-amd64 SMP Debian - Docker version 17.09.0-ce - Docker-compose version 1.16.1 - Java 1.8 - Jenkins 2.141 (not docker) - Zalenium
  • 18.
  • 19.
    Why to use -open source app - allow anyone to have a flexible Selenium Grid infrastructure - quick up & running solution - easy to scale up - reduce hardware resources
  • 20.