Moataz Nabil
Software Engineer in Test
Zalando Lounge
Berlin , Germany
09.05.2018
Zalenium
How to run Selenium Scripts
using Docker and Selenium
Grid
AGENDA
Who Am I ?
What is Selenium / Selenium Grid
The Idea
What is Zalenium?
How it works
Demo
Questions
WHO AM I ?
Moataz Nabil
Software Engineer in Test
CSM , MCSD-ALM , ISTQB Certified
@moatazeldebsy
moataznabil.net
OUR PROBLEM
Run large test suites form multiple products as
part of our continues integration process with
a very small number of QA Engineers is very
expensive.
Selenium Family
Selenium
Selenium
IDE
Selenium
WebDriver
Selenium
Grid
Selenium WebDriver
Selenium WebDriver tool is
used to automate web
application testing to verify
that it works as expected.
It supports many browsers
such as Firefox, Chrome, IE,
and Safari.
WebDriver = TaxiDriver :D
Selenium Grid
• Run your tests against different
browsers , operating systems and
machines all at the same time.
(Parallel testing)
• Save time in the execution of your
test suite.
Have you tried to build your
own selenium grid before ?!
The old way
1- Download Selenium standalone Server jar file
2- Invoke the Selenium Grid Hub
• java –jar selenium-server-standalone-3.11.0.jar -role hub
3- Invoke the Node with Firefox
• java –jar selenium-server-standalone-3.11.0.jar -role
webdriver -hub http://localhost:4444/grid/register -port 5556
-browser browserName=firefox
4- Invoke the Node with Chrome
• java –jar selenium-server-standalone-3.11.0.jar -role
webdriver -hub http://localhost:4444/grid/register -port 5566
-browser browserName=chrome
The Selenium Grid is running now >> http://localhost:4444/grid/console
http://localhost:4444/grid/console
Docker
• Secure by default
• Build for scale
• Extensible and flexible
The IDEA (Selenium Grid + Docker)
A selenium grid that scales using
docker-selenium containers...
...and all non supported
capabilities are sent to a cloud
testing provider.
What does Zalenium mean?
Is the result of mixing Zalando and Selenium
What is Zalenium ?
Dynamic, on-demand Selenium Grid to run UI tests with Selenium
Expands during run time
Based on docker-selenium
Simple to setup and run (Get a grid up and running in a few seconds)
Integrate with cloud testing providers
Live Preview and recorded videos with logs after your tests completed
Zalenium also has support for
github.com/zalando/zalenium
zalando.github.io/zalenium/
Run it
One line installer
One line installer and starter for OSX/Linux
(it will check for the latest images and ask for missing dependencies)
Enabling Sauce Labs
(you'll need an account with them)
Selenium Grid With Zalenium
Live Preview
Dashboard
DEMO
When to use
Zalenium ?
• While developing tests locally.
• Run your UI tests in your CI environment for a
PR (Pull Request).
• You have a big server and want a local grid.
• When releasing:
• If Chrome and Firefox are enough, use only
Zalenium.
• Or combine it with a cloud testing provider
for better coverage.
Questions?
Thank you :)

Zalenium - How to run Selenium Script using Docker and Selenium Grid

  • 2.
    Moataz Nabil Software Engineerin Test Zalando Lounge Berlin , Germany 09.05.2018 Zalenium How to run Selenium Scripts using Docker and Selenium Grid
  • 3.
    AGENDA Who Am I? What is Selenium / Selenium Grid The Idea What is Zalenium? How it works Demo Questions
  • 4.
    WHO AM I? Moataz Nabil Software Engineer in Test CSM , MCSD-ALM , ISTQB Certified @moatazeldebsy moataznabil.net
  • 5.
    OUR PROBLEM Run largetest suites form multiple products as part of our continues integration process with a very small number of QA Engineers is very expensive.
  • 6.
  • 7.
    Selenium WebDriver Selenium WebDrivertool is used to automate web application testing to verify that it works as expected. It supports many browsers such as Firefox, Chrome, IE, and Safari. WebDriver = TaxiDriver :D
  • 8.
    Selenium Grid • Runyour tests against different browsers , operating systems and machines all at the same time. (Parallel testing) • Save time in the execution of your test suite.
  • 9.
    Have you triedto build your own selenium grid before ?!
  • 10.
    The old way 1-Download Selenium standalone Server jar file 2- Invoke the Selenium Grid Hub • java –jar selenium-server-standalone-3.11.0.jar -role hub 3- Invoke the Node with Firefox • java –jar selenium-server-standalone-3.11.0.jar -role webdriver -hub http://localhost:4444/grid/register -port 5556 -browser browserName=firefox 4- Invoke the Node with Chrome • java –jar selenium-server-standalone-3.11.0.jar -role webdriver -hub http://localhost:4444/grid/register -port 5566 -browser browserName=chrome The Selenium Grid is running now >> http://localhost:4444/grid/console
  • 11.
  • 12.
    Docker • Secure bydefault • Build for scale • Extensible and flexible
  • 13.
    The IDEA (SeleniumGrid + Docker) A selenium grid that scales using docker-selenium containers... ...and all non supported capabilities are sent to a cloud testing provider.
  • 14.
    What does Zaleniummean? Is the result of mixing Zalando and Selenium
  • 15.
    What is Zalenium? Dynamic, on-demand Selenium Grid to run UI tests with Selenium Expands during run time Based on docker-selenium Simple to setup and run (Get a grid up and running in a few seconds) Integrate with cloud testing providers Live Preview and recorded videos with logs after your tests completed Zalenium also has support for github.com/zalando/zalenium zalando.github.io/zalenium/
  • 17.
  • 18.
    One line installer Oneline installer and starter for OSX/Linux (it will check for the latest images and ask for missing dependencies)
  • 19.
    Enabling Sauce Labs (you'llneed an account with them)
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
    When to use Zalenium? • While developing tests locally. • Run your UI tests in your CI environment for a PR (Pull Request). • You have a big server and want a local grid. • When releasing: • If Chrome and Firefox are enough, use only Zalenium. • Or combine it with a cloud testing provider for better coverage.
  • 25.
  • 26.