continuous integration: a case study
DESCRIPTION
Session Presented at 2nd IndicThreads.com Conference On Software Quality held on 25-26 March 2011 in Pune, India WEB: http://Q11.IndicThreads.comTRANSCRIPT
![Page 1: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/1.jpg)
Continuous Integration: A case study
Vaibhav Kothari
Talentica Software (I) Pvt ltd
![Page 2: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/2.jpg)
Abstract• Developer’s dilemma• QA’s dilemma• Continuous Integration ?• Case study• What is accomplished ?• Benefits of CI• Recommended Practices• Other Tools Available• Q&A
![Page 3: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/3.jpg)
Developer’s dilemma
• Will my changes integrate successfully with all versions of code?
• How much time/effort it will take to build and deploy from different source repository branches?
• Why can’t QA take this up!!
![Page 4: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/4.jpg)
QA’s dilemma
• How much time/effort it will take to build and deploy from different source repository branches?
• How much time/effort will it take test builds from different sources?
• I can't build that often!
![Page 5: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/5.jpg)
Continuous Integration ?? As wiki says
“ Continuous integration involves integrating early and often, so as to avoid the pitfalls of "integration hell". The practice aims to reduce rework and thus reduce cost and time.”
![Page 6: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/6.jpg)
Continuous Integration….
![Page 7: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/7.jpg)
Continuous Integration….
• Integrating the build process with continuous development.
• Concurrent build preparation from different branches.
• Integrating build system with deployment and test automation.
• Monitoring build and test.
![Page 8: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/8.jpg)
CI in agile development
![Page 9: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/9.jpg)
Case Study Current Product development Lifecycle
![Page 10: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/10.jpg)
Case Study Where does integration server stands ?
![Page 11: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/11.jpg)
Features to look out for• Basic Continuous Integration• Build Triggering options• Support for tools• Set ups and usability• Build logs and metrics• Notifications• Plugins, Extensions
Case Study
![Page 12: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/12.jpg)
Hudson CI• Open source tool available as deployable war file.
• Each build and deployment process can be set up as a separate project and run concurrently or subsequently.
• Supports distributed builds
• The most used CI server in an informal developer survey!
Case Study
![Page 13: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/13.jpg)
Case Study
Tools to be Integrated
Windows XP/LinuxOS
Selenium RCTest Automation
Apache Tomcat 6.0Web server
Apache AntBuild Tool
Sub versionVersion control
Hudson CIContinuous Integration
![Page 14: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/14.jpg)
Case Study…Setting up a build Job
![Page 15: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/15.jpg)
Case Study…..Defining build triggers
![Page 16: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/16.jpg)
Post build tasks• Automate build and deployment process and server
restart.
• Integrate Hudson with test automation suite
• Remote deployment of multiple builds and test suite invocation
Case Study
![Page 17: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/17.jpg)
Case Study…Post build tasks
![Page 18: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/18.jpg)
Distributed Builds
• Build distribution using Single Hudson installation.
• Single click using Master/Slave mode.
• Concurrency in largely distributed projects.
Case Study
![Page 19: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/19.jpg)
Case Study…Building Remotely
![Page 20: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/20.jpg)
Case Study…Slave set up in Hudson
![Page 21: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/21.jpg)
Case Study….What’s achieved?
![Page 22: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/22.jpg)
• Nobody minds it! Single click process.• Early identification of build issues.• Early identification of bugs.• Incremental development.• Constant availability of sane build.• Efficient use of Test Automation.• More time for Quality improvement.
Benefits of CI
![Page 23: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/23.jpg)
• Maintain a code repository• Automate the build and Deployment• Make your build self-testing• Everyone commits every day• Every commit (to mainline) should be built• Keep the build fast• Test in a clone of the production environment• Make it easy to get the latest deliverables• Everyone can see the results of the latest build
Recommended Practices
![Page 24: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/24.jpg)
Other Tools AvailableTools Advantages LimitationsCruise Control - Supports wide project and SCM tool.
- Good notification techniques- Large number of plugins
- Complicated set up- XML based configuration
Continuum - Easy to install and use- Web Administrative console
- Not suitable for big projects
Luntbuild - Easy to install and use- Web Administrative console- Supports wide range of tools
- Not support remote project build up
TeamCity - Supports distributed build- Professional support (JetBrains)- Advanced options
• Commercial tool (free for 10 projects)
Bamboo • Advanced distributed build options• Integrates with JIRA
• Commercial tools
![Page 25: Continuous Integration: A Case Study](https://reader036.vdocuments.us/reader036/viewer/2022062614/546fb202af7959ae0a8b4642/html5/thumbnails/25.jpg)
Q&A