SlideShare a Scribd company logo
1 of 26
Download to read offline
Automated Testing
About Promet

Mission Statement: “Promet Solutions specializes in
developing innovative, complex web applications with open
source technology.”

30+ solutions architects      10 year in business
                                 th

worldwide
                              32 open source contributions
  • Offices in the US
     • Chicago                10+ mobile apps in the past 12 months
     • San Jose
ABOUT JOHNNIE:


                 •   Presenter
                     •   Johnnie Fox
                     •   @johnniefox
                 •   Promet Source
                     •   Director of Development
                     •   Scrum Master
                     •   Project Manager
                     •   Recovering Developer
                     •   @prometsource
ABOUT CHRIS


                          •   Presenter
Insert picture of Chris
                              •   Chris Calip

                          •   Promet Source
                              •   Application Developer
                              •   @prometsource
HISTORY OF DRUPAL TESTING

 Drupal Testing:
 D6 core – Simpletest
 Application specific testing
 - Manual Tests
 - Written test cases – Word documents
 - The spreadsheet of pain. (Checklist)

Challenges -
     Testing different browsers
     Reproducible results
     Providing a record
     Doesn’t test integration with 3rd party API (backend functionality)
CONTINUOUS INTEGRATION:

Continuous Integration (CI) implements continuous processes of applying
quality control — small pieces of effort, applied frequently. Continuous
integration aims to improve the quality of software, and to reduce the time
taken to deliver it, by replacing the traditional practice of applying quality control
after completing all development.


Continuous Integration emerged in the Extreme Programming (XP) community,
and XP advocates Martin Fowler and Kent Beck first wrote about continuous
integration circa 1999.




                                                         Continuous integration - Wikipedia, the free
                                                         encyclopedia : taken from -
                                                         http://en.wikipedia.org/wiki/Continuous_integrationhttp
                                                         ://creativecommons.org/licenses/by-sa/3.0/
HACKATHON TEAM :

    Five. Striving as one. Driven by a passion for continuous automated quality control.




   Ruoran Wang
   Scott Massey
   Chris Calip
   Johnnie Fox
   Michelle Krejci
HACKATHON OBJECTIVE:

Develop, deploy, demonstrate, and identify challenges of
making using ci infrastructure to implement acceptance
tests (unit tests, selenium) on one existing site.
TECHNICAL DETAILS

                              code metrics

                            phpqatools.org

                            user acceptance

 provisions servers with
 testing components




admin gui to trigger test
suites, or view reports
Necessary components


• For necessary components and installation instructions,
  go to:
• Phing Drupal Template
• http://reload.github.com/phing-drupal-template/
• Jenkins Drupal Template
• http://reload.github.com/jenkins-drupal-template
• Phing Drupal Template with User Acceptance Test
• http://github.com/promet/phing-drupal-template
• In addition for phing-drupal-template with user acceptance
  test, you need to install additional pear libraries
  • For more instructions, http://phpqatools.org/
Installing Infrastructure

Initial assumption: your server has several initial software
already

1. Go to https://github.com/promet/phing-drupal-template
2. Three files that you need to use to install infrastructure
3. Put in on your site Drupal root
4. If you want to override it, build.properties
5. Customize variables
EXAMPLE TEST SUITE FOR SITE SUPPORT
Jenkins:
Scheduled 1AM User                     Jenkins: Clone
  Acceptance Test                Production to Test                                PHING: PHPUnit
                                                                              Configuration Load



                                 Jenkins & PHING: User          With Bootstrap and
  PHING: Selenium
                                Acceptance PHPUnit +            what Bootstrap file           Without
   Config Upload                      Selenium                    (ability to use            Bootstrap
                                                                   Drupal API)



PHING: Autodiscover
                                      PHING: Report
                                                                          PHING: Autodiscover
 the Selenium test                    Generated                             the PHPUnit test



                                                                        PHING: Trigger
                                                                                     each
                        Jenkins: If
                               errors
  PHING: Trigger each   found, notify                                    PHPUnit Test and
  Selenium test and     stakeholders                                      generate report
   generate report
                                                         Done
