Using Continuous Integration to Ensure Project HealthBart LoweSenior Consultant
Continuous IntegrationContinuous 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 FowlerContrary to popular belief, continuous integration is an attitude, not a tool.--James Shore
Continuous IntegrationSource ControlAutomated BuildsSelf-Testing BuildsAutomated DeploymentContinuous Integration Server
Source ControlDevelopers 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 BuildsEnsures that your build is documented & repeatable.TipsBuild 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 BuildsUnit TestingTest Driven Development Failed Tests should cause the build to failTool: NunitCode Coverage TestingTests the how much of your code is exercised by your unit tests.Tool: NCoverCode AnalysisValidates conformance to design guidelines.Tool: FxCop
Automatic DeploymentDeployments 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 deploymentCreate deployment scripts with every build.
Continuous Integration ServerA 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 breaksAllows you to see detailed test resultsProvides build history reporting
Helpful LinksCruise Control .Nethttp://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NETNant taskshttp://nant.sourceforge.net/release/0.85/help/tasks/FxCophttp://www.gotdotnet.com/Team/FxCop/Nunithttp://www.nunit.org/
Other Tools NdocAutomatic class library documentationhttp://ndoc.sourceforge.net/WatirRuby based web application testinghttp://wtr.rubyforge.org/FitnesseAllows non-technical users to define acceptance testshttp://fitnesse.org/Simian	Looks for duplication in large software code bases.http://www.redhillconsulting.com.au/products/simian/
For Presentation Slides & Files Emailbart.lowe@decisionsource.com
Using Continuous Integration To Ensure Project Health New

Using Continuous Integration To Ensure Project Health New

  • 1.
    Using Continuous Integrationto Ensure Project HealthBart LoweSenior Consultant
  • 2.
    Continuous IntegrationContinuous Integrationis 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 FowlerContrary to popular belief, continuous integration is an attitude, not a tool.--James Shore
  • 3.
    Continuous IntegrationSource ControlAutomatedBuildsSelf-Testing BuildsAutomated DeploymentContinuous Integration Server
  • 4.
    Source ControlDevelopers shouldcommit 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).
  • 6.
    Automatic BuildsEnsures thatyour build is documented & repeatable.TipsBuild 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.
  • 7.
    Self Testing BuildsUnitTestingTest Driven Development Failed Tests should cause the build to failTool: NunitCode Coverage TestingTests the how much of your code is exercised by your unit tests.Tool: NCoverCode AnalysisValidates conformance to design guidelines.Tool: FxCop
  • 8.
    Automatic DeploymentDeployments canbe 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 deploymentCreate deployment scripts with every build.
  • 9.
    Continuous Integration ServerAContinuous 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 breaksAllows you to see detailed test resultsProvides build history reporting
  • 10.
    Helpful LinksCruise Control.Nethttp://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NETNant taskshttp://nant.sourceforge.net/release/0.85/help/tasks/FxCophttp://www.gotdotnet.com/Team/FxCop/Nunithttp://www.nunit.org/
  • 11.
    Other Tools NdocAutomaticclass library documentationhttp://ndoc.sourceforge.net/WatirRuby based web application testinghttp://wtr.rubyforge.org/FitnesseAllows non-technical users to define acceptance testshttp://fitnesse.org/Simian Looks for duplication in large software code bases.http://www.redhillconsulting.com.au/products/simian/
  • 12.
    For Presentation Slides& Files Emailbart.lowe@decisionsource.com

Editor's Notes

  • #3 Describe Continuous Integration as an example.
  • #5 No Demos needed here.
  • #6 Talk about build process at a high level before drilling into details.
  • #7 Describe and showReference App functionality and architecture.Describe whatNant is.Walk through Nant Script through the compilation step.
  • #8 Show Nunit GUIShow FxCop GUIWalk through Nunit and FxCop steps in build scriptDemonstrate what happens when a unit test fails.
  • #9 Show Deployment script section of Build Script.Discuss process for deploying database scripts.Show resulting scripts
  • #10 Show Cruise Control .netShow cctrayDemonstrate what happens when a build is triggered.