Continuous Testing and New Tools for 
Automation 
Using Selenium, Sauce Labs, GitHub, and Travis-CI 
**Presentation given at StarWest 2014
How I Spent My Summer Testing 
Continuous Testing on the Beach
What is Continuous Integration? 
“Continuous Integration (CI) is a 
development practice that requires 
developers to integrate code into a shared 
repository several times a day. Each check-in 
is then verified by an automated build, 
allowing teams to detect problems early.” 
http://www.thoughtworks.com/continuous-integration
Continuous Testing and New Tools for Automation - Presentation from StarWest 2014
My Continuous Testing Process 
1. Commit and push 
2. Set up test server and env 
3. Check out the code 
4. Set up the test dependencies 
5. Set up the test databases 
6. Run the tests 
7. (Optionally) deploy code
Using GitHub for my Repo
My Continuous Testing Process 
1. Commit and push
My Super Simple Demo App 
- Borrowed from Armin Ronacher Flaskr tutorial 
- https://github.com/mitsuhiko/flask/tree/master/examples/flaskr/
My Super Simple Demo App
GitHub and the .travis.yml file
Using Travis for my Builds
What is Travis-CI? 
“Travis-CI is a hosted, distributed 
continuous integration service used to 
build and test projects hosted at GitHub. 
Travis-CI automatically detects when a 
commit has been made and will try to 
build the project and run tests.” 
— http://en.wikipedia.org/wiki/Travis_CI
My Continuous Testing Process 
1. Commit and push 
2. Set up test server and env 
3. Check out the code 
4. Set up the test dependencies 
5. Set up the test databases
Simple .travis.yml example 
language: Python 
python: 
- 2.7 
before_script: 
- lots of shell scripting here for setup for 
apache, etc. 
script: 
- flask --app=flaskr run &> flask.log &
Travis checks out the code…
Dependencies and DB Setup 
• Flask configuration and restart 
with document root and port 
• SQLite setup routines create the 
DB and CREATE TABLE 
• “pip install” runs to fetch 
and install various 
dependency packages
Using Selenium for my Tests 
Need help getting started with Selenium? Download the Selenium 
Bootcamp series here!
My Continuous Testing Process 
1. Commit and push 
2. Set up test server and env 
3. Check out the code 
4. Set up the test dependencies 
5. Set up the test databases 
6. Run the tests
My Super Simple Test Case 
1.Go to index page 
2. Click Login link 
3.Select Username text field element 
4.Enter our username 
5.Select Password text field element 
6.Enter our password 
7. Click login button
My Super Simple Test in Python 
1.Go to index page 
2. Click Login menu 
3.Select Username text field element 
4.Enter our username 
5.Select Password text field element 
6.Enter our password 
7. Click login button
A Selenium server can be installed 
and run in the build env via 
.travis.yml
Using Sauce for our Test Runs 
Try Sauce for free, get an account here!
Running Tests on Sauce 
Sauce Connect is what enables the grid to run 
inside the Travis env
Continuous Testing and New Tools for Automation - Presentation from StarWest 2014
Configuring Travis for Sauce 
First, install the Travis gem locally: 
gem install travis 
Next, initialize your project for use with Travis CI: 
travis init 
We need to encrypt our credentials for safe use in GitHub: 
travis encrypt SAUCE_USERNAME=your_sauce_username --add 
travis encrypt SAUCE_ACCESS_KEY=XXXXXXXXXXXXXXXXX --add
.travis.yml example for Sauce Connect 
language: python 
python: 
- 2.7 
env: 
global: 
- secure: HOTmOq6r+fjDDvr7gzETG7rS9IQtZ7QQ= 
- secure: NFM+4hE1VdaGs/lhaiVdn9Vi9P5L8Nb2t= 
addons: 
sauce_connect: true 
before_script: 
- lots of shell scripting here for apache, etc. 
script: 
- flask --app=flaskr run &> flask.log & 
- py.test -n4 --boxed example.py
My Continuous Testing Process 
1. Commit and push 
2. Set up test server and env 
3. Check out the code 
4. Set up the test dependencies 
5. Set up the test databases 
6. Run the tests 
7. (Optionally) deploy code
.travis.yml example for deployment 
language: python 
php: 
- 2.7 
env: 
global: 
- secure: HOTmOq6r+fjDDvr7gzETG7rS9IQtZ7QQ= 
- secure: NFM+4hE1VdaGs/lhaiVdn9Vi9P5L8Nb2t= 
addons: 
sauce_connect: true 
before_script: 
- lots of shell scripting here for apache, etc. 
script: 
- flask --app=flaskr run &> flask.log & 
deploy: 
- your deployment instructions go here
Demo
Q&A

