Simple tools to fight bigger quality battle

  • 33,626 views
Uploaded on

This presentation was given in GTAC 2008 (Also available on www.TestingGeek.com) and discuss the approach of using SVN commit hooks and batch files as continuous integration system.

This presentation was given in GTAC 2008 (Also available on www.TestingGeek.com) and discuss the approach of using SVN commit hooks and batch files as continuous integration system.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
33,626
On Slideshare
0
From Embeds
0
Number of Embeds
3

Actions

Shares
Downloads
55
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Simple tools to fight the bigger Quality Battle Continuous Integration using batch files and task scheduler www.testinggeek.com   By:                                                                                                                Komal Joshi                                        Director:Atlantis Software Ltd.        Patrick Martin                                     Sr Software Engineer (Consultant)
  • 2. Agenda www.testinggeek.com
      • Introduction to CI
    •  
      • How it works
    •  
      • CI suitable for our needs
    •  
      • Challenges Faced
    •  
      • Our Solution
    •  
      • Implementation
    •  
      • Q/A
  • 3. Say Hello to CI.. www.testinggeek.com
      • Software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day.
    •  
      • Integration verified by an automated build (including test) integration errors are detected as quickly as possible.
    •  
      • Significantly reduced integration problems
    •  
      • Teams develop cohesive software more rapidly and to higher quality standards.
  • 4. www.testinggeek.com
  • 5. Why CI ? www.testinggeek.com
      • Last minute changes
    •  
      • Resource Crisis
    •  
      • Quality was very important for financial application
    •  
      • Tight schedule
  • 6. Challenges www.testinggeek.com
  • 7. Challenges Faced www.testinggeek.com
    • Application
      • Delphi based
      • Standalone desktop
    • Resources
      • Few
      • Not highly technical
    • So we needed a solution that was:
      • Easy to implement
      • Not tied to a specific technology
      • Could be easily replicated
      • Should be a simple one click solution.
      • Easily configurable.
  • 8. Solution was www.testinggeek.com
      • No heavy weight Client/Server application but task schedulers
      • No XML but easily configurable text files 
      • No fuss-setup but one click execution of batch files
      • 'Out of the box' continous build batch process
  • 9. Key Features www.testinggeek.com
      •   Distributed in nature
      • No web tools commonly associated with modern distributed architecture.
      • The entire system was achieved by simple text files.
      • No fuss batch files
      • Open source and simple tools 
    •  
      •   Technology Agnostic
  • 10. High Level Implementation www.testinggeek.com developer tester repository build appliance test appliance App1 more... more... App2 step 0 step 1 step 2 step 2 App4 App3 step 3 step 4 step 5 - test! test appliance
  • 11. Process Steps www.testinggeek.com
    • step 0: run the product build script
      • creates / updates checkout
    •  
    • step 1: develop / test product
      • can be developer, tester or ad-hoc testing
    •  
    • step 2: commit changes
      • can be developer, tester or ad-hoc testing
    •  
    • step 3: post-commit actions
      • repository post-commit actions queues up revisions to be built (perhaps)
    •  
    • step 4: build revision (perhaps)
      • build appliances run product build script: build if required due to update
    •  
    • step 5: test (perhaps)
      • test appliances run product update script and test
  • 12. www.testinggeek.com Subversion Repository Build Machines Test Machines VbSend Mail Utility
  • 13. Overall Flow www.testinggeek.com repository post-commit + task drop markers to build machine(s) tasks on build machines pick up revisions; build successful build tasks drop test markers; notify tasks on test machines pick up revision build for test run tests; archive tested revisions summarise results and notify team commit to repository
  • 14. Subversion Repository www.testinggeek.com
      • Post Commit Hooks
        • Copy the build-markers
      • Scheduled tasks after 10 minutes
        • Poll to check for markers
        • Kick off scripts to Parse the machines names from .txt files
        • Copy the markers to remote machines
        • Run the scheduled tasks remotely
  • 15. www.testinggeek.com Repo: Config File with machine name and build Repo: Config File with machine name and task names
  • 16. Build Machine www.testinggeek.com
      • Build-Scripts
        • Kicked off by the parameters in Schedule tasks
      • Scheduled tasks after 10 minutes
        • Poll to check for markers/Kicked off remotely
        • Kick off scripts passed as parameters
        • Copy the markers from build-rev to ‘done-revs’
        • Kick off scripts to Parse the Test machines names +Tests from .txt files
        • Copy the markers to test machines
      • Config files
        • Normal text files containing-
          • Test machine name
          • Name of tests
          • Type of release (Debug or normal)
  • 17. www.testinggeek.com Build-Machine: Config File with machine name and Test
  • 18. Test Machine www.testinggeek.com
      • Automated-Test-Scripts
        • Kicked off by the parameters in Schedule tasks
      • Scheduled tasks after 10 minutes
        • Poll to check for markers
        • Kick off scripts passed as parameters
      • Send Mail utility + Log
        • Mail the results to people in the list from the log
      • Any automation tool
        • Should be invoked from command line
  • 19. www.testinggeek.com sendmail.bat
  • 20. www.testinggeek.com All sounds quite complex... How about a demo?
  • 21. A CI Template www.testinggeek.com
    • The process
    • Commit to repository
      • post-commit hook appends new revision notification to revs queue
    • (asynchronous) post new revision notification
      • post any revs found into revs queue of build appliance 
    • (asynchronous) build appliance pick-up of revs queue
      • walk the revs queue: update and if file changes noted, build - move to done-revs notify team if successful build then post build notification to test appliance
    • (asynchronous) test appliance pick-up of revs queue
      • walk the revs queue: update and test - move to done-revs; notify team
  • 22. A Boot Strap Script www.testinggeek.com
    • The complete bootstrap script simply takes a root folder argument and creates:
      • the repository + extra folders/files if required in the repo sub-folder
      • an example project in the repository
      • the revision queue check task
      • the folder for the "build appliance" checkout
      • the folder for the "test appliance" checkout
      • the post-commit hook
      • the script to post new revisions
      • the scheduled task to invoke the post new revisions script
      • the update/build/test scripts for the appliances in the scripts folder
      • the scheduled task to update and build the "build appliance" 
    •         checkout
      • the scheduled task to update and test the "test appliance" 
    •        checkout
  • 23. A Boot Strap Script www.testinggeek.com   Final output of the script: ROOT - scripts - repo - build-appliance - test-appliance
  • 24. www.testinggeek.com boot-strap.bat It's that simple #1
  • 25. www.testinggeek.com post-revs.bat It's that simple #2
  • 26. www.testinggeek.com build-revs.bat It's that simple #3
  • 27. www.testinggeek.com test-revs.bat It's that simple #4
  • 28. www.testinggeek.com SHOW Me the DEMO please #$*#
  • 29. www.testinggeek.com setup of CI system using bootstrapper
  • 30. www.testinggeek.com CI tasks created by bootstrap
  • 31. www.testinggeek.com example developer change
  • 32. www.testinggeek.com output from CI system due to change
  • 33. QUESTIONS??? www.testinggeek.com
  • 34. www.testinggeek.com   Thanks Contact : Komal Joshi:         [email_address]   [email_address] Patrick Martin:    [email_address] Thanks To our team: Colin Towers, Ben Murray and Fergus Bown