What is Selenium?


 •Selenium automates browsers. That's it. What you do with that power
  is entirely up to you. Primarily it is for automating web applications for
  testing purposes, but is certainly not limited to just that. Boring web-
  based administration tasks can (and should!) also be automated as
  well.
 •Selenium has the support of some of the largest browser vendors who
  have taken (or are taking) steps to make Selenium a native part of
  their browser. It is also the core technology in countless other browser
  automation tools, APIs and frameworks.
• Goes through every page
   • Makes sure header, footer, logos, etc
   • All branding elements in place
Functional Test PHPUnit


• Project Airbox
   • Checkout process that involves passing customer information to third party
     banking API, passes back customer ID
   • Months after completion, API changes broke the application
       • PHPUnit figures out how and where the problem is
       • More importantly, is there a problem?
• Major time saver for detective work
• -- bootstrap option to make use of forked upal without SUT
• https://github.com/chriscalip/upal
• http://drupal.org/node/1567500
• actually installs a complete Drupal site like the regular Drupal installer for every test
 being executed, using a random database prefix and some logic baked into Drupal's
 (regular runtime) core that re-routes all HTTP requests originating from WebTestBase
 into the "child site under test" (the db-prefixed one). Based on that, every test is able
 to specify additional modules to install into that child site, in order to test various
EXAMPLE TEST SUITE FOR DEVELOPMENT SITES

                   Guiding principle: Fast Iteration
Traditional Dev Staging Production and Workflow




           Manual             Manual             Manual

   Local                Dev            Staging            Production




            Lots of commits      Significant
                                 Event (Less
                                 Frequent)
Dev Staging Production Work Flow
with Automated Continuous
Integration Tests

                       Manual                                          Manual
        Manual
                                 Test
Local            Dev                                     Staging                 Production
                                Branch

                                                                 Automatic
                                                                 push if
                                Run Test                         passes
                                 Suite
                                           Jenkins: Clone   Staging DB to test
                                           DB

                                           Jenkins: Run   code-metrics test


                                           Jenkins:   Run user acceptance test


                                           Jenkins:
                                                  Run Drupal Core and
                                           Contribution Simple test
Manual Test


Jenkins: Clone Staging DB to test DB (5 mins)


Jenkins: Run code-metrics test (10-15 mins)


Jenkins: Run user acceptance test (10-15 mins)


Jenkins: Run Drupal Core and Contribution Simple test (Needs work)


Jenkins: RUN ALL (35 mins)
All those test eats up server resources ...


   .
Drupal
                                     ANATOMY OF USER ACCEPTANCE
                  Sites              TEST
                                                                        build.properties
                                                                        project.code.custom =
                                      All                               bathroom conference_room


                                                          Modules


# Chosen File Pattern by project for phpunit ie.. ExampleUnitTest.php bathroom
SampleUnitTest.php                                                          bathroomUnitTest.php
project.phpunit.filepattern = UnitTest.php                                  bathroomSeleniumTest.ph
                                                                                        p
# Selenium                                                            conference room
# Chosen File Pattern by project for selenium ie..
                                                                           conferenceroomUnitTest.ph
ExampleSeleniumTest.php SampleSeleniumTest.php                                         p
project.selenium.filepattern = SeleniumTest.php                         conferenceroomSeleniumTest.
                                                                                    php

                                                                       Kitchen (Contrib)
Example Jenkins Dashboard
Example of Code Metric Test
PHP Mess Detector
EXAMPLE OF PHPUNIT REPORT
GIT POST HOOK TRIGGERING THE TEST SUITE.
http://demosource.prometdev.com/blog


Dev writes the code & test             Client updates database
                                       • Finding a block with Selenium


                             • Dev pushes code
Questions?
www.prometsource.com

       chriscalip@prometsource.com
        johnnie@prometsource.com
            Twitter: @prometsource

More Related Content

What's hot

