SlideShare a Scribd company logo
1 of 45
Download to read offline
PHP North West 2010




                    The Journey Towards
                   Continuous Integration




Sebastian Marek, Senior Software Engineer
@proofek

 a Pole living in Sheffield
 nearly 10 years PHP
  experience
 co-author of 2 PHP books
 big fan of process
  automation
 TDD and CI
 wants to be a knight
One Morning Long Ago
New experience

   Alpha-box set up
   New development processes
   Staging platform and QA team
   Deployment procedures
   Fixing problems
   Working on projects
At the Foot of Mount Doom

              increased maintenance
               time
              growing problem
               numbers
              code harder to
               understand and follow
              complex and time
               consuming testing
Looking for help!
First frustrations

   ad hoc builds
   mixture of php3 and php4
   learn as you go
   no standards
Forming up the fellowship

   Stuart Grimshaw
   Simon Westcott
   Ben Selby
   Sebastian Marek
   Rowan Merewood
   Ben Longden
Calling the council

                                      Who?
                                       managers
                                       developers

                                      What?
                                       threats
                                       opportunities
                                       planning
                                       implementation



http://www.flickr.com/photos/pedromourapinheiro/3272323691/in/photostream/
It's always about the money

 Design debt
 Late fees
 Interests




  http://www.flickr.com/photos/your_teacher/1040476355/in/photostream/
Finding the best way




          VS.
Support & roadmap




http://www.flickr.com/photos/jannem/3312115991/in/photostream/
Metrics and reports




http://www.flickr.com/photos/aussiegall/286709039/in/photostream/
Joining more powerful allies
Automation




http://www.flickr.com/photos/matthileo/3552898254/in/photostream/
East front
Automated builds

 Cruicecontrol addon
 PHPUnit integration
 phpDocumentor
  integration
 code metrics generation
 code coverage reports
 checkstyle report
  integration
 PHP Depend integration
 PHPMD support
 and many more
PHPUnit

Industry recognised xUnit testing framework for PHP,
supporting:
 mock objects
 database testing
 code coverage analysis

integrating
 selenium RC
 continuous integration platforms like CruiseControl,
   Hudson, Bamboo
phpDocumentor

        automated
         documentation for PHP
        supports different
         formats: HTML, PDF,
         CHM, XML
        web and cli interface
        easily configurable
PHP_Codesniffer

   Based on defined coding standards
   Detects coding standards violation
   Extendable and configurable
   Codebrowser
Code coverage report

   Be always on top of your tests
   Code coverage ratio
   Configurable thresholds
   Clover format
   Html format
Software metrics - PHP Depend

Code measures
 Cyclomatic Complexity
 NPath Complexity
 CodeRank
 Lines Of Code
PHP Mess Detector

         Intelligent code analyser
          Possible bugs
          Suboptimal code
          Overcomplicated
            expressions
          Unused parameters,
            methods, properties
Buildbox maintenance

   New modules added
   Increasing build time
   Often crashes
   Stability problems
   Hardware issues
phpUnderControl
Upgrades needed
Hudson – next generation

   easy installation
   easy configuration
   plugin support
   distributed builds
   multi-language support
   dependency tracking
Hudson
More automation

 git - distributed version control system
 AIE – alpha integrated environment
 capistrano
    automated deployment
    build script management
Selenium

     Automated web apps
      testing
     Regression testing
     Headless builds
One ring to rule them all




http://www.flickr.com/photos/cosmic_bandita/2218419160/in/photostream/
West front
Sonar

 quality management
  platform
 continuous analysis
 easily extendable and
  configurable
Sonar
Business wide visibility

   Meaningful reports
   Responsibility and ownership
   KPI
   Goals
Radiator view
Reports
The army needs to follow the leader

   Lead by example
   firm, but friendly and helpful
   never forget about training
   clear and simple rules
   praise vs. punishment
You broke the build!
Where's the build?
Works on my machine?!
It's your time now
Quick guide

1. Investigate
2. Trial
3. Form a team
4. Small steps
5. Be visible
6. Automate
Resources

   PHPUnit - http://www.phpunit.de/
   phpUnderControl - http://phpundercontrol.org/
   Hudson - http://hudson-ci.org/
   Sonar - http://www.sonarsource.org/
   phpDocumentor - http://www.phpdoc.org/
   PHP_CodeSniffer -
    http://pear.php.net/package/PHP_CodeSniffer/
   PHP Depend - http://pdepend.org/
   PHP Mess Detector - http://phpmd.org/
   Selenium - http://seleniumhq.org/
   xDebug - http://www.xdebug.org/
Q&A




Any questions?

  http://joind.in/2052

More Related Content

More from Sebastian Marek

vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking
Sebastian Marek
 

More from Sebastian Marek (9)

Effective code reviews
Effective code reviewsEffective code reviews
Effective code reviews
 
Effective code reviews
Effective code reviewsEffective code reviews
Effective code reviews
 
PHP Forum Paris 2012: Magic behind the numbers. Software metrics in practice
PHP Forum Paris 2012: Magic behind the numbers. Software metrics in practicePHP Forum Paris 2012: Magic behind the numbers. Software metrics in practice
PHP Forum Paris 2012: Magic behind the numbers. Software metrics in practice
 
Ten Commandments Of A Software Engineer
Ten Commandments Of A Software EngineerTen Commandments Of A Software Engineer
Ten Commandments Of A Software Engineer
 
PHP Benelux 2012: Magic behind the numbers. Software metrics in practice
PHP Benelux 2012: Magic behind the numbers. Software metrics in practice PHP Benelux 2012: Magic behind the numbers. Software metrics in practice
PHP Benelux 2012: Magic behind the numbers. Software metrics in practice
 
Magic behind the numbers - software metrics in practice
Magic behind the numbers - software metrics in practiceMagic behind the numbers - software metrics in practice
Magic behind the numbers - software metrics in practice
 
Back to basics - PHP_Codesniffer
Back to basics - PHP_CodesnifferBack to basics - PHP_Codesniffer
Back to basics - PHP_Codesniffer
 
Sonar - the ring to rule them all
Sonar - the ring to rule them allSonar - the ring to rule them all
Sonar - the ring to rule them all
 
vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

The Journey towards Continuous Integration