SlideShare a Scribd company logo
1 of 29
Download to read offline
TESTING AS A
CONTAINER
DOCKER WITH AND
SELENIUM & FRIENDS TO
SHIP FAST
Irfan Ahmad
@critickerr
SOON AFTER THIS TALK ….
power lies in packaging
OUTLINE
▸Why? - Challenges
▸What? - Containers
▸How? - Testing in Containers
▸Really? -See Demo
▸Next? - Try Hands On Example
CHALLENGES :
TESTING AND
DELIVERY
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.
MATRIX FROM HELL - SHIP GOODS?
MATRIX FROM HELL - SHIP SOFTWARE?
CONATINERS
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
DOCKER
▸ Docker is an open platform for developers and
sysadmins to build, ship, and run distributed
applications.
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
DOCKER HUB
CONTAINERS VS VM
HOW COMPONENTS FITS TOGETHER
DOCKER LIFECYCLE
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
DOCKERFILE
▸ configuration file with build instructions for
Docker images
DOCKER-COMPOSE
▸ Compose is a tool for defining and running
multi-container Docker applications
DEMO
https://www.youtube.com/watch?v=kXlS69PXX68
PRE-REQUISITES
▸ virtual-box
▸ download docker
toolbox
▸ https://
www.docker.com/
products/docker-
toolbox
VOTING APP : APP UNDER TEST
▸ Simple Real Time voting app
▸ Runs with Docker Compose and multiple
containers in network
VOTING APP : COMPONENTS
Deliver Below Test as Container to Test Voting App Docker
Image
1.API
2.Web
3.Web with Selenium Grid
PROBLEM STATEMENT
TESTING:
IN CONTAINERS,
ON CONTAINERS
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.
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
BEST PRACTICES
▸ Ship Images , not just code
▸ One container one process
▸ Add only Required packages
▸ Group common operations
▸ Use Specific tags with Images
TRY A SIMPLE CI WORKFLOW
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

More Related Content

What's hot

DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and ComposeDockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
Docker, Inc.
 

What's hot (20)

Drone CI
Drone CIDrone CI
Drone CI
 
vodQA(Pune) 2018 - Docker in Testing
vodQA(Pune) 2018 - Docker in TestingvodQA(Pune) 2018 - Docker in Testing
vodQA(Pune) 2018 - Docker in Testing
 
vodQA(Pune) 2018 - Visual testing of web apps in headless environment manis...
vodQA(Pune) 2018 - Visual testing of web apps in headless environment   manis...vodQA(Pune) 2018 - Visual testing of web apps in headless environment   manis...
vodQA(Pune) 2018 - Visual testing of web apps in headless environment manis...
 
CI/CD Pipeline with Docker
CI/CD Pipeline with DockerCI/CD Pipeline with Docker
CI/CD Pipeline with Docker
 
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and ComposeDockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
 
From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...
From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...
From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...
 
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 .Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Developer South Coast 2018: Modernizing .NET Apps with Docker
Developer South Coast 2018: Modernizing .NET Apps with DockerDeveloper South Coast 2018: Modernizing .NET Apps with Docker
Developer South Coast 2018: Modernizing .NET Apps with Docker
 
How To Make A Framework Plugin That Does Not Suck
How To Make A Framework Plugin That Does Not SuckHow To Make A Framework Plugin That Does Not Suck
How To Make A Framework Plugin That Does Not Suck
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
 
Docker в автоматизации тестирования
Docker в автоматизации тестированияDocker в автоматизации тестирования
Docker в автоматизации тестирования
 
Continuous Delivery Pipeline with Docker and Jenkins
Continuous Delivery Pipeline with Docker and JenkinsContinuous Delivery Pipeline with Docker and Jenkins
Continuous Delivery Pipeline with Docker and Jenkins
 
calmio-cicd-containers
calmio-cicd-containerscalmio-cicd-containers
calmio-cicd-containers
 
Javaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with JenkinsJavaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with Jenkins
 
Let’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsLet’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkins
 
QAAgility Presentation - Cucumber with Appium
QAAgility Presentation - Cucumber with AppiumQAAgility Presentation - Cucumber with Appium
QAAgility Presentation - Cucumber with Appium
 
OpenShift: Java EE in the clouds
OpenShift: Java EE in the cloudsOpenShift: Java EE in the clouds
OpenShift: Java EE in the clouds
 
Azure Meetup Stuttgart - Multi-arch Docker images
Azure Meetup Stuttgart - Multi-arch Docker imagesAzure Meetup Stuttgart - Multi-arch Docker images
Azure Meetup Stuttgart - Multi-arch Docker images
 
DevAssistant, Docker and You
DevAssistant, Docker and YouDevAssistant, Docker and You
DevAssistant, Docker and You
 

Similar to Testing as a container

Similar to Testing as a container (20)

Testing AS A Container - Irfan Ahmad
Testing AS A Container - Irfan AhmadTesting AS A Container - Irfan Ahmad
Testing AS A Container - Irfan Ahmad
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline
 
Automated-Testing-inside-containers
Automated-Testing-inside-containersAutomated-Testing-inside-containers
Automated-Testing-inside-containers
 
Docker for dev
Docker for devDocker for dev
Docker for dev
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
 
Docker how to
Docker how toDocker how to
Docker how to
 
Full stack development best practice and toolset
Full stack development best practice and toolsetFull stack development best practice and toolset
Full stack development best practice and toolset
 
Docker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container worldDocker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container world
 
Docker as a Multitool: DevOps with Docker at Azure Bootcamp Linz 2017
Docker as a Multitool: DevOps with Docker at Azure Bootcamp Linz 2017Docker as a Multitool: DevOps with Docker at Azure Bootcamp Linz 2017
Docker as a Multitool: DevOps with Docker at Azure Bootcamp Linz 2017
 
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
 
Containers Intro - Copy.pptx
Containers Intro - Copy.pptxContainers Intro - Copy.pptx
Containers Intro - Copy.pptx
 
A curtain-raiser to the container world Docker & Kubernetes
A curtain-raiser to the container world Docker & KubernetesA curtain-raiser to the container world Docker & Kubernetes
A curtain-raiser to the container world Docker & Kubernetes
 
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
 
МИХАЙЛО ЗЕНІН «Dockerizing environment for mobile test automation. Scaling fr...
МИХАЙЛО ЗЕНІН «Dockerizing environment for mobile test automation. Scaling fr...МИХАЙЛО ЗЕНІН «Dockerizing environment for mobile test automation. Scaling fr...
МИХАЙЛО ЗЕНІН «Dockerizing environment for mobile test automation. Scaling fr...
 
Let's dockerize
Let's dockerizeLet's dockerize
Let's dockerize
 
Docker Basics & Alfresco Content Services
Docker Basics & Alfresco Content ServicesDocker Basics & Alfresco Content Services
Docker Basics & Alfresco Content Services
 
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
 
Docker 101
Docker 101Docker 101
Docker 101
 
Linuxing in London: Docker Intro Workshop
Linuxing in London: Docker Intro WorkshopLinuxing in London: Docker Intro Workshop
Linuxing in London: Docker Intro Workshop
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Testing as a container