code check in dance

Upload: fractels

Post on 03-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 code Check in Dance

    1/25

    Daniel Teng

    December 2005

  • 7/28/2019 code Check in Dance

    2/25

  • 7/28/2019 code Check in Dance

    3/25

    Introduced by Martin Fowler and MatthewFoemmel

    Continuous integration is the strategy ofmaking sure that changes to the projectscodebase are built, tested and reported on assoon as possible after they are introduced.

    The rebuild, retest and (optional) redeploy of asystem with every change to that system

  • 7/28/2019 code Check in Dance

    4/25

  • 7/28/2019 code Check in Dance

    5/25

    Keep a single place where all the source codelives and where anyone can obtain the currentsources from (and previous versions)

    Automate the build process so that anyone canuse a single command to build the system fromthe sources

    Automate the testing so that you can run agood suite of tests on the system at any timewith a single command

    Make sure anyone can get a current executablewhich you are confident is the best executableso far.

  • 7/28/2019 code Check in Dance

    6/25

    CruiseControl.NET CruiseControl.NET is a more heavyweight and complete

    application, being a port of the granddaddy of CI tools, the

    original CruiseControl for Java. Developed by Thoughworks

    ships with a web-based interface for monitoring and launchingall of your managed builds as well as a rich toolset forcapturing, storing and reporting the build results

    Draco.NET Draco.NET is a free, open source tool from Chive Software

    Written in .NET and runs as a Windows service

    a server install plus a client utilities package

    Others: Sin

  • 7/28/2019 code Check in Dance

    7/25

  • 7/28/2019 code Check in Dance

    8/25

    Check in as often as you can Avoid stale code Don't ever check into or out of a busted build

    Communicate and negotiate check in's to therest of the team If you're working on fixing the build, let the

    rest of the team know DON'T LEAVE THE BUILD BROKEN

    OVERNIGHT Not every member of the team needs to be a

    full-fledged "BuildMaster," but every developerneeds to know how to execute a build locally

    and troubleshoot a broken build

  • 7/28/2019 code Check in Dance

    9/25

    Get the latest code from source control. Do a merge on any conflicts. Run the build locally and fix any problems

    found (including UT, FxCop and NCoverproblems ).

    Peer Review Let the rest of the team know a change is

    coming if it's a significant update. Commit the changes to source control. Stop coding until the build passes. If the build breaks, drop everything else and fix

    the build.

  • 7/28/2019 code Check in Dance

    10/25

    Fig. 1 Fig. 2

    Fig. 3 Fig. 4

  • 7/28/2019 code Check in Dance

    11/25

  • 7/28/2019 code Check in Dance

    12/25

    People over Tools and Processes

    People are always human

    Catch environment setup needs

  • 7/28/2019 code Check in Dance

    13/25

    Installation

    Doc the documentation folder

    Server this is where the main CC.NET server andconfiguration files live

    Webdashboard the central web application formonitoring all the projects

    Configuring the Server Configuring the Projects

  • 7/28/2019 code Check in Dance

    14/25

    Main Settings

    Labeller Block

    Source Control Blocks Task Blocks

    Trigger blocks

  • 7/28/2019 code Check in Dance

    15/25

  • 7/28/2019 code Check in Dance

    16/25

    Source Control SystemsCVS, SubVersion,VSS, Perforce, Rational ClearCase

    .NET Tools Build toolsNAnt, Visual Studio .NET

    MSBuild

    Test, Coverage and Metric toolsNUnit, FxCop,NCover, Vil, Simian, MBUnit

    Java Tools: Ant, JUnit

  • 7/28/2019 code Check in Dance

    17/25

    A .NET Build Tool

    Initially imported from Ant

    extended using task classes

    configuration files are XML-based,

    calling out a target tree where various tasks getexecuted

    Each task is run by an object that implements aparticular Task interface

    http://nant.sourceforge.net/

  • 7/28/2019 code Check in Dance

    18/25

    A unit-testing framework for all .Net languages

    Initially ported from JUnit http://www.nunit.org/

  • 7/28/2019 code Check in Dance

    19/25

    A code analysis tool that checks .NET managed codeassemblies for conformance to the Microsoft .NETFramework Design Guidelines

    Uses reflection, MSIL parsing, and callgraph analysis toinspect assemblies for more than 200 defects in thefollowing areas: Library design

    Localization

    Naming conventions Performance

    Security

    Customizable

    http://www.gotdotnet.com/team/fxcop/

  • 7/28/2019 code Check in Dance

    20/25

    A test code coverage tool for C# .NET Highlighting areas of code which are not being

    exercised by your tests Reports the percentage of branches throughout

    the course of your automated testing Code coverage can help by identifying:

    Areas of code that need additional testing. Dead code (code that doesn't do anything either

    because it should be deleted or due to a bug). Dead files not included in solutions but still in CVS.

    http://ncover.sourceforge.net/

  • 7/28/2019 code Check in Dance

    21/25

    Provides metrics, visualization, querying, andanalysis of .NET assemblies, classes, and methodsfor all .NET languages

    provides an easy means of rapidly filtering andsorting through thousands of classes andmethods in multiple assemblies to find codemeeting specific criteria, generate bulk reports, orto help answer questions.... Which code most needs a code review, refactoring, or

    unit tests? Which developers need more mentoring in design and

    coding practices?

    http://www.1bot.com/index.html

  • 7/28/2019 code Check in Dance

    22/25

  • 7/28/2019 code Check in Dance

    23/25

    http://www.martinfowler.com/articles/continuousIntegration.html

    http://confluence.public.thoughtworks.org/di

    splay/CCNET/Welcome+to+CruiseControl.NET

    http://cruisecontrol.sourceforge.net/

    http://codebetter.com/blogs/jeremy.miller/default.aspx

    http://www.martinfowler.com/articles/continuousIntegration.htmlhttp://www.martinfowler.com/articles/continuousIntegration.htmlhttp://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NEThttp://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NEThttp://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NEThttp://codebetter.com/blogs/jeremy.miller/default.aspxhttp://codebetter.com/blogs/jeremy.miller/default.aspxhttp://codebetter.com/blogs/jeremy.miller/default.aspxhttp://codebetter.com/blogs/jeremy.miller/default.aspxhttp://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NEThttp://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NEThttp://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NEThttp://www.martinfowler.com/articles/continuousIntegration.htmlhttp://www.martinfowler.com/articles/continuousIntegration.html
  • 7/28/2019 code Check in Dance

    24/25

  • 7/28/2019 code Check in Dance

    25/25