Demo of how to dockerise and deploy your microservices application to the test environment, how to run selenium tests inside docker and how to put this all together to integrate your tests in your CI/CD pipeline using Jenkins.
Presented at ATA GTR 2016 in Pune.
2. Who Am I?
• Developer, DevOps Enthusiast
• Passion for technology, innovation and the thirst to keep
learning
• Love to code
• Love to design solutions
• Love to network
• Believe in dreaming big
• Believe in work-life balance
@muktaa
3. Agenda
• Where testing stands today, current challenges of
testing
• What is Docker?
• How can docker help in better automation testing?
• A traditional way of doing integration testing
• Demo of using Docker for testing
• Demo of integrating dockerized tests with your CI
@muktaa
5. Docker
@muktaa
Linux
Container Docker Data
Centre,
Docker Cloud,
Docker
Engine,
Docker Hub,
UCP
Benefits:
Speed
Portability
Density
Open
Source
“Can
create
lightweight,
self
sufficient
containers
from
any
application”
6. Docker Applications
• Testing
• Microservices Applications
• Simplifying Development
• Simplifying Deployment
• Production
• CaaS
@muktaa
7. Docker for enabling Testing
• Mimic production environment
• Consistent Environments
• Black Box Testing
• Scalability Testing
• Configuration Testing
• Testing Simplified
@muktaa
8. Deploying for Integration Testing:
Old Way
• Build project
• SCP the build artifact to the
server(s)
• Ssh into the server
• Stop webserver
• Replace the build artifact at the
right path
• Restart webserver
o SCP the tar.gz from the project
to the server(s)
o ssh into the server
o stop tomcat
o remove the “work”, “webapps”,
“shared” and “common” folders
o extract the tar.gz into the
tomcat folder
o start tomcat
@muktaa
9. Integration Testing: Old Way
• Wait for deployment to complete
◦Webserver comes up
• Ensure setup is clean
◦DB Scripts, Env variables, etc
• Get your latest integration test code ready
• Point your integration tests to your newly deployed
setup
• Run integration tests
@muktaa
26. What Next?
• Lots More!
• Running Selenium tests inside Docker
• Using docker swarm to deploy
• Using docker machine to manage hosts for testing
@muktaa