More Related Content

PPTX
Continuous integration testing fundamentals
PDF
Continuous testing
PDF
How To Introduce Cloud Based Load Testing to Your Jenkins Continuous Delivery...
PPTX
Continuous testing webinar 041017 slideshare
PDF
Continuous testing in agile projects 2015
PDF
Continuous Delivery in a Legacy Shop - One Step at a Time
PDF
Testing a Microservices Architecture
PPTX
ApexUnit: Open source test framework for apex
Continuous integration testing fundamentals
Continuous testing
How To Introduce Cloud Based Load Testing to Your Jenkins Continuous Delivery...
Continuous testing webinar 041017 slideshare
Continuous testing in agile projects 2015
Continuous Delivery in a Legacy Shop - One Step at a Time
Testing a Microservices Architecture
ApexUnit: Open source test framework for apex

What's hot (19)

PPT
Continuous Load Testing with CloudTest and Jenkins
PDF
Automated Testing Using Selenium
PDF
No Devops Without Continuous Testing
PDF
Better Security Testing: Using the Cloud and Continuous Delivery
PPTX
Qa in CI/CD
PPTX
Continuous delivery applied
PPTX
Jenkins - From Continuous Integration to Continuous Delivery
PDF
Continuous Delivery Distilled
PDF
OWASP DefectDojo - Open Source Security Sanity
PDF
Automated Visual Regression Testing by Dave Sadlon
PPTX
Tests your pipeline might be missing
PDF
Continuous testing for devops
PPT
Agile Load Testing In The Real World
PPTX
CI/CD Best Practices for Your DevOps Journey
PDF
Continuous Delivery Testing @HiQ
PDF
Continuous Integration, Continuous Quality, Continuous Delivery
PPTX
Test parallelization using Jenkins
PDF
Introduction to CICD
PDF
The Key to DevOps? Testing Early in the Pipeline
Continuous Load Testing with CloudTest and Jenkins
Automated Testing Using Selenium
No Devops Without Continuous Testing
Better Security Testing: Using the Cloud and Continuous Delivery
Qa in CI/CD
Continuous delivery applied
Jenkins - From Continuous Integration to Continuous Delivery
Continuous Delivery Distilled
OWASP DefectDojo - Open Source Security Sanity
Automated Visual Regression Testing by Dave Sadlon
Tests your pipeline might be missing
Continuous testing for devops
Agile Load Testing In The Real World
CI/CD Best Practices for Your DevOps Journey
Continuous Delivery Testing @HiQ
Continuous Integration, Continuous Quality, Continuous Delivery
Test parallelization using Jenkins
Introduction to CICD
The Key to DevOps? Testing Early in the Pipeline
Ad

Viewers also liked (8)

PDF
Selenium and Sauce Labs
PDF
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
PDF
Ci tools Introduce
PDF
Agile tools
PDF
Web UI test automation instruments
PDF
Front-End Testing: Demystified
PDF
Agile & ALM tools
PPTX
Selenium and Appium Training from Sauce Labs
Selenium and Sauce Labs
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Ci tools Introduce
Agile tools
Web UI test automation instruments
Front-End Testing: Demystified
Agile & ALM tools
Selenium and Appium Training from Sauce Labs
Ad

