Continuous Integration Challenges and Benefits Fran çois Beauregard [email_address]
Plan Introduction Benefits How often? Define a successful build Main Practices Central Source Repository Automated Build Script Self-Testing Code Master Build Commit Work Often Challenges A Look at the Future
Introduction Well known practice (daily build, …) but rarely done properly eXtreme Programming hype creates revived interest Good tools are starting to appear
Benefits Fundamental development pattern shift; People really feel they are working as a team (not solo) Saves errors caused by people stepping on someone else’s work With continuous integration bugs manifest themselves fast. This greatly reduces the scope of search for the bug INCREASED PRODUCTIVITY INCREASED QUALITY
How Often ? At least daily It depends on the characteristics of the project The more often, the least effort to carry an integration Has to be (almost) automated
What is a Successful Build Seems an obvious question but sometimes … Latest source from the configuration management system Every file compiled from scratch Resulting object file are packaged (jar) for execution The system is started and a suite of tests (ie JUnit) is run against the system
Build failure If a build fails, take immediate action.
Central Source Repository Use a configuration management system (ie CVS, StarTeam, SourceSafe, …) All source files should be kept in the configuration management system
Automated Build Scripts Use a build script tool (ie Ant, make, …) … Even if you use an IDE
Self-Testing Code Just compiling is not enough Have automated tests (ie JUnit, xUnit) Unit tests (should be complete) Acceptance (difficult to issue complete coverage using automated tests => Prioritize by business value) Tests must be executed as part of the build process For more information on Test Driven Development, read Kent Beck’s book
Central (Master) Build Have a machine that produces master builds for the whole team Use a tool such as CruiseControl or Anthill to coordinate build execution Have developers commit their work in the Configuration management system often (roughly once a day) or you will loose almost all benefits from continuous integration
Cruise Control (Success)
Cruise Control (Failure)
Anthill
Challenges and Other Tools Database and test data All Java Database DBUnit J2EE Container (Web, EJB, JMS) Cactus JUnitEE Design for testing Other JUnit Extensions (see http://junit.org)
The Missing Pieces Tools need to be better integrated. For example with task management system Very few tools do multi-project dependencies properly CruiseControl ( http://cruisecontrol.sourceforge.net/ ) Maven (http://maven.apache.org) Centipede (http://www.krysalis.org/centipede/) Anthill ( http://www.urbancode.com/projects/anthill )
Conclusion Done properly, continuous integration gives huge benefits related to developers productivity and quality of the software produced Good tools are starting to emerge. Especially in the Java world Stick to it, even under pressure
The real challenge when implementing Continuous Integration is to stick to it. Wether you call your approach agile or something else doesn't matter -- results do. The goal is to balance forces to develop software intelligently. In my opinion, this approach requires brutal honesty all the time. It requires radical commitment so you don't buckle under the constant pressure to quit and do things the old way. It also takes skills. Roy W. Miller
References Article Continuous Integration by Martin Fowler and Matthew Foemmel (http://martinfowler) Web Sites Cruise Control (http://cruisecontrol.sourceforge.net/) Anthill (http://www.urbancode.com/projects/anthill) Book Java Development with Ant by Erik Hatcher Software Configuration Management Patterns: Effective Teamwork, Practical Integration by Stephen P. Berczuk and Brad Appleton Thank You !

Continuous Integration

  • 1.
    Continuous Integration Challengesand Benefits Fran çois Beauregard [email_address]
  • 2.
    Plan Introduction BenefitsHow often? Define a successful build Main Practices Central Source Repository Automated Build Script Self-Testing Code Master Build Commit Work Often Challenges A Look at the Future
  • 3.
    Introduction Well knownpractice (daily build, …) but rarely done properly eXtreme Programming hype creates revived interest Good tools are starting to appear
  • 4.
    Benefits Fundamental developmentpattern shift; People really feel they are working as a team (not solo) Saves errors caused by people stepping on someone else’s work With continuous integration bugs manifest themselves fast. This greatly reduces the scope of search for the bug INCREASED PRODUCTIVITY INCREASED QUALITY
  • 5.
    How Often ?At least daily It depends on the characteristics of the project The more often, the least effort to carry an integration Has to be (almost) automated
  • 6.
    What is aSuccessful Build Seems an obvious question but sometimes … Latest source from the configuration management system Every file compiled from scratch Resulting object file are packaged (jar) for execution The system is started and a suite of tests (ie JUnit) is run against the system
  • 7.
    Build failure Ifa build fails, take immediate action.
  • 8.
    Central Source RepositoryUse a configuration management system (ie CVS, StarTeam, SourceSafe, …) All source files should be kept in the configuration management system
  • 9.
    Automated Build ScriptsUse a build script tool (ie Ant, make, …) … Even if you use an IDE
  • 10.
    Self-Testing Code Justcompiling is not enough Have automated tests (ie JUnit, xUnit) Unit tests (should be complete) Acceptance (difficult to issue complete coverage using automated tests => Prioritize by business value) Tests must be executed as part of the build process For more information on Test Driven Development, read Kent Beck’s book
  • 11.
    Central (Master) BuildHave a machine that produces master builds for the whole team Use a tool such as CruiseControl or Anthill to coordinate build execution Have developers commit their work in the Configuration management system often (roughly once a day) or you will loose almost all benefits from continuous integration
  • 12.
  • 13.
  • 14.
  • 15.
    Challenges and OtherTools Database and test data All Java Database DBUnit J2EE Container (Web, EJB, JMS) Cactus JUnitEE Design for testing Other JUnit Extensions (see http://junit.org)
  • 16.
    The Missing PiecesTools need to be better integrated. For example with task management system Very few tools do multi-project dependencies properly CruiseControl ( http://cruisecontrol.sourceforge.net/ ) Maven (http://maven.apache.org) Centipede (http://www.krysalis.org/centipede/) Anthill ( http://www.urbancode.com/projects/anthill )
  • 17.
    Conclusion Done properly,continuous integration gives huge benefits related to developers productivity and quality of the software produced Good tools are starting to emerge. Especially in the Java world Stick to it, even under pressure
  • 18.
    The real challengewhen implementing Continuous Integration is to stick to it. Wether you call your approach agile or something else doesn't matter -- results do. The goal is to balance forces to develop software intelligently. In my opinion, this approach requires brutal honesty all the time. It requires radical commitment so you don't buckle under the constant pressure to quit and do things the old way. It also takes skills. Roy W. Miller
  • 19.
    References Article ContinuousIntegration by Martin Fowler and Matthew Foemmel (http://martinfowler) Web Sites Cruise Control (http://cruisecontrol.sourceforge.net/) Anthill (http://www.urbancode.com/projects/anthill) Book Java Development with Ant by Erik Hatcher Software Configuration Management Patterns: Effective Teamwork, Practical Integration by Stephen P. Berczuk and Brad Appleton Thank You !