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.
Agile Testing & BDD
Exchange 2015
Dockerizing BDD
Ruby-Cucumber Example
Shashikant Jagtap[@Shashikant86]
Blog : http://sha...
Disclaimer
The opinions expressed
here are my own.
Topics
Docker : Docker ToolBox
Cucumber + Docker Setup
Docker-Compose + Cross-Browser
tests
Creating Docker Images
Benefit...
Docker
Forget VM's. Think of Containers
Docker
Forget VM's. Think of Containers
Run one VM & Multiple Images
inside
Images e.g Ruby, CentOS Or
Cucumber
Docker
Forget VM's. Think of Containers
Run one VM & Multiple Images
inside
e.g Ruby, CentOS Or Cucumber
Run Multiple Ligh...
Docker
Forget VM's. Think of Containers
Run one VM & Multiple Images
inside
e.g Ruby, CentOS Or Cucumber
Run Multiple Ligh...
Docker
Real World Example : House
House = VM [ Docker-machine]
Rooms = Docker -Images
e.g Living Room, BedRoom, Kitchen
Fu...
Docker ToolBox
Get you up & running within
minutes
Visit https://www.docker.com/docker-toolbox
Docker ToolBox
Gets you up & running within
minutes
Visit https://www.docker.com/docker-toolbox
Everything at one place
Do...
Demo
Docker + Cucumber
What we need in order to Run
Cucumber Scenarios
Docker + Cucumber
What we need in order to Run
Cucumber Scenarios
Installations – Ruby, GEM, Bundler
Ports
Other dependenc...
Start with Dockerfile
Dockerfile Commands

FROM

RUN

ADD

EXPOSE

COPY

CMD

ENTYPOINT

ENV

WORKDIR
Docker build, Run, Push &
Pull
Build Image
$ docker build -t my_cucumber .
Run Container
$ docker run -t -i my_cucumber /b...
Demo Docker-BDD
Demo Docker-BDD
GitHub:
https://github.com/Shashikant86/docker-bdd
DockerHub:
https://hub.docker.com/r/shashikant86/docker...
Cucumber Cross-browser
Again .. Start with Dockerfile
Example:
https://github.com/Shashikant86/docker-cucumber-crossbrowse...
Cucumber Cross-browser
Introduce Docker-Compose
Cucumber Cross-browser
Introduce Docker-Compose
The way of managing multiple
containers
Create 'docker-compose.yml'
Docker-compose.yml
Setup Cloud Testing
Saucelabs
Browserstack
Testingbot
Docker-Compose up
Run all container from config file
$ docker-compose up
Run Specific container
$ docker-compose up phanto...
Cucumber-Compose Demo
Manage from Kitematics
Manage containers from Kitematics
Start container to run tests with
browser
Kitematics Demo
Benefits
Painless Setup
One Click/Command Cross-Browser
Scenario Execution
Can be added as Jenkins Slaves ?
Create and Des...
Links
GitHub
https://github.com/Shashikant86/docker-cucumber-crossbrowser
https://github.com/Shashikant86/docker-bdd
Youtu...
Thanks
Special Thanks to “Docker-
Selenium”
Upcoming SlideShare
Loading in …5
×

Dockerizing BDD : Ruby-Cucumber Example

2,084 views

Published on

Talk at Agile Testing and BDD Exchange 2015
https://skillsmatter.com/conferences/6763-agile-testing-bdd-exchange-2015#program

Published in: Software
  • Be the first to comment

Dockerizing BDD : Ruby-Cucumber Example

  1. 1. Agile Testing & BDD Exchange 2015 Dockerizing BDD Ruby-Cucumber Example Shashikant Jagtap[@Shashikant86] Blog : http://shashikantjagtap.net
  2. 2. Disclaimer The opinions expressed here are my own.
  3. 3. Topics Docker : Docker ToolBox Cucumber + Docker Setup Docker-Compose + Cross-Browser tests Creating Docker Images Benefits of Docker Containers Demo
  4. 4. Docker Forget VM's. Think of Containers
  5. 5. Docker Forget VM's. Think of Containers Run one VM & Multiple Images inside Images e.g Ruby, CentOS Or Cucumber
  6. 6. Docker Forget VM's. Think of Containers Run one VM & Multiple Images inside e.g Ruby, CentOS Or Cucumber Run Multiple Lightweight Containers on top of Images e.g Container for each browser
  7. 7. Docker Forget VM's. Think of Containers Run one VM & Multiple Images inside e.g Ruby, CentOS Or Cucumber Run Multiple Lightweight Containers on top of Images e.g Container for each browser More ? Http://www.docker.com
  8. 8. Docker Real World Example : House House = VM [ Docker-machine] Rooms = Docker -Images e.g Living Room, BedRoom, Kitchen Furniture = Docker Containers e.g Living Room image has Sofa container, TV Stand Container
  9. 9. Docker ToolBox Get you up & running within minutes Visit https://www.docker.com/docker-toolbox
  10. 10. Docker ToolBox Gets you up & running within minutes Visit https://www.docker.com/docker-toolbox Everything at one place Docker-Machine Docker-Client Docker-Compose Docker-Kitematic
  11. 11. Demo
  12. 12. Docker + Cucumber What we need in order to Run Cucumber Scenarios
  13. 13. Docker + Cucumber What we need in order to Run Cucumber Scenarios Installations – Ruby, GEM, Bundler Ports Other dependencies e.g PhantomJS Put everything in Dockerfile
  14. 14. Start with Dockerfile
  15. 15. Dockerfile Commands  FROM  RUN  ADD  EXPOSE  COPY  CMD  ENTYPOINT  ENV  WORKDIR
  16. 16. Docker build, Run, Push & Pull Build Image $ docker build -t my_cucumber . Run Container $ docker run -t -i my_cucumber /bin/bash Push Image $ docker push username/my_cucumber Pull Image $ docker pull username/my_cucumber
  17. 17. Demo Docker-BDD
  18. 18. Demo Docker-BDD GitHub: https://github.com/Shashikant86/docker-bdd DockerHub: https://hub.docker.com/r/shashikant86/docker-bdd/
  19. 19. Cucumber Cross-browser Again .. Start with Dockerfile Example: https://github.com/Shashikant86/docker-cucumber-crossbrowser/
  20. 20. Cucumber Cross-browser Introduce Docker-Compose
  21. 21. Cucumber Cross-browser Introduce Docker-Compose The way of managing multiple containers Create 'docker-compose.yml'
  22. 22. Docker-compose.yml
  23. 23. Setup Cloud Testing Saucelabs Browserstack Testingbot
  24. 24. Docker-Compose up Run all container from config file $ docker-compose up Run Specific container $ docker-compose up phantomjs
  25. 25. Cucumber-Compose Demo
  26. 26. Manage from Kitematics Manage containers from Kitematics Start container to run tests with browser
  27. 27. Kitematics Demo
  28. 28. Benefits Painless Setup One Click/Command Cross-Browser Scenario Execution Can be added as Jenkins Slaves ? Create and Destroy containers as needed Can be setup as per project needs
  29. 29. Links GitHub https://github.com/Shashikant86/docker-cucumber-crossbrowser https://github.com/Shashikant86/docker-bdd Youtube: https://www.youtube.com/watch?v=dZTqO2j1XUo https://www.youtube.com/watch?v=ZTRypQCoJOE https://www.youtube.com/watch?v=9WP6dXiKPAE https://www.youtube.com/watch?v=oI4B0xV_z7Q
  30. 30. Thanks Special Thanks to “Docker- Selenium”

×