Successfully reported this slideshow.
Your SlideShare is downloading. ×

Improving code quality with continuous integration (PHPBenelux Conference 2011)

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 66 Ad

Improving code quality with continuous integration (PHPBenelux Conference 2011)

Download to read offline

Continuous Integration is the combination of any number of the available tools used to improve quality of both code and process. In this session we will look at these available tools and how these can be used. We will also look at Continuous Integration in general and CruiseControl in particular, at how to set it up and built a platform for robust and high-quality code. This session is a must-see for development leaders and technical managers alike, to understand the available options and the advantages offered by this approach.

Continuous Integration is the combination of any number of the available tools used to improve quality of both code and process. In this session we will look at these available tools and how these can be used. We will also look at Continuous Integration in general and CruiseControl in particular, at how to set it up and built a platform for robust and high-quality code. This session is a must-see for development leaders and technical managers alike, to understand the available options and the advantages offered by this approach.

Advertisement
Advertisement

More Related Content

Slideshows for you (20)

Viewers also liked (20)

Advertisement

Similar to Improving code quality with continuous integration (PHPBenelux Conference 2011) (20)

More from Martin de Keijzer (18)

Advertisement

Recently uploaded (20)

Improving code quality with continuous integration (PHPBenelux Conference 2011)

  1. Improving code quality with Continuous Integration Martin de Keijzer PHPBenelux Conference 2011
  2. Martin de Keijzer •Software Engineer at Ibuildings •PHPBenelux board member •Zend Certified Engineer (PHP5) •Twitter: Martin1982 2
  3. Image resources Slide 5: http://labs.specialmoves.com/code/automating-development-tasks-ant-and-hudson/ Slide 9: http://chucktv.net/ Slide 10: http://www.sxc.hu/photo/1269250 Slide 12: http://www.sxc.hu/photo/1139313 Slide 15: http://www.sxc.hu/photo/913679 Slide 24: http://www.sxc.hu/photo/1269809 Slide 30: http://www.sxc.hu/photo/1290413 Your rights missing?? Contact me and I will update the slide. 3
  4. Talk summary •What is Continuous Integration •The structure of a CI environment •Tools for a CI process •Setting up your CI server •Apache Ant •Adding your project •Questions 4
  5. What is Continuous Integration? 5
  6. What is continuous integration? First written of in 1999; originating from the eXtreme Programming community. Martin Fowler Kent Beck 6
  7. What is continuous integration? Wikipedia says: “In software engineering, continuous integration (CI) implements continuous processes of applying quality control — small pieces of effort, applied frequently.” 7
  8. Benefits More work? What will I gain? 8
  9. Benefits of CI 9
  10. Benefits of CI •Detect errors early and often 9
  11. Benefits of CI •Detect errors early and often •Scaleable automation of Quality Assurance 9
  12. Benefits of CI •Detect errors early and often •Scaleable automation of Quality Assurance •Reports for each build 9
  13. Benefits of CI •Detect errors early and often •Scaleable automation of Quality Assurance •Reports for each build •Improvement of your overall codebase 9
  14. Benefits of CI •Detect errors early and often •Scaleable automation of Quality Assurance •Reports for each build •Improvement of your overall codebase •API Documentation 9
  15. Benefits of CI •Detect errors early and often •Scaleable automation of Quality Assurance •Reports for each build •Improvement of your overall codebase •API Documentation •Customer and developer satisfaction 9
  16. The structure 10
  17. The structure Developer A Commits SCM Developer B Git/SVN/etc.. Developer C Revision checks Continuous Integration Server Build Tool Apache Ant Set of quality assurance tools PHPDoc / CodeSniffer / PHPMD / PHPUnit / Pdepend CI Frontend 11
  18. Structure: revision control 12
  19. Structure: revision control 13
  20. Structure: revision control 14
  21. Setting up a CI server 15
  22. Setting up a CI server JRE 1.5+ required for both Hudson / Jenkins + Plugins Cruise control + phpUnderControl 16
  23. Hudson - Dashboard 17
  24. Hudson - Job overview 18
  25. Hudson - Metrics 19
  26. Setting up a CI server Optional Hudson plugin Chuck Norris: 20
  27. phpUnderControl - Dashboard 21
  28. phpUnderControl - Job overview 22
  29. phpUnderControl - Metrics 23
  30. The tools 24
  31. The tools http://www.flickr.com/photos/sebastian_bergmann/ 25
  32. PHPUnit 26
  33. PHPUnit Goal Unit testing Documentation www.phpunit.de Installation PEAR Hudson Plugin xUnit 27
  34. PHPUnit - Hudson 28
  35. PHPUnit - phpUnderControl 29
  36. PHPDocumentor 30
  37. PHPDocumentor Goal Code documentation Documentation www.phpdoc.org Installation PEAR 31
  38. PHPDocumentor - Hudson 32
  39. PHPDocumentor - Hudson 33
  40. PHPDocumentor - phpUC 34
  41. PHP_Codesniffer 35
  42. PHP_CodeSniffer PHP_CodeSniffer Goal Coding standards pear.php.net/ Documentation PHP_CodeSniffer Installation PEAR Hudson plugin Checkstyle 36
  43. PHP_CodeSniffer - Hudson 37
  44. PHP_CodeSniffer - phpUC 38
  45. 39 http://www.sxc.hu/photo/763374
  46. PHPMD Goal Cleaner code Documentation phpmd.org Installation PEAR Hudson plugin PMD 40
  47. PHPMD - Hudson 41
  48. PHPMD - phpUnderControl 42
  49. 43
  50. PHP CPD PHP CPD Goal Copy-paste detection https://github.com/ Documentation sebastianbergmann/ phpcpd Installation PEAR Hudson plugin Violations plugin 44
  51. PHP CPD - Hudson 45
  52. PHP CPD - phpUnderControl 46
  53. Preparing a project Checklist: • Is my project under source control? • Which tools do I want to use for my project? • Do I know the command line options to get the right output? • Are the output formats of my tools supported by the CI server? 47
  54. 48
  55. Apache Ant • XML Based • Multiple jobs • Target - command line job 49
  56. Apache Ant build.xml Starts with: Root tag: 50
  57. Apache Ant - targets 51
  58. Apache Ant - The build target 52
  59. Adding your project 53
  60. Adding your project config.xml 54
  61. Configuring CruiseControl Body Boot source control 55
  62. Configuring CruiseControl Schedule Apache Ant Logging a build 56
  63. Configuring CruiseControl Publishing additional files 57
  64. More plugins • E-mail triggers (PHPUC / Hudson) • Twitter (Hudson) • CodeBrowser (PHPUC) • Selenium (Hudson) • Netbeans plugin for Hudson • iPhoneView (Hudson) • The CI Game (Hudson) 58
  65. Questions ? 59
  66. Thank you! Slides will be available at: http://www.slideshare.com/Martin82 VirtualBox image available per request during the rest of the conference.

Editor's Notes

  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

×