Automated Testing in the Age of Container Clusters
1. MANOJ KUMAR KUMAR SELENIUM COMMITTER DAY, TOKYO !
AUTOMATED TESTING IN THE AGE OF CONTAINER CLUSTER
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. 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. 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. CONTINUOUS DELIVERY
▸ It’s all about continuous delivery
Continuous Integration >
Continuous Testing >
Continuous Delivery
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. TEST AUTOMATION
▸ Browser Automation library
▸ A suite of tools
▸ JavaScript, Java, Python, C#, Ruby
▸ W3C candidate recommendation
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
10. CHALLENGES
▸ Tests start growing
▸ Parallelization (reduces time)
▸ VM’s are heavy and costly to maintain
▸ Agents are costly
Solution……
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
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
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/
25. CAPABILITIES OF ORCHESTRATION TOOLS
Self healing capability
Automatically brings up the containers if for some reasons it goes
down.
and much more….
27. Package Manager for Kubernetes
Use Helm package
$ helm install stable/selenium
KUBERNETES - SELENIUM
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. 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