5. WHY WE FAIL TO TEST?
45%
15% 5%
35%
▸ Slow-down
deployments
▸ Slow test and setup
▸ Ineffective tests
▸ Not needed
▸ * All of these challenges are linked to
infrastructure underlying tests.
9. AN APPLICATION, PLUS ALL ITS
DEPENDENCIES, LIBRARIES AND
OTHER BINARIES, AND
CONFIGURATION FILES NEEDED
TO RUN IT, BUNDLED INTO ONE
PACKAGE.
WHAT ARE CONTAINERS?
AN ENTIRE ISOLATED PORTABLE
RUNTIME ENVIRONMENT
10. DOCKER
▸ Docker is an open platform for developers and
sysadmins to build, ship, and run distributed
applications.
11. INSIDE DOCKER
▸ Docker Image :static snapshot of the containers’
configuration.
▸ Docker Engine: a lightweight runtime and
robust tooling that builds and runs your Docker
containers.
▸ Docker Registry :a repository of images
16. HOW DOCKER WORKS
DOCKER RUN
DOCKER LOOKS
FOR LOCAL
IMAGES
IS IT INSTALLED
DOCKER LOOKS
REGISTRY FOR
IMAGES
NO
IS IT AVAILABLE
DOCKER
DOWNLOADS THE
IMAGE
IMAGE
INSTALLED
LOCALLY
DOCKER
CREATES NEW
CONTAINER AND
STARTS
PROGRAM
CONTAINER IS
RUNNING
YES
25. DOCKERS ANSWERS TO TESTING CHALLENGES
Problem Solution
Automation Dockerfile for setup
Agility &
Reliability
Ship and Share Images
DevOps Infrastructure as Code
Scale Docker Compose
Tools
Diversity
Docker support by and
from vendors.
26. DOCKER - HANDS ON
‣ clone https://github.com/irfanah/teststack
docker-compose up #for starting example-web app
‣ To run any test inside docker containers
‣ rake docker["api"] #for api tests
‣ rake docker["web"] #web tests on headless browse
‣ rake docker["webapp"] #web tests on selenium grid
27. BEST PRACTICES
▸ Ship Images , not just code
▸ One container one process
▸ Add only Required packages
▸ Group common operations
▸ Use Specific tags with Images
29. Q
&
A
THANK
YOU
Open Sourced - For Hands On
Github
https://github.com/irfanah/TestStack
https://github.com/irfanah/example-voting-app
Docker hub
https://hub.docker.com/u/irfanah/
IRFAN AHMAD
Email irfan@critick.io
Web http://critick.io
Twitter @critickerr