Making the case for Play Framework and Scala- Budapest Ping-Conf (2014)
Making the case for Play Framework and Scala- Budapest Ping-Conf (2014)Making the case for Play Framework and Scala- Budapest Ping-Conf (2014)
Making the case for Play Framework and Scala- Budapest Ping-Conf (2014)
ajevans
 
BADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best PracticesBADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best Practices
meghsweet
 

What's hot (20)

How can you improve, harmonize and automate your development process using to...
How can you improve, harmonize and automate your development process using to...How can you improve, harmonize and automate your development process using to...
How can you improve, harmonize and automate your development process using to...
 
DevOps Game at SGZA
DevOps Game at SGZADevOps Game at SGZA
DevOps Game at SGZA
 
Making the case for Play Framework and Scala- Budapest Ping-Conf (2014)
Making the case for Play Framework and Scala- Budapest Ping-Conf (2014)Making the case for Play Framework and Scala- Budapest Ping-Conf (2014)
Making the case for Play Framework and Scala- Budapest Ping-Conf (2014)
 
Measuring Web Performance - HighEdWeb Edition
Measuring Web Performance - HighEdWeb EditionMeasuring Web Performance - HighEdWeb Edition
Measuring Web Performance - HighEdWeb Edition
 
Standardizing WordPress Workflow
Standardizing WordPress WorkflowStandardizing WordPress Workflow
Standardizing WordPress Workflow
 
Seven Jobs You Should Be Running #sqlsat126
Seven Jobs You Should Be Running #sqlsat126Seven Jobs You Should Be Running #sqlsat126
Seven Jobs You Should Be Running #sqlsat126
 
Community building lessons from Ansible
Community building lessons from AnsibleCommunity building lessons from Ansible
Community building lessons from Ansible
 
Bring Down the Wall of Confusion with Chocolate, LEGO and Scrum Simulation Game
Bring Down the Wall of Confusion with Chocolate, LEGO and Scrum Simulation GameBring Down the Wall of Confusion with Chocolate, LEGO and Scrum Simulation Game
Bring Down the Wall of Confusion with Chocolate, LEGO and Scrum Simulation Game
 
AATC - Gamifying DevOps with Lego and Chocolate Game
AATC - Gamifying DevOps with Lego and Chocolate GameAATC - Gamifying DevOps with Lego and Chocolate Game
AATC - Gamifying DevOps with Lego and Chocolate Game
 
Front End page speed performance improvements for Drupal
Front End page speed performance improvements for DrupalFront End page speed performance improvements for Drupal
Front End page speed performance improvements for Drupal
 
Are You Really Using Kanban?
Are You Really Using Kanban?Are You Really Using Kanban?
Are You Really Using Kanban?
 
Untangling spring week1
Untangling spring week1Untangling spring week1
Untangling spring week1
 
Optimizing Your WordPress Site: Why speed matters, and how to get there
Optimizing Your WordPress Site: Why speed matters, and how to get thereOptimizing Your WordPress Site: Why speed matters, and how to get there
Optimizing Your WordPress Site: Why speed matters, and how to get there
 
The Seven DevOps Sins
The Seven DevOps SinsThe Seven DevOps Sins
The Seven DevOps Sins
 
Bootstrap + Drupal Commerce in less than 45 minutes!
Bootstrap + Drupal Commerce in less than 45 minutes!Bootstrap + Drupal Commerce in less than 45 minutes!
Bootstrap + Drupal Commerce in less than 45 minutes!
 
My Contributor Story
My Contributor StoryMy Contributor Story
My Contributor Story
 
Why I've Not bothered With Drupal 8
Why I've Not bothered With Drupal 8Why I've Not bothered With Drupal 8
Why I've Not bothered With Drupal 8
 
wp cli- don’t fear the command line
wp cli- don’t fear the command linewp cli- don’t fear the command line
wp cli- don’t fear the command line
 
BADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best PracticesBADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best Practices
 
BADCamp 2012- Drupal Support
BADCamp 2012- Drupal SupportBADCamp 2012- Drupal Support
BADCamp 2012- Drupal Support
 

