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.
contact@crevise.com
www.crevise.com
Docker in
Continuous Testing
Demo
contact@crevise.com
https://www.crevise.com
@muktaa
Testing in all phases
• Pre-flight testing
• Unit Testing
• Functional ...
contact@crevise.com
https://www.crevise.com
@muktaa
Testing Maturity
• Key differentiator of best devops infrastructures
•...
contact@crevise.com
https://www.crevise.com
@muktaa
Pain Points of Testing
• Unit tests, integration tests, complex integr...
contact@crevise.com
https://www.crevise.com
@muktaa
The Challenge
• Early, Frequent and Accurate Testing requires
access t...
contact@crevise.com
www.crevise.com
@muktaa
Running Integration
Tests
Lets Dockerize The integration Tests too!
contact@crevise.com
https://www.crevise.com
@muktaa
Example of Selenium Tests
• https://github.com/muktaa/SeleniumExample
...
contact@crevise.com
https://www.crevise.com
@muktaa
Demo
• https://github.com/muktaa/SeleniumExample/
blob/master/Dockerfil...
contact@crevise.com
https://www.crevise.com
@muktaa
Sample Output
contact@crevise.com
www.crevise.com
@muktaa
Nightly Build
Putting it All together to Write Nightly Build JOB for
our Docke...
contact@crevise.com
https://www.crevise.com
@muktaa
Jenkins Job
contact@crevise.com
https://www.crevise.com
@muktaa
Job Configuration
contact@crevise.com
https://www.crevise.com
@muktaa
Job Build
Step 1
#/bin/bash +x
docker-compose --project-name=${JOB_NAM...
contact@crevise.com
https://www.crevise.com
@muktaa
Job Build Step 2, 3
docker run -itd -v /var/lib/jenkins/workspace/
doc...
contact@crevise.com
https://www.crevise.com
@muktaa
Job Build Steps 3, 4
contact@crevise.com
https://www.crevise.com
Working Demo
• file:///Users/mukta/Documents/Demo
%20Videos/UsingDockerForTesti...
contact@crevise.com
https://www.crevise.com
@muktaa
What Next?
• Lots More!
• Running Selenium tests with UI inside Docker...
Upcoming SlideShare
Loading in …5
×

Continuous Testing

910 views

Published on

Continuous Testing helps provide process improvements that can prevent future defects from occurring. It plays an important role in providing continuous feedback for your software.

Published in: Technology
  • Be the first to comment

Continuous Testing

  1. 1. contact@crevise.com www.crevise.com Docker in Continuous Testing Demo
  2. 2. contact@crevise.com https://www.crevise.com @muktaa Testing in all phases • Pre-flight testing • Unit Testing • Functional Testing • Integration Testing • Nightly and Weekend Regression Tests Test Early. Test Faster. Test Often. Automate.
  3. 3. contact@crevise.com https://www.crevise.com @muktaa Testing Maturity • Key differentiator of best devops infrastructures • Vital part of devops process • Test orchestration and automation is still a challenge • Verify the changes. Verify them fast. • Test code changes and if they integrate them well • Ensure changes do not blow up the product!
  4. 4. contact@crevise.com https://www.crevise.com @muktaa Pain Points of Testing • Unit tests, integration tests, complex integration tests • UI testing • Git branching • Environments • Failed tests pollute environment • Deployment dependencies, testing dependencies
  5. 5. contact@crevise.com https://www.crevise.com @muktaa The Challenge • Early, Frequent and Accurate Testing requires access to real world testing environments. Service Virtualization in the form of Containerization, specifically using Docker, intends to solve this problem.
  6. 6. contact@crevise.com www.crevise.com @muktaa Running Integration Tests Lets Dockerize The integration Tests too!
  7. 7. contact@crevise.com https://www.crevise.com @muktaa Example of Selenium Tests • https://github.com/muktaa/SeleniumExample • Ready docker image available: • Docker pull selenium-example • Customize the sample tests, refer to README: https://github.com/muktaa/SeleniumExample/ blob/master/README.md • Headless Selenium tests
  8. 8. contact@crevise.com https://www.crevise.com @muktaa Demo • https://github.com/muktaa/SeleniumExample/ blob/master/Dockerfile • Docker pull muktaa/selenium-example:headless • Docker run -it -e TEST_URL=http:// 54.254.223.84:5555/ muktaa/selenium- example:headless
  9. 9. contact@crevise.com https://www.crevise.com @muktaa Sample Output
  10. 10. contact@crevise.com www.crevise.com @muktaa Nightly Build Putting it All together to Write Nightly Build JOB for our Dockerized Integration Tests
  11. 11. contact@crevise.com https://www.crevise.com @muktaa Jenkins Job
  12. 12. contact@crevise.com https://www.crevise.com @muktaa Job Configuration
  13. 13. contact@crevise.com https://www.crevise.com @muktaa Job Build Step 1 #/bin/bash +x docker-compose --project-name=${JOB_NAME} stop &> /dev/null || true &> /dev/null docker-compose --project-name=${JOB_NAME} rm --force &> /dev/null || true &> /dev/ null docker stop `docker ps -a -q -f status=exited` &> /dev/null || true &> /dev/null docker rm -v `docker ps -a -q -f status=exited` &> /dev/null || true &> /dev/null docker rmi `docker images --filter 'dangling=true' -q --no-trunc` &> /dev/null || true &> / dev/null docker-compose build docker-compose --project-name=${JOB_NAME} up &
  14. 14. contact@crevise.com https://www.crevise.com @muktaa Job Build Step 2, 3 docker run -itd -v /var/lib/jenkins/workspace/ docker-example/test-report:/usr/share/app/ target/surefire-reports -e TEST_URL=http:// 54.254.223.84:5555/ muktaa/selenium- example:headless
  15. 15. contact@crevise.com https://www.crevise.com @muktaa Job Build Steps 3, 4
  16. 16. contact@crevise.com https://www.crevise.com Working Demo • file:///Users/mukta/Documents/Demo %20Videos/UsingDockerForTesting-Demo2.swf • file:///Users/mukta/Documents/Demo %20Videos/UsingDockerForTesting-Demo3.swf
  17. 17. contact@crevise.com https://www.crevise.com @muktaa What Next? • Lots More! • Running Selenium tests with UI inside Docker • Using docker swarm to deploy • Using docker machine to manage hosts for testing

×