1 / 0

Improving Software Quality with Continuous Integration

Improving Software Quality with Continuous Integration. Chris Farrell Quick Solutions. Questions Anytime. Ask questions whenever you want. What is CI?. NOT a software program you install NOT something you buy or pay for NOT a new idea NOT specific to .Net or Java

jeslyn
Download Presentation

Improving Software Quality with Continuous Integration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Improving Software Quality with Continuous Integration

    Chris Farrell Quick Solutions
  2. Questions Anytime Ask questions whenever you want
  3. What is CI? NOT a software program you install NOT something you buy or pay for NOT a new idea NOT specific to .Netor Java Is a set of process best practices applied during development to Reduce defects by doing QA during development Improve productivity by automating manual tasks Facilitate collaboration and teamwork
  4. Who Created Continuous Integration

  5. Why Do CI? Source: http://www.riceconsulting.com/public_pdf/STBC-WM.pdf
  6. Problems solved with CI Integration Hell Difficult, Stressful deployments Human Error in Deployments Late feedback from QA
  7. Benefits of CI Reduced Cost Improved Quality Stable velocity Easy, more accurate/consistent deployments Can demo at any time Can deploy at any time Improved Transparency
  8. #1 – Single Source Repository Everyone works from the same codebase *during* development Repository contains *all* needed files including SQL Scripts, Reports, Code, Dependencies, etc Tools: VSS, CVS, SVN, GIT, TFS,etc
  9. #2 Automate the Build Make it so that anyone can build with a single command Build could involve multiple projects and dependencies Multiple project build Automated Build should be able to build pieces AND the whole
  10. Build Triggers Manual Build Build on Check-In CI server detects check-ins and triggers build Scheduled Build Nightly Builds
  11. #3 Make the Build Self Testing Does the latest version compile? Quality Metrics – Performance, Test Coverage Automated Tests FX Cop Style Guidelines UI/Functional Tests Integration Tests Unit Tests
  12. #3 Tooling Build Tools MS Build, Nant, Rake, Maven Unit Testing Resharper, Nunit, MS Test, Gallio/MBUnit, etc Functional Testing SpecFlow, Cuke4Nuke UI Testing Microsoft Test Manager, WATIN, Selenium
  13. #4 – Everyone Commits to the mainline every day “Mainline” does not mean prod Typically you commit multiple times per day Commit at least at end of day in case someone is sick, a hard drive dies, workload shifts, etc Anyone can get the latest code at any time Provides support for versioning
  14. #5 – Every Commit Should Build on an Integration Machine Ensures that all code to build the project has been checked in to source control Doesn’t need to be a high end PC. Can be a VM or an obsolete dev machine
  15. #6 – Keep the Build Fast The entire point of CI is to provide fast and frequent feedback If the build is broken, you want to find out before someone else checks out broken code Short feedback cycles For slow builds..prestage when needed
  16. #7 – Test in a Clone of the Production Environment Should be a close as possible. Every difference is a risk that what works in QA will not work in Production Might involve testing on multiple targets Should have similar Database size Quality of Test Data Network Security Configuration Server and Client Software
  17. Database
  18. #8 – Make it Easy for Anyone to Get the Latest Executable Business Analyst should be able to do Show & Tell at any time QA should be able to test at any time QA can trigger builds Sales should be able to see current version
  19. #9 – Everyone can see what is happening CI is about feedback and transparency CI should provide visibility towards Is the Build broken Who checked in code, when, for what feature Code Quality Metrics Automated Test Results Code Coverage Performance Metrics
  20. #10 Automate Deployment When you have to deploy at 5pm on Friday or 6am on Monday So your QA testers can test without asking you if the latest version is out
  21. #10 – Automate Deployment CRITICAL Deployment is a deliverable that needs to be tested before deploying to production Speed of Deployment Labor Cost of Deployment Accuracy of manual deployments non-tech users must be able to deploy to test target multiple environments for testing Greatly reduces deployment stress
  22. #10 – Automate Deployment Automate *all* of deployment Backup of Production Database updates Data Migrations Code Deployment Report Deployment Practice makes perfect!!!
  23. Other Uses/Benefits Can use CI to automate almost anything Data Migration Jobs Backup local or remote data/files Send Reports Reset environments Sync environments(ex move AD from Prod to Dev)
  24. Selling CI Issue – Time/Cost to Setup Issue – No access for automated deploy due to politics/firewall Issue – Sensitive data Issue – Limited access to dev environment
  25. Free VCS www.unfuddled.com 200 mb free SVN & GIT www.gitHub.com Free for public repositories/OSS www.assembla.com Free private GIT repos(?2gb limit?) www.CodePlex.com free TFS for OSS http://code.google.com/projecthosting/ 2gb GIT, Mercurial, SVN www.sourceforge.com
  26. Popular CI Servers Hudson (Free) http://hudson-ci.org Jenkins (Free) http://jenkins-ci.org TeamCity (sort of free) www.jetbrains.com/teamcity/ Free up to 20 build configurations/3 agents CruiseControl.Net (free) http://cruisecontrol.sourceforge.net Team Foundation Server Included with MSDN Pro and higher
  27. Build Automation Tools MS Build C:\ Nant (port of Ant) http://nant.sourceforge.net Rake(Ruby Make) http://rake.rubyforge.org
  28. Other Tooling SSRS Report Deployment https://github.com/chrispfarrell/RsDeploy DB Comparision Visual Studio 2010 Database Projects RedGate SQL Compare($395) FluentMigrator
  29. TFS Demo Work Item Tracking Source Control Project Mgmt Charts CI Build Unit Tests Integration Tests Automated Deployment
  30. Jenkins Demo
  31. QSI is Hiring
  32. Chris Farrell Website: www.chrispfarrell.com Twitter: @chrispfarrell Email: chrispfarrell@gmail.com
More Related