Similar to Automated testing DrupalCamp in Asheville

Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSAutomated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Bamdad Dashtban
 
Our DevOps Journey: 6 Month Waterfalls to 1 Hour Code Deploys
Our DevOps Journey: 6 Month Waterfalls to 1 Hour Code DeploysOur DevOps Journey: 6 Month Waterfalls to 1 Hour Code Deploys
Our DevOps Journey: 6 Month Waterfalls to 1 Hour Code Deploys
Dynatrace
 
From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]
Dynatrace
 

Similar to Automated testing DrupalCamp in Asheville (20)

Enabling Agile Testing Through Continuous Integration Agile2009
Enabling Agile Testing Through Continuous Integration Agile2009Enabling Agile Testing Through Continuous Integration Agile2009
Enabling Agile Testing Through Continuous Integration Agile2009
 
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile wayContinuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
 
Adrian marinica continuous integration in the visual studio world
Adrian marinica   continuous integration in the visual studio worldAdrian marinica   continuous integration in the visual studio world
Adrian marinica continuous integration in the visual studio world
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
 
Test automation proposal
Test automation proposalTest automation proposal
Test automation proposal
 
Agile Open Source Performance Test Workshop for Developers, Testers, IT Ops
Agile Open Source Performance Test Workshop for Developers, Testers, IT OpsAgile Open Source Performance Test Workshop for Developers, Testers, IT Ops
Agile Open Source Performance Test Workshop for Developers, Testers, IT Ops
 
Drupal & Continous Integration - SF State Study Case
Drupal & Continous Integration - SF State Study CaseDrupal & Continous Integration - SF State Study Case
Drupal & Continous Integration - SF State Study Case
 
How To Use Jenkins for Continuous Load and Mobile Testing with SOASTA & Cloud...
How To Use Jenkins for Continuous Load and Mobile Testing with SOASTA & Cloud...How To Use Jenkins for Continuous Load and Mobile Testing with SOASTA & Cloud...
How To Use Jenkins for Continuous Load and Mobile Testing with SOASTA & Cloud...
 
How To Use Jenkins for Continuous Load and Mobile Testing with SOASTA & Cloud...
How To Use Jenkins for Continuous Load and Mobile Testing with SOASTA & Cloud...How To Use Jenkins for Continuous Load and Mobile Testing with SOASTA & Cloud...
How To Use Jenkins for Continuous Load and Mobile Testing with SOASTA & Cloud...
 
Testing In Java
Testing In JavaTesting In Java
Testing In Java
 
XebiaLabs, CloudBees, Puppet Labs Webinar Slides - IT Automation for the Mode...
XebiaLabs, CloudBees, Puppet Labs Webinar Slides - IT Automation for the Mode...XebiaLabs, CloudBees, Puppet Labs Webinar Slides - IT Automation for the Mode...
XebiaLabs, CloudBees, Puppet Labs Webinar Slides - IT Automation for the Mode...
 
Continous integration and delivery for single page applications
Continous integration and delivery for single page applicationsContinous integration and delivery for single page applications
Continous integration and delivery for single page applications
 
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
 
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSAutomated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
 
Our DevOps Journey: 6 Month Waterfalls to 1 Hour Code Deploys
Our DevOps Journey: 6 Month Waterfalls to 1 Hour Code DeploysOur DevOps Journey: 6 Month Waterfalls to 1 Hour Code Deploys
Our DevOps Journey: 6 Month Waterfalls to 1 Hour Code Deploys
 
From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]
 
Continuous Delivery - Voxxed Days Cluj-Napoca 2017
Continuous Delivery - Voxxed Days Cluj-Napoca 2017Continuous Delivery - Voxxed Days Cluj-Napoca 2017
Continuous Delivery - Voxxed Days Cluj-Napoca 2017
 
Continuous Delivery Applied
Continuous Delivery AppliedContinuous Delivery Applied
Continuous Delivery Applied
 
