Definition: “the act of combining into an integral whole”
In software development, integration includes…
Combining source files
Combining software and environment
Combining software and data
Combining software and requirements (tests)
Combining developers
Pooja Mantri Continuous Integration
Integration Testing in SDLC
Combine the application’s components into working software.
Historically done near the end of the project.
Very risky! Software modules don’t always work together as expected
Best case: Time to fix, time to retest that module
Worst case: Time to determine why, time to redesign, time to fix, time to test all of the modules affected by the redesign.
Pooja Mantri Continuous Integration
Nightly Builds
Practice became popular in the late 90s after Microsoft published its development practices
Integrate all of the software on a nightly basis.
Smoke Test – run the application and conduct a minimal set of tests to see if it “catches fire”.
Pooja Mantri Continuous Integration
Take it to the Extreme
Extreme Programming says…
if testing is good, test all the time
if integration testing is important, integrate and test all the time
if short iterations are good, make the iterations really, really short (minutes and hours, not weeks and months)
Continuous Integration is born.
Pooja Mantri Continuous Integration
What is Continuous Integration?
It describes a set of software engineering practices that speed up the delivery of software by decreasing integration times.
Integrates source code and runs tests after each commit of code to the source repository.
Near-immediate feedback to the developer from the authoritative source, the system itself.
Pooja Mantri Continuous Integration
Example: Development of a Small Feature
Assumption: We have to do something which can be competed in few hours. The actual task doesn’t matter.
Development checks out current coy of the integrated source code.
He performs his task, tests it and commits the changes to the repository.
Pooja Mantri Continuous Integration
The builder than merges the copy to the mainline. If any conflicts found they are fixed by the developer.
If no merge conflicts, builder builds the project on integration machine based on mainline code.
If compilation error, developer fixes it and repeats the process until builder can build a working copy which is properly synchronized with the mainline.
Pooja Mantri Continuous Integration
Task is completed on if after a successful build.
If a clash between two developers exist, it is caught either when
Second developer commits his local copy or
Integration build fails
Thus error is detected rapidly
In continuous integration a failed integration build should never remain failed for long.
Pooja Mantri Continuous Integration
Practices of continuous Integration
Maintain a single source repository
Automate the build
Make your build self-testing
Everyone commits frequently
Every commit should build the mainline on an integration machine
Keep the build fast
Make it easy for anyone to get the latest executable
Everyone can see what’s happening
Automate deployment
Pooja Mantri Continuous Integration
Nightly vs. Continuous Builds
Nightly builds generate deliverables. They result in something tangible:
something for QA to test
something for product managers to review
something to reassure team members that they are in fact building a product.
Because of the external audience, the nightly build is a formal event, a mini-milestone that your team should hit without fail. Breaking the nightly build is something that generates blame and often consequences, such as becoming the build mother or being awarded a dunce cap.
Continuous Integration builds don’t need durable build products to be beneficial. They are a way for a developer to have a conversation with the system to gain reassurance that they have done their part.
Both must be used
Pooja Mantri Continuous Integration
Benefits of Continuous Integration
It minimizes integration risk.
It supports easier defect diagnosis.
Frequent Deployment
It saves time creating releases.
Encourages good testing habits
It enables other good development practices…
Pooja Mantri Continuous Integration
C.I. Enables other Practices
Test Driven Development
Fewer bugs, less time debugging
Confidence to refactor
Executable Documentation
Validation that you are complete
Release Management
Builds are centralized
Builds are repeatable/re-creatable
Modifications are clearly mapped to releases
Issues are clearly mapped to releases and thus to modifications
Releases are only created with committed code
Digitally signed code
Enforcement of Company Development Policy
Automate policy tests with Checkstyle
Manual code reviews can focus on design not syntax
0 comments
Post a comment