Similar to Continuous Testing and New Tools for Automation - Presentation from StarWest 2014 (20)

PPTX
Effective Testing with Ansible and InSpec
PDF
PVS-Studio in the Clouds: Travis CI
PPTX
Azure DevOps Deployment Group
PDF
Continuous Integration Testing in Django
PDF
Test Kitchen and Infrastructure as Code
PDF
Comment améliorer le quotidien des Développeurs PHP ?
PPTX
Automated Web Testing With Selenium
PPTX
SKILLWISE_SELENIUM
PDF
Aikau testing tech talk live 83 20150204
PDF
we45 DEFCON Workshop - Building AppSec Automation with Python
PDF
Build & deploy PHP application (intro level)
PDF
Let’s start Continuous Integration with jenkins
PPT
Selenium Introduction
PPTX
Continuous Delivery - Automate & Build Better Software with Travis CI
PPT
Integration and Acceptance Testing
PPT
Selenium (1)
PDF
Attacking Pipelines--Security meets Continuous Delivery
PDF
Continuous Testing in the Cloud
PPT
Selenium
PPTX
Compliance Automation with InSpec - Chef NYC Meetup - April 2017
Effective Testing with Ansible and InSpec
PVS-Studio in the Clouds: Travis CI
Azure DevOps Deployment Group
Continuous Integration Testing in Django
Test Kitchen and Infrastructure as Code
Comment améliorer le quotidien des Développeurs PHP ?
Automated Web Testing With Selenium
SKILLWISE_SELENIUM
Aikau testing tech talk live 83 20150204
we45 DEFCON Workshop - Building AppSec Automation with Python
Build & deploy PHP application (intro level)
Let’s start Continuous Integration with jenkins
Selenium Introduction
Continuous Delivery - Automate & Build Better Software with Travis CI
Integration and Acceptance Testing
Selenium (1)
Attacking Pipelines--Security meets Continuous Delivery
Continuous Testing in the Cloud
Selenium
Compliance Automation with InSpec - Chef NYC Meetup - April 2017

More from Sauce Labs (20)

PDF
Simplify Salesforce Testing with AI-Driven Codeless Tools
PDF
Testing on Mobile Devices with Location Services
PDF
Your Framework for Success: introduction to JavaScript Testing at Scale
PDF
Automating Hybrid Applications with Appium
PDF
Quality at Speed: More API Testing, Less UI Testing
PPTX
Creating Digital Confidence with Test Automation
PDF
Just Enough (Automated) Testing
PDF
Using Axe to Add Accessibility Checks to Your Existing Selenium Tests
PDF
How Open Source Helps to Bring Back Product Obsession
PDF
Webinar: A Sneak Peek at Selenium 4 with Simon Stewart
PDF
[Deu] Test Automatisierung Mit Web Driver.io
PDF
Accelerating Innovation: Leveraging Open Source to Optimize Your Shift-Left I...
PDF
Accelerating Your Digital Agenda with Continuous Testing ft. Forrester
PDF
How to Measure Success in Continuous Testing
PDF
From Zero to 2.7 Million - How Verizon Media Embraced Open Source to Accelera...
PDF
5 Steps to Jump Start Your Test Automation
PDF
Sauce Labs Webinar: Rising Importance of Software Testing
PDF
BDD With Selenide by Hima Bindu Peteti
PDF
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
PDF
Continuous Delivery for "Mature" Codebases by Melisa Benua
Simplify Salesforce Testing with AI-Driven Codeless Tools
Testing on Mobile Devices with Location Services
Your Framework for Success: introduction to JavaScript Testing at Scale
Automating Hybrid Applications with Appium
Quality at Speed: More API Testing, Less UI Testing
Creating Digital Confidence with Test Automation
Just Enough (Automated) Testing
Using Axe to Add Accessibility Checks to Your Existing Selenium Tests
How Open Source Helps to Bring Back Product Obsession
Webinar: A Sneak Peek at Selenium 4 with Simon Stewart
[Deu] Test Automatisierung Mit Web Driver.io
Accelerating Innovation: Leveraging Open Source to Optimize Your Shift-Left I...
Accelerating Your Digital Agenda with Continuous Testing ft. Forrester
How to Measure Success in Continuous Testing
From Zero to 2.7 Million - How Verizon Media Embraced Open Source to Accelera...
5 Steps to Jump Start Your Test Automation
Sauce Labs Webinar: Rising Importance of Software Testing
BDD With Selenide by Hima Bindu Peteti
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Continuous Delivery for "Mature" Codebases by Melisa Benua