Continuous Delivery Applied (Agile Richmond)
Continuous Delivery Applied (Agile Richmond)Continuous Delivery Applied (Agile Richmond)
Continuous Delivery Applied (Agile Richmond)
 
Continuous Delivery Applied
Continuous Delivery AppliedContinuous Delivery Applied
Continuous Delivery Applied
 

More from Promet Source

Higher Ed Web 2013 presentation - Field of Dreams, build it and they will come
Higher Ed Web 2013 presentation - Field of Dreams, build it and they will comeHigher Ed Web 2013 presentation - Field of Dreams, build it and they will come
Higher Ed Web 2013 presentation - Field of Dreams, build it and they will come
Promet Source
 
Open Source Software: An Edge For Your Growing Business
Open Source Software: An Edge For Your Growing BusinessOpen Source Software: An Edge For Your Growing Business
Open Source Software: An Edge For Your Growing Business
Promet Source
 

More from Promet Source (20)

How To Start Building Your Own Website With Drupal by Mary Chris Casis
How To Start Building Your Own Website With Drupal by Mary Chris CasisHow To Start Building Your Own Website With Drupal by Mary Chris Casis
How To Start Building Your Own Website With Drupal by Mary Chris Casis
 
DrupalCamp Cebu 2018 R&F by Andrew Kucharski
DrupalCamp Cebu 2018 R&F by Andrew KucharskiDrupalCamp Cebu 2018 R&F by Andrew Kucharski
DrupalCamp Cebu 2018 R&F by Andrew Kucharski
 
Unit test in drupal 8 by Pratomo Ardianto Drupalcamp Cebu 2018
Unit test in drupal 8 by Pratomo Ardianto Drupalcamp Cebu 2018Unit test in drupal 8 by Pratomo Ardianto Drupalcamp Cebu 2018
Unit test in drupal 8 by Pratomo Ardianto Drupalcamp Cebu 2018
 
Migrating to-Drupal-8 by Bryan Manalo
Migrating to-Drupal-8 by Bryan ManaloMigrating to-Drupal-8 by Bryan Manalo
Migrating to-Drupal-8 by Bryan Manalo
 
Why and When to use Drupal by Luc Bezier - Drupalcamp Cebu 2018
Why and When to use Drupal by Luc Bezier - Drupalcamp Cebu 2018Why and When to use Drupal by Luc Bezier - Drupalcamp Cebu 2018
Why and When to use Drupal by Luc Bezier - Drupalcamp Cebu 2018
 
Drupal Development with Docker
Drupal Development with DockerDrupal Development with Docker
Drupal Development with Docker
 
Migrating Drupal 7 to Drupal 8
Migrating Drupal 7 to Drupal 8Migrating Drupal 7 to Drupal 8
Migrating Drupal 7 to Drupal 8
 
Web Accessibility in Drupal
Web Accessibility in DrupalWeb Accessibility in Drupal
Web Accessibility in Drupal
 
Drupal Continuous Integration and devops - Beyond Jenkins
Drupal Continuous Integration and devops - Beyond JenkinsDrupal Continuous Integration and devops - Beyond Jenkins
Drupal Continuous Integration and devops - Beyond Jenkins
 
Drupal 8 Involvement with Promet Source
Drupal 8 Involvement with Promet SourceDrupal 8 Involvement with Promet Source
Drupal 8 Involvement with Promet Source
 
Using Commerce License for Premium Content on Drupal Sites
Using Commerce License for Premium Content on Drupal SitesUsing Commerce License for Premium Content on Drupal Sites
Using Commerce License for Premium Content on Drupal Sites
 
Behavioral driven development with Behat
Behavioral driven development with BehatBehavioral driven development with Behat
Behavioral driven development with Behat
 
Composer tools and frameworks for Drupal
Composer tools and frameworks for DrupalComposer tools and frameworks for Drupal
Composer tools and frameworks for Drupal
 
Responsive Design Testing the Promet Way
Responsive Design Testing the Promet WayResponsive Design Testing the Promet Way
Responsive Design Testing the Promet Way
 
