Using Continuous Integration To Ensure Project Health NewPresentation Transcript
Using Continuous Integration to Ensure Project Health Bart Lowe Senior Consultant
Continuous Integration Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly. --Martin Fowler Contrary to popular belief, continuous integration is an attitude, not a tool. --James Shore
Continuous Integration Source Control Automated Builds Self-Testing Builds Automated Deployment Continuous Integration Server
Source Control Developers should commit to the mainline frequently. Ensures problems are found quickly when used in conjunction with self-testing builds. Don’t commit changes that will break the build. Developers should get the latest version and run a local test build before committing changes. Store everything required to ship the product (including database scripts).
Automatic Builds Ensures that your build is documented & repeatable. Tips Build only from a full checkout of source control. Maintain a history of past builds. Make it easy for everyone to get latest executables. Broken builds should be fixed ASAP. Number your builds. Keep your builds fast. Treat build scripts as code. Use a build scripting tool such as Nant.
Self Testing Builds Unit Testing Test Driven Development Failed Tests should cause the build to fail Tool: Nunit Code Coverage Testing Tests the how much of your code is exercised by your unit tests. Tool: NCover Code Analysis Validates conformance to design guidelines. Tool: FxCop
Automatic Deployment Deployments can be just as error prone as builds. Strive for one click deployments. Create a deployment script for each environment (Dev, QA, Production) Include a rollback mechanism in your deployment Create deployment scripts with every build.
Continuous Integration Server A Continuous Integration server brings it all together. Automatically triggers a build when a developer checks in code. Provides a communication center for your build. Records what changes where made since the last build along with who made the changes. Alerts team members when a build breaks Allows you to see detailed test results Provides build history reporting
Helpful Links Cruise Control .Net http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET Nant tasks
Other Tools Ndoc Automatic class library documentation http://ndoc.sourceforge.net/ Watir Ruby based web application testing http://wtr.rubyforge.org/ Fitnesse Allows non-technical users to define acceptance tests http://fitnesse.org/ Simian Looks for duplication in large software code bases. http://www.redhillconsulting.com.au/products/simian/
For Presentation Slides & Files Email email@example.com