Recently uploaded (20)

PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PPTX
Internet of Everything -Basic concepts details
PPTX
MuleSoft-Compete-Deck for midddleware integrations
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PDF
4 layer Arch & Reference Arch of IoT.pdf
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PPTX
Microsoft User Copilot Training Slide Deck
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PPTX
Configure Apache Mutual Authentication
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PDF
Advancing precision in air quality forecasting through machine learning integ...
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
Enhancing plagiarism detection using data pre-processing and machine learning...
sustainability-14-14877-v2.pddhzftheheeeee
sbt 2.0: go big (Scala Days 2025 edition)
Internet of Everything -Basic concepts details
MuleSoft-Compete-Deck for midddleware integrations
Early detection and classification of bone marrow changes in lumbar vertebrae...
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
giants, standing on the shoulders of - by Daniel Stenberg
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
4 layer Arch & Reference Arch of IoT.pdf
Custom Battery Pack Design Considerations for Performance and Safety
Microsoft User Copilot Training Slide Deck
Convolutional neural network based encoder-decoder for efficient real-time ob...
Configure Apache Mutual Authentication
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
Advancing precision in air quality forecasting through machine learning integ...

Continuous Testing and New Tools for Automation - Presentation from StarWest 2014

  • 1. Continuous Testing and New Tools for Automation Using Selenium, Sauce Labs, GitHub, and Travis-CI **Presentation given at StarWest 2014
  • 2. How I Spent My Summer Testing Continuous Testing on the Beach
  • 3. What is Continuous Integration? “Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.” http://www.thoughtworks.com/continuous-integration
  • 5. My Continuous Testing Process 1. Commit and push 2. Set up test server and env 3. Check out the code 4. Set up the test dependencies 5. Set up the test databases 6. Run the tests 7. (Optionally) deploy code
  • 7. My Continuous Testing Process 1. Commit and push
  • 8. My Super Simple Demo App - Borrowed from Armin Ronacher Flaskr tutorial - https://github.com/mitsuhiko/flask/tree/master/examples/flaskr/
  • 9. My Super Simple Demo App
  • 10. GitHub and the .travis.yml file
  • 11. Using Travis for my Builds
  • 12. What is Travis-CI? “Travis-CI is a hosted, distributed continuous integration service used to build and test projects hosted at GitHub. Travis-CI automatically detects when a commit has been made and will try to build the project and run tests.” — http://en.wikipedia.org/wiki/Travis_CI
  • 13. My Continuous Testing Process 1. Commit and push 2. Set up test server and env 3. Check out the code 4. Set up the test dependencies 5. Set up the test databases
  • 14. Simple .travis.yml example language: Python python: - 2.7 before_script: - lots of shell scripting here for setup for apache, etc. script: - flask --app=flaskr run &> flask.log &
  • 15. Travis checks out the code…
  • 16. Dependencies and DB Setup • Flask configuration and restart with document root and port • SQLite setup routines create the DB and CREATE TABLE • “pip install” runs to fetch and install various dependency packages
  • 17. Using Selenium for my Tests Need help getting started with Selenium? Download the Selenium Bootcamp series here!
  • 18. My Continuous Testing Process 1. Commit and push 2. Set up test server and env 3. Check out the code 4. Set up the test dependencies 5. Set up the test databases 6. Run the tests
  • 19. My Super Simple Test Case 1.Go to index page 2. Click Login link 3.Select Username text field element 4.Enter our username 5.Select Password text field element 6.Enter our password 7. Click login button
  • 20. My Super Simple Test in Python 1.Go to index page 2. Click Login menu 3.Select Username text field element 4.Enter our username 5.Select Password text field element 6.Enter our password 7. Click login button
  • 21. A Selenium server can be installed and run in the build env via .travis.yml
  • 22. Using Sauce for our Test Runs Try Sauce for free, get an account here!
  • 23. Running Tests on Sauce Sauce Connect is what enables the grid to run inside the Travis env
  • 25. Configuring Travis for Sauce First, install the Travis gem locally: gem install travis Next, initialize your project for use with Travis CI: travis init We need to encrypt our credentials for safe use in GitHub: travis encrypt SAUCE_USERNAME=your_sauce_username --add travis encrypt SAUCE_ACCESS_KEY=XXXXXXXXXXXXXXXXX --add
  • 26. .travis.yml example for Sauce Connect language: python python: - 2.7 env: global: - secure: HOTmOq6r+fjDDvr7gzETG7rS9IQtZ7QQ= - secure: NFM+4hE1VdaGs/lhaiVdn9Vi9P5L8Nb2t= addons: sauce_connect: true before_script: - lots of shell scripting here for apache, etc. script: - flask --app=flaskr run &> flask.log & - py.test -n4 --boxed example.py
  • 27. My Continuous Testing Process 1. Commit and push 2. Set up test server and env 3. Check out the code 4. Set up the test dependencies 5. Set up the test databases 6. Run the tests 7. (Optionally) deploy code
  • 28. .travis.yml example for deployment language: python php: - 2.7 env: global: - secure: HOTmOq6r+fjDDvr7gzETG7rS9IQtZ7QQ= - secure: NFM+4hE1VdaGs/lhaiVdn9Vi9P5L8Nb2t= addons: sauce_connect: true before_script: - lots of shell scripting here for apache, etc. script: - flask --app=flaskr run &> flask.log & deploy: - your deployment instructions go here
  • 29. Demo
  • 30. Q&A