Optimize and succeed your next Fixed Budget Project planning process
Optimize and succeed your next Fixed Budget Project planning process Optimize and succeed your next Fixed Budget Project planning process
Optimize and succeed your next Fixed Budget Project planning process
 
Diy continuous integration
Diy continuous integrationDiy continuous integration
Diy continuous integration
 
Higher Ed Web 2013 presentation - Field of Dreams, build it and they will come
Higher Ed Web 2013 presentation - Field of Dreams, build it and they will comeHigher Ed Web 2013 presentation - Field of Dreams, build it and they will come
Higher Ed Web 2013 presentation - Field of Dreams, build it and they will come
 
Project Estimation Presentation - Donte's 8th level of estimating level of ef...
Project Estimation Presentation - Donte's 8th level of estimating level of ef...Project Estimation Presentation - Donte's 8th level of estimating level of ef...
Project Estimation Presentation - Donte's 8th level of estimating level of ef...
 
Open Source Software: An Edge For Your Growing Business
Open Source Software: An Edge For Your Growing BusinessOpen Source Software: An Edge For Your Growing Business
Open Source Software: An Edge For Your Growing Business
 
Augmented Reality March Webinar
Augmented Reality March WebinarAugmented Reality March Webinar
Augmented Reality March Webinar
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
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
 

