continuous integration in agile development
DESCRIPTION
"In software engineering, 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."from Wikipedia.The attached file contains the presentation I made for the course SWE 523 - Managing Software Development at Bogazici University.TRANSCRIPT
CONTINUOUS INTEGRATION IN AGILE SOFTWARE DEVELOPMENT
Presented by Onur Yaman 2010719258 Bogazici University – Software Engineering
Overview • General Definitions • Problem Statement • Solution Proposal • Continuous Integration Description • Why Continuous Integration? • Martin Fowler’s 10 CI Practices • Example Scenario • Conclusion
Definition: What is software integration? • Integration is combining parts so that they work together
or form a whole.
• In software integration, we: • Combine separately produced
components/subsystems • Address problems in their
interactions • Ensure that the components/
subsystems function together as a system
Problem: Integration is hard! • Integration is a long and unpredictable process
• Bugs are always there
• Integration efforts increase exponentially with: • Number of bugs • Number of components • Time since last integration
• Results of long integration process: • Overhead in development process • Loss of money • Loss of market opportunity
Solution: Continuous Integration (CI) • A software development practice • Members of a team integrate their works frequently (at
least daily), hence multiple integrations per day • Controlled source code repository
• Don’t commit broken code • Fix broken code immediately • Avoid getting broken code
• Integration verification by an automated build • Write automated developer tests • All tests and inspections must pass • Run private builds
• No particular tooling required to deploy
Solution: Continuous Integration (CI) • Build software at every change:
• Compilation • Testing • Inspection • Deployment
Why use CI? • Benefits of Continuous Integration:
• Reduce risks • Reduce repetitive manual processes • Generate deployable software
at any time and at any place • Enable better project visibility
• Effective decisions • Noticing trends
• Establish greater confidence in the software product from the development team
Fowler’s CI Practices 1. Maintain a single source repository 2. Automate the build 3. Make your build self-testing 4. Everyone commits to the mainline every day 5. Every commit should build the mainline on an
integration machine 6. Keep the build fast 7. Test in a clone of the production environment 8. Make it easy for anyone to get the latest executable 9. Everyone can see what’s happening 10. Automate deployment
How does it work? • Example workflow: 1. Tim sees that the last integration
build is successful (a few mins ago) 2. He was said to fix the too much
duplicate code (based on reports) 3. He refactors code 4. He runs a private build (it compiles
and runs unit tests against the newest source code)
5. After the build is successful, he commits his changes
6. In a few minutes, the CI server discover the changes and runs an integration build (inspection tools are used)
7. The CI server tells that the operation was successful
Conclusion • Continuous Integration has many benefits for a project
team • It’s not a must; but a better-win • Various CI server exist (some of them are open-source
projects) and their usage is offered • Examples: CruiseControl, Go, Hudson, Apache Continuum