Editor's Notes

  • #2: .
  • #3: .
  • #7: .
  • #12: .
  • #15: Why should customers care about out product? Sell the dream of a better future 1. Deliver a story or statement that arouses the audience’s interest Sauce Labs was founded 4 years ago by Jason Huggins (inventor of Selenium), Steve Hazel and John Dunham, with the goal of making testing awesome.   2. Pose a problem or question that has to be solved or answered Cross browser lab maintenance. How much time and money will it take you to setup and maintain on internal grid   3. Offer a solution to the problem you raised Sauce’s client cloud   4. Describe specific benefits for adopting the course of action set forth in your solution  Time sand money savings 5. State a call to action
  • #18: .
  • #23: .
  • #27: Why should customers care about out product? Sell the dream of a better future 1. Deliver a story or statement that arouses the audience’s interest Sauce Labs was founded 4 years ago by Jason Huggins (inventor of Selenium), Steve Hazel and John Dunham, with the goal of making testing awesome.   2. Pose a problem or question that has to be solved or answered Cross browser lab maintenance. How much time and money will it take you to setup and maintain on internal grid   3. Offer a solution to the problem you raised Sauce’s client cloud   4. Describe specific benefits for adopting the course of action set forth in your solution  Time sand money savings 5. State a call to action
  • #29: Why should customers care about out product? Sell the dream of a better future 1. Deliver a story or statement that arouses the audience’s interest Sauce Labs was founded 4 years ago by Jason Huggins (inventor of Selenium), Steve Hazel and John Dunham, with the goal of making testing awesome.   2. Pose a problem or question that has to be solved or answered Cross browser lab maintenance. How much time and money will it take you to setup and maintain on internal grid   3. Offer a solution to the problem you raised Sauce’s client cloud   4. Describe specific benefits for adopting the course of action set forth in your solution  Time sand money savings 5. State a call to action