Recently uploaded (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Automated testing DrupalCamp in Asheville

  • 2. About Promet Mission Statement: “Promet Solutions specializes in developing innovative, complex web applications with open source technology.” 30+ solutions architects 10 year in business th worldwide 32 open source contributions • Offices in the US • Chicago 10+ mobile apps in the past 12 months • San Jose
  • 3. ABOUT JOHNNIE: • Presenter • Johnnie Fox • @johnniefox • Promet Source • Director of Development • Scrum Master • Project Manager • Recovering Developer • @prometsource
  • 4. ABOUT CHRIS • Presenter Insert picture of Chris • Chris Calip • Promet Source • Application Developer • @prometsource
  • 5. HISTORY OF DRUPAL TESTING Drupal Testing: D6 core – Simpletest Application specific testing - Manual Tests - Written test cases – Word documents - The spreadsheet of pain. (Checklist) Challenges - Testing different browsers Reproducible results Providing a record Doesn’t test integration with 3rd party API (backend functionality)
  • 6. CONTINUOUS INTEGRATION: Continuous Integration (CI) implements continuous processes of applying quality control — small pieces of effort, applied frequently. Continuous integration aims to improve the quality of software, and to reduce the time taken to deliver it, by replacing the traditional practice of applying quality control after completing all development. Continuous Integration emerged in the Extreme Programming (XP) community, and XP advocates Martin Fowler and Kent Beck first wrote about continuous integration circa 1999. Continuous integration - Wikipedia, the free encyclopedia : taken from - http://en.wikipedia.org/wiki/Continuous_integrationhttp ://creativecommons.org/licenses/by-sa/3.0/
  • 7. HACKATHON TEAM : Five. Striving as one. Driven by a passion for continuous automated quality control. Ruoran Wang Scott Massey Chris Calip Johnnie Fox Michelle Krejci
  • 8. HACKATHON OBJECTIVE: Develop, deploy, demonstrate, and identify challenges of making using ci infrastructure to implement acceptance tests (unit tests, selenium) on one existing site.
  • 9. TECHNICAL DETAILS code metrics phpqatools.org user acceptance provisions servers with testing components admin gui to trigger test suites, or view reports
  • 10. Necessary components • For necessary components and installation instructions, go to: • Phing Drupal Template • http://reload.github.com/phing-drupal-template/ • Jenkins Drupal Template • http://reload.github.com/jenkins-drupal-template • Phing Drupal Template with User Acceptance Test • http://github.com/promet/phing-drupal-template • In addition for phing-drupal-template with user acceptance test, you need to install additional pear libraries • For more instructions, http://phpqatools.org/
  • 11. Installing Infrastructure Initial assumption: your server has several initial software already 1. Go to https://github.com/promet/phing-drupal-template 2. Three files that you need to use to install infrastructure 3. Put in on your site Drupal root 4. If you want to override it, build.properties 5. Customize variables
  • 12. EXAMPLE TEST SUITE FOR SITE SUPPORT
  • 13. Jenkins: Scheduled 1AM User Jenkins: Clone Acceptance Test Production to Test PHING: PHPUnit Configuration Load Jenkins & PHING: User With Bootstrap and PHING: Selenium Acceptance PHPUnit + what Bootstrap file Without Config Upload Selenium (ability to use Bootstrap Drupal API) PHING: Autodiscover PHING: Report PHING: Autodiscover the Selenium test Generated the PHPUnit test PHING: Trigger each Jenkins: If errors PHING: Trigger each found, notify PHPUnit Test and Selenium test and stakeholders generate report generate report Done
  • 14. What is Selenium? •Selenium automates browsers. That's it. What you do with that power is entirely up to you. Primarily it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web- based administration tasks can (and should!) also be automated as well. •Selenium has the support of some of the largest browser vendors who have taken (or are taking) steps to make Selenium a native part of their browser. It is also the core technology in countless other browser automation tools, APIs and frameworks. • Goes through every page • Makes sure header, footer, logos, etc • All branding elements in place
  • 15. Functional Test PHPUnit • Project Airbox • Checkout process that involves passing customer information to third party banking API, passes back customer ID • Months after completion, API changes broke the application • PHPUnit figures out how and where the problem is • More importantly, is there a problem? • Major time saver for detective work • -- bootstrap option to make use of forked upal without SUT • https://github.com/chriscalip/upal • http://drupal.org/node/1567500 • actually installs a complete Drupal site like the regular Drupal installer for every test being executed, using a random database prefix and some logic baked into Drupal's (regular runtime) core that re-routes all HTTP requests originating from WebTestBase into the "child site under test" (the db-prefixed one). Based on that, every test is able to specify additional modules to install into that child site, in order to test various
  • 16. EXAMPLE TEST SUITE FOR DEVELOPMENT SITES Guiding principle: Fast Iteration
  • 17. Traditional Dev Staging Production and Workflow Manual Manual Manual Local Dev Staging Production Lots of commits Significant Event (Less Frequent)
  • 18. Dev Staging Production Work Flow with Automated Continuous Integration Tests Manual Manual Manual Test Local Dev Staging Production Branch Automatic push if Run Test passes Suite Jenkins: Clone Staging DB to test DB Jenkins: Run code-metrics test Jenkins: Run user acceptance test Jenkins: Run Drupal Core and Contribution Simple test
  • 19. Manual Test Jenkins: Clone Staging DB to test DB (5 mins) Jenkins: Run code-metrics test (10-15 mins) Jenkins: Run user acceptance test (10-15 mins) Jenkins: Run Drupal Core and Contribution Simple test (Needs work) Jenkins: RUN ALL (35 mins)
  • 20. All those test eats up server resources ... .
  • 21. Drupal ANATOMY OF USER ACCEPTANCE Sites TEST build.properties project.code.custom = All bathroom conference_room Modules # Chosen File Pattern by project for phpunit ie.. ExampleUnitTest.php bathroom SampleUnitTest.php bathroomUnitTest.php project.phpunit.filepattern = UnitTest.php bathroomSeleniumTest.ph p # Selenium conference room # Chosen File Pattern by project for selenium ie.. conferenceroomUnitTest.ph ExampleSeleniumTest.php SampleSeleniumTest.php p project.selenium.filepattern = SeleniumTest.php conferenceroomSeleniumTest. php Kitchen (Contrib)
  • 23. Example of Code Metric Test PHP Mess Detector
  • 25. GIT POST HOOK TRIGGERING THE TEST SUITE. http://demosource.prometdev.com/blog Dev writes the code & test Client updates database • Finding a block with Selenium • Dev pushes code
  • 26. Questions? www.prometsource.com chriscalip@prometsource.com johnnie@prometsource.com Twitter: @prometsource