Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Continuous Integration Challenges and Benefits Fran çois Beauregard [email_address]
Plan <ul><li>Introduction </li></ul><ul><li>Benefits </li></ul><ul><li>How often? </li></ul><ul><li>Define a successful bu...
Introduction <ul><li>Well known practice (daily build, …) but rarely done properly </li></ul><ul><li>eXtreme Programming h...
Benefits <ul><li>Fundamental development pattern shift; People really feel they are working as a team (not solo) </li></ul...
How Often ? <ul><li>At least daily </li></ul><ul><li>It depends on the characteristics of the project </li></ul><ul><li>Th...
What is a Successful Build <ul><li>Seems an obvious question but sometimes … </li></ul><ul><ul><li>Latest source from the ...
Build failure <ul><li>If a build fails, take immediate action. </li></ul>
Central Source Repository <ul><li>Use a configuration management system (ie CVS, StarTeam, SourceSafe, …) </li></ul><ul><l...
Automated Build Scripts <ul><li>Use a build script tool (ie Ant, make, …) </li></ul><ul><li>…  Even if you use an IDE </li...
Self-Testing Code <ul><li>Just compiling is not enough </li></ul><ul><li>Have automated tests (ie JUnit, xUnit) </li></ul>...
Central (Master) Build <ul><li>Have a machine that produces master builds for the whole team </li></ul><ul><li>Use a tool ...
Cruise Control (Success)
Cruise Control (Failure)
Anthill
Challenges and Other Tools <ul><li>Database and test data </li></ul><ul><ul><li>All Java Database </li></ul></ul><ul><ul><...
The Missing Pieces <ul><li>Tools need to be better integrated. For example with task management system </li></ul><ul><li>V...
Conclusion <ul><li>Done properly, continuous integration gives huge benefits related to developers productivity and qualit...
The real challenge when implementing Continuous Integration is to stick to it. Wether you call your approach agile or some...
References <ul><li>Article </li></ul><ul><ul><li>Continuous Integration  by Martin Fowler and Matthew Foemmel (http://mart...
Upcoming SlideShare
Loading in …5
×

Continuous Integration

1,258 views

Published on

Published in: Technology
  • Be the first to comment

Continuous Integration

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

×