Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
MANOJ KUMAR KUMAR SELENIUM COMMITTER DAY, TOKYO !
AUTOMATED TESTING IN THE AGE OF CONTAINER CLUSTER
ABOUT ME
▸ Open source enthusiast
▸ Selenium member
▸ Author assertselenium.com
▸ Organizer seleniumconf.com
▸ Tweets: @ma...
WHAT’S IN FOR TODAY?
▸ Today’s Technological scenario
▸ Test Automation using Selenium
▸ Selenium Grid
▸ Docker Containers...
TODAY’S TECHNOLOGY SCENARIO
▸ Time to Market
▸ Ship It as soon as possible
▸ Cost Optimization
▸ Compete with less cost
▸ ...
CONTINUOUS DELIVERY
▸ It’s all about continuous delivery
Continuous Integration >
Continuous Testing >
Continuous Delivery
CONTINUOUS-INTEGRATION, TESTING, DEPLOYMENT & DELIVERY
Continuous Delivery != Continually delivering software
Continuous D...
TEST AUTOMATION
▸ Browser Automation library
▸ A suite of tools
▸ JavaScript, Java, Python, C#, Ruby
▸ W3C candidate recom...
SELENIUM-GRID
▸Hub
▸The intermediary and the manager
▸Allocates Test Slots to nodes
▸Takes instructions directly from clie...
SELENIUM-GRID
CHALLENGES
▸ Tests start growing
▸ Parallelization (reduces time)
▸ VM’s are heavy and costly to maintain
▸ Agents are cos...
CONTAINERS TO RESCUE
‣ Light-weight
‣ All pre-requisites apps/libs are packaged.
‣ Also for mobile..
Docker Driven Develop...
DOCKER CONTAINERS Vs VM’s
Analogy -
Apartment Villa
▸ Virtual Machine’s
▸ Includes Hardware simulation
▸ Can simulate only few VM’s per server
▸ Slower latency, takes time to...
https://github.com/SeleniumHQ/docker-selenium
Dan Davison Leo Gallucci, Matt smith
DOCKER-SELENIUM
DOCKER-SELENIUM
▸ selenium/hub: Image for running a Selenium Grid Hub
▸ selenium/node-chrome: Selenium node with Chrome in...
DOCKER-SELENIUM
DEMO TIME - SPIN UP SELENIUM GRID VIA DOCKER
DOCKERIZE YOUR TESTS : SHIP YOUR AUTOMATED
TESTS AS A CONTAINER
DOCKERIZE YOUR TESTS
NodeJs Java
docker build -t yourImageName .
DOCKERIZE YOUR TESTS
docker-compose.yml
MOBILES
APPIUM-DOCKER-ANDROID
https://github.com/appium/appium-docker-android
‣ Run tests on real device
‣ Connect to your existin...
DOCKER-ANDROID
https://github.com/butomo1989/docker-android
‣ Run tests in Android emulators
‣ VNC support
‣ Run UI tests ...
ORCHESTRATION
▸ Automated arrangement, coordination, and management of
containers.
▸ Different tools out there…
DOCKER-SEL...
CAPABILITIES OF ORCHESTRATION TOOLS
Self healing capability
Automatically brings up the containers if for some reasons it ...
https://github.com/manoj9788/kubernetes-docker-selenium


Self-healing capability - helps restart the node when it goes do...
Package Manager for Kubernetes
Use Helm package
$ helm install stable/selenium
KUBERNETES - SELENIUM
RECOMMENDED THIRD PARTY TOOLS BASED ON DOCKER-SELENIUM
Zalenium
https://github.com/zalando/zalenium

▸ Disposable and flexi...
Aerokube
Selenoid
‣ ‘Go’ language implementation of Original(official) Selenium-Hub
‣ Docker based
‣ Re-use of containers
G...
http://docker.com
https://github.com/appium/appium-docker-android
https://github.com/seleniumhq/docker-selenium/
https://g...
MANOJ KUMAR KUMAR @MANOJ9788
THANK YOU !
Upcoming SlideShare
Loading in …5
×

Automated-Testing-inside-containers

2,172 views

Published on

Delivered at Tokyo Selenium Meetup at Japan. Sponsored by the Selenium Project.

