10. Continuous Integration Flashcards
problems/ risks in integration
- spend more time integrating than creating new features
- problems occur as software evolves due to concurrent development
- problems worsen when develop tries to:
- integrate large change to code base
- infrequent new feature integration
However, continuous integration is not without its risks and challenges:
Continuous integration tools have to be introduced and maintained
The continuous integration process must be defined and established
Test automation requires additional resources and can be complex to establish
Thorough test coverage is essential to achieve automated testing advantages
Teams sometimes over-rely on unit tests and perform too little system and acceptance testing
Continuous integration requires the use of tools, including tools for testing, tools for automating the
build process, and tools for version control.
continuous-integration practices
- change management
- maintain single source repository
- everyone commit to main line everyday
- every commit builds mainline
- everyone can see what is happening - quality assurance
- automate the build
- make build self testing
- test in a clone of the repository
- keep the build fast - deployment
- make it easy for anyone to get latest executable
- automate deployment
late integration
- working on separate copy of source code for implementation
- considerable amount of conflict for merging
what is continuous integration
- split work into small changes
- integrate frequently
- limit effect of exponential rate of divergence of the trunk
feature branching option
- implement new feature on trunk with frequent small commit
- implement new feature on branch and merge frequently
- implement feature as a prototype branch, then re-implement feature on the trunk in small changes
- implement features as permanent branch
maintain multiple continuous integration processes
- main line trunk development
- forked development for specified customer/purpose
- latest stable release only receive defect fixes
- significant feature branch
monitoring and maintaining software quality
- detecting broken builds
- system should be compiled from source in clone repository
- automated regression test executed on complete system
- static analysis checks performed to compare with benchmarks
preventing broken public builds (trunk)
flow…
preventing broken public builds (branches)
flow…
staging environment
- environment configured to replicate conditions that software will be used in
- configured with current hardware software dependencies
- changes need to be checked before release
- more than 1 staging environment may be needed.
limitation of staging environment
- system distributed on too many computing nodes to test realistic scenarios
- system has too many simultaneous users
- too many diverse user types
- only one platform for software is available
- software dependencies cannot be accessed outside of production
monitoring and visibility
push notifications and broadcast mechanism
monitoring metrics
- unsuccessful builds
- average unsuccessful test
- time to build
why are fast build essential
- delays in completing also delays discovery of problems
- developers deterred from making frequent commits as waiting for build to complete reduce productivity
continuous deployment
- automate deploying of software
- advantages:
- ensures that deployment process is used regularly
- different features can be deployed to differentiate users
Q
What is Continuous Integration?
Delivery of a product increment requires reliable, working, integrated software at the end of every sprint. Continuous integration addresses this challenge by merging all changes made to the software and integrating all changed components regularly, at least once a day. Configuration management, compilation, software build, deployment, and testing are wrapped into a single, automated, repeatable process. Since developers integrate their work constantly, build constantly, and test constantly, defects in code are detected more quickly.
What does the continuous integration process consists of?
Static code analysis: executing static code analysis and reporting results
Compile: compiling and linking the code, generating the executable files
Unit test: executing the unit tests, checking code coverage and reporting test results
Deploy: installing the build into a test environment
Integration test: executing the integration tests and reporting results
Report (dashboard): posting the status of all these activities to a publicly visible location or e-
mailing status to the team
How does continuous integration allows Agile testers to run automated tests regularly?
An automated build and test process takes place on a daily basis and detects integration errors early and quickly.
Continuous integration allows Agile testers to run automated tests regularly, in some cases as part of the continuous integration process itself, and send quick feedback to the team on the quality of the code. These test results are visible to all team members, especially when automated reports are integrated into the process.
Automated regression testing can be continuous throughout the iteration.
Good automated regression tests cover as much functionality as possible, including user stories delivered in the previous iterations.
Good coverage in the automated regression tests helps support building (and testing) large integrated systems. When the regression testing is automated, the Agile testers are freed to concentrate their manual testing on new features, implemented changes, and confirmation testing of defect fixes.
In addition to automated tests, organizations using continuous integration typically use?
In addition to automated tests, organizations using continuous integration typically use build tools to implement continuous quality control.
In addition to running unit and integration tests, such tools can run additional static and dynamic tests, measure and profile performance, extract and format documentation from the source code, and facilitate manual quality assurance processes.
This continuous application of quality control aims to improve the quality of the product as well as reduce the time taken to deliver it by replacing the traditional practice of applying quality control after completing all development.
What can build tools be used for?
uild tools can be linked to automatic deployment tools, which can fetch the appropriate build from the continuous integration or build server and deploy it into one or more development, test, staging, or even production environments.
This reduces the errors and delays associated with relying on specialized staff or programmers to install releases in these environments.
Continuous integration can provide the following benefits:
Continuous integration can provide the following benefits:
Allows earlier detection and easier root cause analysis of integration problems and conflicting
changes
Gives the development team regular feedback on whether the code is working
Keeps the version of the software being tested within a day of the version being developed
Reduces regression risk associated with developer code refactoring due to rapid re-testing of
the code base after each small set of changes
Provides confidence that each day’s development work is based on a solid foundation
Makes progress toward the completion of the product increment visible, encouraging
developers and testers
Eliminates the schedule risks associated with big-bang integration
Provides constant availability of executable software throughout the sprint for testing,
demonstration, or education purposes
Reduces repetitive manual testing activities
Provides quick feedback on decisions made to
improve quality and tests