SlideShare a Scribd company logo
1 of 27
Download to read offline
Enabling Agile Testing Through
Continuous Integration
 Sean Stolberg, Pacific Northwest National Laboratory
Where We’re Going Today

 Introduction - Being thrown into the deep end of Agile Testing
 Our Plan – Deciding to Implement Agile Practices
 The Problem
 The Solution - Continuous Integration (CI)
 What is CI?
 Implementing CI
 Assessing the Team’s CI Practices
 Assessing Our New Agile Development Practices and Testing
 Capabilities
 Retrospective
Being Thrown Into the Deep End


 Me
    Eight years as traditional software tester/QA engineer.
    November 2007 – First job as a tester on an Agile team.
 First two sprints
    Humbling
    All the “moves” I knew didn’t work too well.
    Kept coming up short on time, test coverage, and accumulation of
     technical debt.
 Re-evaluation
    “What I’m doing is not working, so what will?”
Practices We Decided to Implement


1. Define and execute “just-enough” acceptance tests. [1]
2. Automate as close to 100% of the acceptance tests as
   possible. [2]
3. Automate acceptance tests using a “subcutaneous” test
   approach with a xUnit test framework. [2]

[1] “eXtreme Rules of the Road: How a tester can steer an eXtreme Programming project toward success”, Lisa Crispin,
        STQE Jul/Aug 2001
[2] “Testing Extreme Programming”, Lisa Crispin and Tip House, 2003, Addison Wesley
Practices We Decided to Implement                                                               (continued)




5. Run all acceptance tests in the regression test suite with
   the build, daily (at a minimum). [4]
6. Develop unit tests for all new code during a sprint. [5]
7. Run all unit tests with every build. [4]
8. Run multiple builds per day. [4]

[4] “Continuous Integration”, Martin Fowler, http://www.martinfowler.com/articles/continuousIntegration.html
[5] “Code the Unit Test First”, http://www.extremeprogramming.org/rules/testfirst.html
The Problem


  We didn’t have an automation framework.
  How could we:
     Implement our new development practices?
     Run all acceptance tests in the regression test suite with the
      build?
     Run all unit tests with every build?
     Run multiple builds per day?
The Solution


  Continuous Integration
     Commonly used by teams already successfully implementing
      Agile Testing.
     Provides framework to implement several of the practices.
     We needed to find out more.
What is Continuous Integration?


  Describes a set of software engineering practices that

             speed up the delivery of software
                            by
              decreasing integration times

  Emerged in the XP community.
  Martin Fowler and Kent Beck – helped make it popular.
What CI Might Look Like

1. Automated source repository change detection
        Change is detected resulting to a chain of events being put
         into motion
2.   Get latest source
3.   Compile (or run through other check; interpreted code)
4.   Run unit tests
5.   Deploy to test environment
6.   Run acceptance tests
7.   Send results of testing
8.   Publish build if tests pass
Speeding Up the Feedback Loop


                                                Compile




                     Report                                          Unit Testing




                                              Continuous
                                              Integration
            Notify                                                            Deploy




                                                            Acceptance
                              Publish build
                                                              Testing
Tools Used
Virtual Server Host

• First step in build
  automation
• Configuration
  • Dual Quad Core Xeon
      1.6ghz
  • 8GB Ram
  • 4 x 146GB 15k RPM
      SCSI drives in RAID-5.

• Unified build environment
  and administration

• Get build machines out
  from under the desks and
  into the server room
Virtual Build Server

IF a source code change is detect
• Refresh source code
• Build (ABS using VS2008)
        • Clean build
        • Build All
        • Build Installer
IF no build errors were found
• Prep the test VM for product
    install and testing (VBScript
    helper script called via STAF)
• Copy install files to test VM
    (STAF)
• Install app-under-test on test
    VM (STAF)
• Discover and deploy all Unit
    and Acceptance tests to test
    VM (custom C# helper
    app/STAF)