Published in: Software
  • Hello! Get Your Professional Job-Winning Resume Here - Check our website! https://vk.cc/818RFv
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Automated-Testing-inside-containers

  1. 1. MANOJ KUMAR KUMAR SELENIUM COMMITTER DAY, TOKYO ! AUTOMATED TESTING IN THE AGE OF CONTAINER CLUSTER
  2. 2. ABOUT ME ▸ Open source enthusiast ▸ Selenium member ▸ Author assertselenium.com ▸ Organizer seleniumconf.com ▸ Tweets: @manoj9788 LinkedIn: manojkumar9788 ▸ Lives in Sydney, enjoys BasketBall and Kayaking
  3. 3. WHAT’S IN FOR TODAY? ▸ Today’s Technological scenario ▸ Test Automation using Selenium ▸ Selenium Grid ▸ Docker Containers ▸ Dockerize your functional tests ▸ Orchestration tools for containers ▸ Third party tools
  4. 4. TODAY’S TECHNOLOGY SCENARIO ▸ Time to Market ▸ Ship It as soon as possible ▸ Cost Optimization ▸ Compete with less cost ▸ Paradigm shift ▸ Constantly changing environment, CI, CD, DevOps ▸ Distributed computing ▸ Dockers, Cloud computing
  5. 5. CONTINUOUS DELIVERY ▸ It’s all about continuous delivery Continuous Integration > Continuous Testing > Continuous Delivery
  6. 6. CONTINUOUS-INTEGRATION, TESTING, DEPLOYMENT & DELIVERY Continuous Delivery != Continually delivering software Continuous Delivery == Continuous production readiness Continuous Deployment == Continually delivering software DevOps is Not a Market, but a Tool-Centric Philosophy That Supports a Continuous Delivery Value Chain Thanks to Alister
  7. 7. TEST AUTOMATION ▸ Browser Automation library ▸ A suite of tools ▸ JavaScript, Java, Python, C#, Ruby ▸ W3C candidate recommendation
  8. 8. SELENIUM-GRID ▸Hub ▸The intermediary and the manager ▸Allocates Test Slots to nodes ▸Takes instructions directly from client, and executes them remotely on nodes ▸Node ▸Registers itself to Hub listed in config ▸Communicates its config to the Hub at registration time: ▸Test Slots per browser
 “Hey Hub, I have 1 Slot for Firefox, 5 for Chrome” ▸Receives JSON wire protocol instructions from the Hub DISTRIBUTED TESTING
  9. 9. SELENIUM-GRID
  10. 10. CHALLENGES ▸ Tests start growing ▸ Parallelization (reduces time) ▸ VM’s are heavy and costly to maintain ▸ Agents are costly Solution……
  11. 11. CONTAINERS TO RESCUE ‣ Light-weight ‣ All pre-requisites apps/libs are packaged. ‣ Also for mobile.. Docker Driven Development Unified Infrastructure for Dev and Test
  12. 12. DOCKER CONTAINERS Vs VM’s Analogy - Apartment Villa
  13. 13. ▸ Virtual Machine’s ▸ Includes Hardware simulation ▸ Can simulate only few VM’s per server ▸ Slower latency, takes time to load. ▸ Containers ▸ Based on Linux containers ▸ Lightweight - requires only few MB’s ▸ AUFS- Advanced Multi-Layered Unification File System CONTAINERS VS VM’S
  14. 14. https://github.com/SeleniumHQ/docker-selenium Dan Davison Leo Gallucci, Matt smith DOCKER-SELENIUM
  15. 15. DOCKER-SELENIUM ▸ selenium/hub: Image for running a Selenium Grid Hub ▸ selenium/node-chrome: Selenium node with Chrome installed. ▸ selenium/node-firefox: Selenium node with Firefox installed. ▸ selenium/node-phantomjs: Selenium node with PhantomJS installed ▸ selenium/node-chrome-debug: Selenium node with Chrome installed and runs a VNC server. ▸ selenium/node-firefox-debug: Selenium node with Firefox installed and runs a VNC server. All these images needs to be connected to a Selenium Grid Hub DOCKER-SELENIUM IMAGES - HTTPS://HUB.DOCKER.COM/R/SELENIUM/
  16. 16. DOCKER-SELENIUM
  17. 17. DEMO TIME - SPIN UP SELENIUM GRID VIA DOCKER
  18. 18. DOCKERIZE YOUR TESTS : SHIP YOUR AUTOMATED TESTS AS A CONTAINER
  19. 19. DOCKERIZE YOUR TESTS NodeJs Java docker build -t yourImageName .
  20. 20. DOCKERIZE YOUR TESTS docker-compose.yml
  21. 21. MOBILES
  22. 22. APPIUM-DOCKER-ANDROID https://github.com/appium/appium-docker-android ‣ Run tests on real device ‣ Connect to your existing Selenium Grid instance ‣ CONNECT_TO_GRID=True ‣ APPIUM_HOST=<ip_address_of_appium_server> ‣ APPIUM_PORT=<port_of_appium_server> ‣ SELENIUM_HOST=<ip_address_of_selenium_hub> ‣ SELENIUM_PORT=<port_of_selenium_hub>

  23. 23. DOCKER-ANDROID https://github.com/butomo1989/docker-android ‣ Run tests in Android emulators ‣ VNC support ‣ Run UI tests for Android applications with different frameworks (appium, espresso, robotium) ‣ Connect to your existing Selenium Grid instance

  24. 24. ORCHESTRATION ▸ Automated arrangement, coordination, and management of containers. ▸ Different tools out there… DOCKER-SELENIUM IMAGES
  25. 25. CAPABILITIES OF ORCHESTRATION TOOLS Self healing capability Automatically brings up the containers if for some reasons it goes down. and much more….
  26. 26. https://github.com/manoj9788/kubernetes-docker-selenium 
 Self-healing capability - helps restart the node when it goes down automatically, which helps in test automation.
 
 Scale containers - replicas KUBERNETES - SELENIUM
  27. 27. Package Manager for Kubernetes Use Helm package $ helm install stable/selenium KUBERNETES - SELENIUM
  28. 28. RECOMMENDED THIRD PARTY TOOLS BASED ON DOCKER-SELENIUM Zalenium https://github.com/zalando/zalenium
 ▸ Disposable and flexible docker-based Selenium Grid ▸ Live preview of tests running ▸ live dashboards(offline too) ▸ Integration of Cloud Testing solutions ▸ Run on Kubernetes (Beta!)
  29. 29. Aerokube Selenoid ‣ ‘Go’ language implementation of Original(official) Selenium-Hub ‣ Docker based ‣ Re-use of containers GridRouter ‣ Light-weight server routes requests to multiple hubs ‣ Scalable solution(1000+) RECOMMENDED THIRD PARTY TOOLS BASED ON DOCKER-SELENIUM
  30. 30. http://docker.com https://github.com/appium/appium-docker-android https://github.com/seleniumhq/docker-selenium/ https://github.com/zalando/zalenium https://github.com/aerokube/selenoid https://blog.docker.com/2016/04/cicd-with-docker-cloud/ https://github.com/manoj9788/kubernetes-docker-selenium REFERENCES
  31. 31. MANOJ KUMAR KUMAR @MANOJ9788 THANK YOU !

×