• Execute tests on test VM
    (custom C# helper app/STAF)
• Copy test result .xml file(s)
    from test VM to build machine
    (STAF)
• Process the test result .xml
    files (custom C# helper app)
Communication
Send mail with
• test results (PASS or FAIL
   with details of failures)
• Link to location of build
• Build logs
• Change logs
Assessing our CI Practices
 Maintain a Single Source Repository
    Before CI: Seapine Surround SCM source repository.
    After CI: No change.

 Automate the Build
    Before CI: Some partial automation; still very manual.
    Heterogeneous build environments.
    After CI: Yes, with Automated Build Studio (ABS).

 Make Your Build Self-Testing
   Before CI: Not self testing.
   After CI: NUnit framework unit and acceptance tests.
Assessing our CI Practices                (continued)


 Everyone Commits Every Day
    Before CI: Unknown, varied probably.
    After CI: We can only hope.

 Every Commit Should Build the Mainline on an Integration Machine
    Before CI: No, it was not happening.
    After CI: Yes, ABS's Continuous Integration Tasks helped us do
    this.

 Keep the Build Fast
    Before CI: Multi-pass builds, unordered dependencies.
    After CI: 10 to 15 min; refactoring needed sooner than later.
Assessing our CI Practices                  (continued)




 Test in a Clone of the Production Environment
    Before CI: Yes, but not automated
    After CI: Using clean virtual machine test clients to install and test

 Make it Easy for Anyone to Get the Latest Executable
   Before CI: Not all projects using the common build repository.
   Some private file share locations for production code
   After CI: All products building to common location now. Build mail
   contains link to new build location
Assessing our CI Practices                  (continued)




 Everyone can see what's happening
    Before CI: Limited to ad hoc e-mails, no web, no reporting,
    different project worked differently.
    After CI: Use ABS's web interface to see the progress of builds,
    and email build and test status.

 Automate Deployment
    Before CI: Not being done.
    After CI: Yes, automatically deploy the build, then test it.
Assessing Our Agile Practices

  Define and execute “just-enough” acceptance tests
   Made acceptance test definition a required task during sprint
    planning.
   Developers and customer liked visibility into testing.


  Automate as close to 100% of the acceptance tests as possible
   Now tried to automate as close to 100% acceptance tests as
    possible.
   Slowed our accumulation of technical test debt.
Assessing Our Agile Practices                     (continued)




  Automate acceptance tests using a “subcutaneous” test approach
  with an xUnit test framework
   NUnit test framework used to automate our acceptance/functional
     testing using the API of the application.
   Acceptance tests versioned code in the repository and possible to
     run in a daily build.

  Run all acceptance tests in the regression test suite with the build,
  daily (at a minimum)
   NUnit acceptance tests now ran with a daily build.

   Practice enabled using our new continuous integration system.
Assessing Our Agile Practices                (continued)




  Develop unit tests for all new code during a sprint
    Developers started putting more emphasis on developing unit
     tests during the same sprint.
    Practice encouraged due to ease with which unit tests could now
     be run with the build.

   Run all unit tests with every build
    NUnit tests now ran with every build.


  Run multiple builds per day
    Builds started automatically when changes to the source
     repository were checked in.
Retrospective

 Personal “biggest discoveries”
  Testing in sync with development.


 Embracing fully automated acceptance tests
  Exciting and intimidating.


 Hard to convince developers to go through the automation “hump-of-pain”
   But it’s worth it.
   Devoting personal time toward investigation and proof-of-concept paid
    off.

 Can’t imagine working on a team not using Agile Testing or development
   Get “hooked” on injecting testing and quality early into the cycle.
   Adds immediate value.
Recommended
Reading
Crispin, Lisa, Tip House. Testing
Extreme Programming. Addison-
Wesley Professional, 2002




Gerard Meszaros, xUnit Test
Patterns: Refactoring Test Code.
Addison-Wesley Signature Series,
2007



Gregory, Janet, Lisa Crispin. Agile
Testing: A Practical Guide for
Testers and Agile Teams.
Addison-Wesley Signature Series,
2008
References

 [1] “eXtreme Rules of the Road: How a tester can steer an eXtreme
 Programming project toward success”, Lisa Crispin, STQE Jul/Aug
 2001
 [2] “Testing Extreme Programming”, Lisa Crispin and Tip House,
 2003, Addison Wesley
 [3] “Continuous integration”,
 http://en.wikipedia.org/wiki/Continuous_Integration
 [4] “Continuous Integration”, Martin Fowler,
 http://www.martinfowler.com/articles/continuousIntegration.html
 [5] “Code the Unit Test First”,
 http://www.extremeprogramming.org/rules/testfirst.html
Questions???

More Related Content

What's hot

Continuous delivery @ hi q
Continuous delivery @ hi qContinuous delivery @ hi q
Continuous delivery @ hi q
Tomas Riha
 
Introduction To Continuous Integration
Introduction To Continuous IntegrationIntroduction To Continuous Integration
Introduction To Continuous Integration
Christopher Read
 
Continuous delivery applied
Continuous delivery appliedContinuous delivery applied
Continuous delivery applied
Mike McGarr
 
Build it, Test it, Ship it: Continuous Delivery at Turner Broadcasting System...
Build it, Test it, Ship it: Continuous Delivery at Turner Broadcasting System...Build it, Test it, Ship it: Continuous Delivery at Turner Broadcasting System...
Build it, Test it, Ship it: Continuous Delivery at Turner Broadcasting System...
Atlassian
 

What's hot (20)

Continuous Integration and Builds
Continuous Integration and BuildsContinuous Integration and Builds
Continuous Integration and Builds
 
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
What is Jenkins | Jenkins Tutorial for Beginners | EdurekaWhat is Jenkins | Jenkins Tutorial for Beginners | Edureka
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous Integration
 
Mobile Apps development best practices. TDD, CI, CD
Mobile Apps development best practices. TDD, CI, CDMobile Apps development best practices. TDD, CI, CD
Mobile Apps development best practices. TDD, CI, CD
 
Jenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous DeliveryJenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous Delivery
 
Continuous delivery @ hi q
Continuous delivery @ hi qContinuous delivery @ hi q
Continuous delivery @ hi q
 
Introduction To Continuous Integration
Introduction To Continuous IntegrationIntroduction To Continuous Integration
Introduction To Continuous Integration
 
Continuous Integration using Hudson and Fitnesse at Ingenuity Systems (Silico...
Continuous Integration using Hudson and Fitnesse at Ingenuity Systems (Silico...Continuous Integration using Hudson and Fitnesse at Ingenuity Systems (Silico...
Continuous Integration using Hudson and Fitnesse at Ingenuity Systems (Silico...
 
Preparing for DevOps
Preparing for DevOpsPreparing for DevOps
Preparing for DevOps
 
Standardizing Jenkins with CloudBees Jenkins Team
Standardizing Jenkins with CloudBees Jenkins TeamStandardizing Jenkins with CloudBees Jenkins Team
Standardizing Jenkins with CloudBees Jenkins Team
 
Continuous integration with Jenkins
Continuous integration with JenkinsContinuous integration with Jenkins
Continuous integration with Jenkins
 
How do you implement Continuous Delivery? Part 3: All about Pipelines
How do you implement Continuous Delivery? Part 3: All about PipelinesHow do you implement Continuous Delivery? Part 3: All about Pipelines
How do you implement Continuous Delivery? Part 3: All about Pipelines
 
Test Dependencies and the Future of Build Acceleration
Test Dependencies and the Future of Build AccelerationTest Dependencies and the Future of Build Acceleration
Test Dependencies and the Future of Build Acceleration
 
Continuous delivery applied
Continuous delivery appliedContinuous delivery applied
Continuous delivery applied
 
Integration Testing as Validation and Monitoring
 Integration Testing as Validation and Monitoring Integration Testing as Validation and Monitoring
Integration Testing as Validation and Monitoring
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
 
CICD by Teerapat
CICD by TeerapatCICD by Teerapat
CICD by Teerapat
 
Keeping Your CI/CD Pipeline as Fast as It Needs to Be
Keeping Your CI/CD Pipeline as Fast as It Needs to BeKeeping Your CI/CD Pipeline as Fast as It Needs to Be
Keeping Your CI/CD Pipeline as Fast as It Needs to Be
 
Build it, Test it, Ship it: Continuous Delivery at Turner Broadcasting System...
Build it, Test it, Ship it: Continuous Delivery at Turner Broadcasting System...Build it, Test it, Ship it: Continuous Delivery at Turner Broadcasting System...
Build it, Test it, Ship it: Continuous Delivery at Turner Broadcasting System...
 
Continuous delivery @wcap 5-09-2013
Continuous delivery   @wcap 5-09-2013Continuous delivery   @wcap 5-09-2013
Continuous delivery @wcap 5-09-2013
 

Similar to Enabling Agile Testing Through Continuous Integration Agile2009

Continuous Integration Approach
Continuous Integration ApproachContinuous Integration Approach
Continuous Integration Approach
Nigel Thurlow
 
Automated testing DrupalCamp in Asheville
Automated testing DrupalCamp in AshevilleAutomated testing DrupalCamp in Asheville
Automated testing DrupalCamp in Asheville
Promet Source
 
Continuous deployment steve povilaitis
Continuous deployment   steve povilaitisContinuous deployment   steve povilaitis
Continuous deployment steve povilaitis
Steve Povilaitis
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
Basma Alkerm
 
Using Continuous Integration To Ensure Project Health New
Using Continuous Integration To Ensure Project Health NewUsing Continuous Integration To Ensure Project Health New
Using Continuous Integration To Ensure Project Health New
bartlowe
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
twuniversity
 

Similar to Enabling Agile Testing Through Continuous Integration Agile2009 (20)

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
 
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
 
Continuous Integration Approach
Continuous Integration ApproachContinuous Integration Approach
Continuous Integration Approach
 
Automated testing DrupalCamp in Asheville
Automated testing DrupalCamp in AshevilleAutomated testing DrupalCamp in Asheville
Automated testing DrupalCamp in Asheville
 
Continuous deployment steve povilaitis
Continuous deployment   steve povilaitisContinuous deployment   steve povilaitis
Continuous deployment steve povilaitis
 
Continuous Integration: A Case Study
Continuous Integration: A Case StudyContinuous Integration: A Case Study
Continuous Integration: A Case Study
 
Fundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CDFundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CD
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
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
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Continous Integration: A Case Study
Continous Integration: A Case StudyContinous Integration: A Case Study
Continous Integration: A Case Study
 
05 test infrastructure
05   test infrastructure05   test infrastructure
05 test infrastructure
 
Lets talk about CI CD Pipeline in Agile
Lets talk about CI CD Pipeline in Agile Lets talk about CI CD Pipeline in Agile
Lets talk about CI CD Pipeline in Agile
 
Agile Engineering Best Practices by Richard Cheng
Agile Engineering Best Practices by Richard ChengAgile Engineering Best Practices by Richard Cheng
Agile Engineering Best Practices by Richard Cheng
 
Using Continuous Integration To Ensure Project Health New
Using Continuous Integration To Ensure Project Health NewUsing Continuous Integration To Ensure Project Health New
Using Continuous Integration To Ensure Project Health New
 
Continuous Delivery Agiles 2014 Medellin
Continuous Delivery Agiles 2014 MedellinContinuous Delivery Agiles 2014 Medellin
Continuous Delivery Agiles 2014 Medellin
 
Flight East 2018 Presentation–Continuous Integration––An Overview
Flight East 2018 Presentation–Continuous Integration––An OverviewFlight East 2018 Presentation–Continuous Integration––An Overview
Flight East 2018 Presentation–Continuous Integration––An Overview
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
(Agile) engineering best practices - What every project manager should know
(Agile) engineering best practices - What every project manager should know(Agile) engineering best practices - What every project manager should know
(Agile) engineering best practices - What every project manager should know
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 

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@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
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
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

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
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
+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...
 
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
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
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
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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, ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

Enabling Agile Testing Through Continuous Integration Agile2009

  • 1. Enabling Agile Testing Through Continuous Integration Sean Stolberg, Pacific Northwest National Laboratory
  • 2. Where We’re Going Today Introduction - Being thrown into the deep end of Agile Testing Our Plan – Deciding to Implement Agile Practices The Problem The Solution - Continuous Integration (CI) What is CI? Implementing CI Assessing the Team’s CI Practices Assessing Our New Agile Development Practices and Testing Capabilities Retrospective
  • 3. Being Thrown Into the Deep End Me  Eight years as traditional software tester/QA engineer.  November 2007 – First job as a tester on an Agile team. First two sprints  Humbling  All the “moves” I knew didn’t work too well.  Kept coming up short on time, test coverage, and accumulation of technical debt. Re-evaluation  “What I’m doing is not working, so what will?”
  • 4. Practices We Decided to Implement 1. Define and execute “just-enough” acceptance tests. [1] 2. Automate as close to 100% of the acceptance tests as possible. [2] 3. Automate acceptance tests using a “subcutaneous” test approach with a xUnit test framework. [2] [1] “eXtreme Rules of the Road: How a tester can steer an eXtreme Programming project toward success”, Lisa Crispin, STQE Jul/Aug 2001 [2] “Testing Extreme Programming”, Lisa Crispin and Tip House, 2003, Addison Wesley
  • 5. Practices We Decided to Implement (continued) 5. Run all acceptance tests in the regression test suite with the build, daily (at a minimum). [4] 6. Develop unit tests for all new code during a sprint. [5] 7. Run all unit tests with every build. [4] 8. Run multiple builds per day. [4] [4] “Continuous Integration”, Martin Fowler, http://www.martinfowler.com/articles/continuousIntegration.html [5] “Code the Unit Test First”, http://www.extremeprogramming.org/rules/testfirst.html
  • 6. The Problem We didn’t have an automation framework. How could we:  Implement our new development practices?  Run all acceptance tests in the regression test suite with the build?  Run all unit tests with every build?  Run multiple builds per day?
  • 7. The Solution Continuous Integration  Commonly used by teams already successfully implementing Agile Testing.  Provides framework to implement several of the practices.  We needed to find out more.
  • 8. What is Continuous Integration? Describes a set of software engineering practices that speed up the delivery of software by decreasing integration times Emerged in the XP community. Martin Fowler and Kent Beck – helped make it popular.
  • 9. What CI Might Look Like 1. Automated source repository change detection  Change is detected resulting to a chain of events being put into motion 2. Get latest source 3. Compile (or run through other check; interpreted code) 4. Run unit tests 5. Deploy to test environment 6. Run acceptance tests 7. Send results of testing 8. Publish build if tests pass
  • 10. Speeding Up the Feedback Loop Compile Report Unit Testing Continuous Integration Notify Deploy Acceptance Publish build Testing
  • 11.
  • 13. Virtual Server Host • First step in build automation • Configuration • Dual Quad Core Xeon 1.6ghz • 8GB Ram • 4 x 146GB 15k RPM SCSI drives in RAID-5. • Unified build environment and administration • Get build machines out from under the desks and into the server room
  • 14. Virtual Build Server IF a source code change is detect • Refresh source code • Build (ABS using VS2008) • Clean build • Build All • Build Installer IF no build errors were found • Prep the test VM for product install and testing (VBScript helper script called via STAF) • Copy install files to test VM (STAF) • Install app-under-test on test VM (STAF) • Discover and deploy all Unit and Acceptance tests to test VM (custom C# helper app/STAF) • Execute tests on test VM (custom C# helper app/STAF) • Copy test result .xml file(s) from test VM to build machine (STAF) • Process the test result .xml files (custom C# helper app)
  • 15. Communication Send mail with • test results (PASS or FAIL with details of failures) • Link to location of build • Build logs • Change logs
  • 16.
  • 17. Assessing our CI Practices Maintain a Single Source Repository Before CI: Seapine Surround SCM source repository. After CI: No change. Automate the Build Before CI: Some partial automation; still very manual. Heterogeneous build environments. After CI: Yes, with Automated Build Studio (ABS). Make Your Build Self-Testing Before CI: Not self testing. After CI: NUnit framework unit and acceptance tests.
  • 18. Assessing our CI Practices (continued) Everyone Commits Every Day Before CI: Unknown, varied probably. After CI: We can only hope. Every Commit Should Build the Mainline on an Integration Machine Before CI: No, it was not happening. After CI: Yes, ABS's Continuous Integration Tasks helped us do this. Keep the Build Fast Before CI: Multi-pass builds, unordered dependencies. After CI: 10 to 15 min; refactoring needed sooner than later.
  • 19. Assessing our CI Practices (continued) Test in a Clone of the Production Environment Before CI: Yes, but not automated After CI: Using clean virtual machine test clients to install and test Make it Easy for Anyone to Get the Latest Executable Before CI: Not all projects using the common build repository. Some private file share locations for production code After CI: All products building to common location now. Build mail contains link to new build location
  • 20. Assessing our CI Practices (continued) Everyone can see what's happening Before CI: Limited to ad hoc e-mails, no web, no reporting, different project worked differently. After CI: Use ABS's web interface to see the progress of builds, and email build and test status. Automate Deployment Before CI: Not being done. After CI: Yes, automatically deploy the build, then test it.
  • 21. Assessing Our Agile Practices Define and execute “just-enough” acceptance tests  Made acceptance test definition a required task during sprint planning.  Developers and customer liked visibility into testing. Automate as close to 100% of the acceptance tests as possible  Now tried to automate as close to 100% acceptance tests as possible.  Slowed our accumulation of technical test debt.
  • 22. Assessing Our Agile Practices (continued) Automate acceptance tests using a “subcutaneous” test approach with an xUnit test framework  NUnit test framework used to automate our acceptance/functional testing using the API of the application.  Acceptance tests versioned code in the repository and possible to run in a daily build. Run all acceptance tests in the regression test suite with the build, daily (at a minimum)  NUnit acceptance tests now ran with a daily build.  Practice enabled using our new continuous integration system.
  • 23. Assessing Our Agile Practices (continued) Develop unit tests for all new code during a sprint  Developers started putting more emphasis on developing unit tests during the same sprint.  Practice encouraged due to ease with which unit tests could now be run with the build. Run all unit tests with every build  NUnit tests now ran with every build. Run multiple builds per day  Builds started automatically when changes to the source repository were checked in.
  • 24. Retrospective Personal “biggest discoveries”  Testing in sync with development. Embracing fully automated acceptance tests  Exciting and intimidating. Hard to convince developers to go through the automation “hump-of-pain”  But it’s worth it.  Devoting personal time toward investigation and proof-of-concept paid off. Can’t imagine working on a team not using Agile Testing or development  Get “hooked” on injecting testing and quality early into the cycle.  Adds immediate value.
  • 25. Recommended Reading Crispin, Lisa, Tip House. Testing Extreme Programming. Addison- Wesley Professional, 2002 Gerard Meszaros, xUnit Test Patterns: Refactoring Test Code. Addison-Wesley Signature Series, 2007 Gregory, Janet, Lisa Crispin. Agile Testing: A Practical Guide for Testers and Agile Teams. Addison-Wesley Signature Series, 2008
  • 26. References [1] “eXtreme Rules of the Road: How a tester can steer an eXtreme Programming project toward success”, Lisa Crispin, STQE Jul/Aug 2001 [2] “Testing Extreme Programming”, Lisa Crispin and Tip House, 2003, Addison Wesley [3] “Continuous integration”, http://en.wikipedia.org/wiki/Continuous_Integration [4] “Continuous Integration”, Martin Fowler, http://www.martinfowler.com/articles/continuousIntegration.html [5] “Code the Unit Test First”, http://www.extremeprogramming.org/rules/testfirst.html