SlideShare ist ein Scribd-Unternehmen logo
1 von 46
Downloaden Sie, um offline zu lesen
Continuous Integration in PHP
    Why, what and how?
             Wilco Jansen

              October 4th 2009

      Tdose, at the Fontys University of
  Applied Science in Eindhoven, Netherlands
Wilco Jansen


Formerly Involved in Joomla
•   Board member Open Source matters
•   Core team member
•   (first ever) Development coordinator
•   Creator of the Joomla bug-squad
•   Google Summer of Code program
    manager 2006, 2007 and 2008 editions
•   Google Highly Open participation content program manager in
    2008
This presentation is about development tools
Continuous integration in PHP
That help build better software in PHP
Things to think about before you run out of time...
Tools will solve some problems
Why use continuous integration?


●   The earliest possible detection of problems in the software
●   Detection of integration problems, no last minute hiatus
    before releases
●   Early warning of broken/incompatible code
●   Early warning of conflicting changes
●   Immediate unit testing of all changes
●   Constant availability of a “current” build for testing, demo
    or release purposes
●   The immediate impact of checking in incomplete or broken
    code acts as an incentive to developers to learn to work
    more incrementally with shorter feedback cycles
Why use continuous integration?
The classic approach
The classic approach


●   Write a test program (or be the tester)
●   Run the test program (or perform the test
    yourself)
●   Manually verify the output
●   Delete the test program
A fundamental shift
Continuous integration emerged from Extreme
                programming
Question you would like to answer...
Does my code work?

                   And
Does it still work after I committed new code?
Agile approach
Write a unit test!




●   Executable specification
●   Automatic evaluation
●   A simple test environment
●   Instant feedback
●   Used as regression test
Detect problems in the earliest possible stage
●   Defacto standard for unit testing of PHP
    applications
●   Member of the xUnit family
●   Inspired by tools like Junit, TestNG, Junitour,
    JExample etc.
●   Latest stable version 3.4.0 (released 16
    September 2009)
Things to keep in mind...
Unit tests should run in less than 1 ms
Software testing categories


●   Small – Unit tests
    ●   Check conditional logic in the code
    ●   No debugger required
    ●   Runs in less than 1 ms
●   Small – Functional tests
    ●   Check whether the interface between classes abide
        by their contacts
Does PHP Unit only run tests?
Other things PHPUnit can do



●   Skeleton generation
●   Integration of Selennium
PHP Unit and code coverage analyses
PHP Unit and code coverage analyses


●   Helps you with analyzing which statements,
    branches and paths are executed within the
    test run:
    ●   Statement coverage
    ●   Branch coverage
    ●   Path coverage
●   100% code coverage is preferred, but does not
    say anything about the test completeness!
Coding standards...
PHP Code Sniffer (phpcs)
PHP Code Sniffer “Sniffs”...


●   PHP
●   Javascript
●   CSS
To detect violations of defined coding standards
with as main goal to ensure code remains clean
and consistent.
Following coding standards are default available:
MySource, PHPCS, Zend, PEAR and Squiz
An example run
Other available tools


 ●   PHP copy/paste detector
 ●   PHP Depend – software metric tool
 ●   PHP Loc – Lines of code analyses
 ●   PHP PMD – Project Mess Detector




Note: only copy/paste detection will be part of this presentation
Copy/paste detection
Code duplication (phpcd)


●   Code is marked duplicate when two sequences
    of code are:
    ●   Textually identical
    ●   Token for token identical
    ●   Functionally identical
●   Problems
    ●   Duplication of code contradicts code reuse
    ●   Co-evolution of clones hinders maintenance
Example run
How it all can be put together?
Pick your continuous build environment
General mode of operation


●   Developer commits code
●   Commit triggers a build (initiated by versioning
    system, or by polling the version system)
●   Build script is run
●   Output is processed, notification send
Cruisecontrol and PHPUndercontrol
Ant is used to process the build
Remember...
A fool with a tool is still a fool!
One of the hardest things to express about
       continuous integration is that makes a
  fundamental shift to the whole development
pattern, one that isn't easy to see if you've never
worked in an environment that practices it. In fact
 most people do see this atmosphere if they are
 working solo - because then they only integrate
     with themselves. For many people team
 development just comes with certain problems
     that are part of the territory. Continuous
    integration reduces these problems, in
   exchange for a certain amount of discipline.
The end...


Acknowledgement                              Links
●   Part of this presentation was inspired    ●   PHPUnit - http://www.phpunit.de
    by “The State of QA Tools for PHP”        ●   PHP Code sniffer -
    from Sabastian Bergmann
                                                  http://pear.php.net/package/PHP_CodeSniffer/
About me and this presentation                ●   PHP copy/paste detector -
●   Personal blog can be found on                 http://github.com/sebastianbergmann/phpcpd/
    http://www.jfoobar.org                    ●   Cruisecontrol -
●   Slides will be uploaded to                    http://cruisecontrol.sourceforge.net/
    http://slideshare.net/willebil            ●   PHP Under control - http://phpundercontrol.org/
●   Follow me on twitter:                     ●   Bamboo -
    http://twitter.com/willebil
                                                  http://www.atlassian.com/software/bamboo/
                                              ●   PHP lines of code -
                                                  http://github.com/sebastianbergmann/phploc

Weitere ähnliche Inhalte

Was ist angesagt?

PHPUnit with Magento
PHPUnit with MagentoPHPUnit with Magento
PHPUnit with MagentoTu Hoang
 
Effectively Reuse the Code Between PHP Projects
Effectively Reuse the Code Between PHP ProjectsEffectively Reuse the Code Between PHP Projects
Effectively Reuse the Code Between PHP ProjectsAndrew Yatsenko
 
Behaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with DrupalBehaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with Drupalsmithmilner
 
Continuous testing of a terminal font
Continuous testing of a terminal fontContinuous testing of a terminal font
Continuous testing of a terminal fontRicardo Bánffy
 
Don't Suck at Building Stuff - Mykel Alvis at Puppet Camp Altanta
Don't Suck at Building Stuff  - Mykel Alvis at Puppet Camp AltantaDon't Suck at Building Stuff  - Mykel Alvis at Puppet Camp Altanta
Don't Suck at Building Stuff - Mykel Alvis at Puppet Camp AltantaPuppet
 
TDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and GomegaTDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and GomegaEddy Reyes
 
Test driven development with sonarQube
Test driven development with sonarQubeTest driven development with sonarQube
Test driven development with sonarQubeNanthakumar Suvethan
 
Test Driven Development (TDD) with Windows PowerShell
Test Driven Development (TDD) with Windows PowerShellTest Driven Development (TDD) with Windows PowerShell
Test Driven Development (TDD) with Windows PowerShellHemmerling
 
Workshop: Unit Testing in Python
Workshop: Unit Testing in PythonWorkshop: Unit Testing in Python
Workshop: Unit Testing in PythonDavid Tan
 
Behaviour Driven Development Hands-on
Behaviour Driven Development Hands-onBehaviour Driven Development Hands-on
Behaviour Driven Development Hands-onHemmerling
 
Leaning on the two Ts
Leaning on the two TsLeaning on the two Ts
Leaning on the two TsMani Sarkar
 
Code Quality Control in a PHP project. GeekTalks, Cherkassy 2020
Code Quality Control in a PHP project. GeekTalks, Cherkassy 2020Code Quality Control in a PHP project. GeekTalks, Cherkassy 2020
Code Quality Control in a PHP project. GeekTalks, Cherkassy 2020Andrew Yatsenko
 
Passing the Joel Test in the PHP World (phpbnl10)
Passing the Joel Test in the PHP World (phpbnl10)Passing the Joel Test in the PHP World (phpbnl10)
Passing the Joel Test in the PHP World (phpbnl10)Lorna Mitchell
 
Python debuggers slides
Python debuggers slidesPython debuggers slides
Python debuggers slidesmattboehm
 
Codeception @ New Business Dept Adira Finance
Codeception @ New Business Dept Adira FinanceCodeception @ New Business Dept Adira Finance
Codeception @ New Business Dept Adira FinanceFachrul Choliluddin
 
Automation using RobotFramework for embedded device
Automation using RobotFramework for embedded deviceAutomation using RobotFramework for embedded device
Automation using RobotFramework for embedded deviceSrix Sriramkumar
 

Was ist angesagt? (20)

PHPUnit with Magento
PHPUnit with MagentoPHPUnit with Magento
PHPUnit with Magento
 
Effectively Reuse the Code Between PHP Projects
Effectively Reuse the Code Between PHP ProjectsEffectively Reuse the Code Between PHP Projects
Effectively Reuse the Code Between PHP Projects
 
Behaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with DrupalBehaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with Drupal
 
Continuous testing of a terminal font
Continuous testing of a terminal fontContinuous testing of a terminal font
Continuous testing of a terminal font
 
Framework
FrameworkFramework
Framework
 
Don't Suck at Building Stuff - Mykel Alvis at Puppet Camp Altanta
Don't Suck at Building Stuff  - Mykel Alvis at Puppet Camp AltantaDon't Suck at Building Stuff  - Mykel Alvis at Puppet Camp Altanta
Don't Suck at Building Stuff - Mykel Alvis at Puppet Camp Altanta
 
TDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and GomegaTDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and Gomega
 
Test driven development with sonarQube
Test driven development with sonarQubeTest driven development with sonarQube
Test driven development with sonarQube
 
Test Driven Development (TDD) with Windows PowerShell
Test Driven Development (TDD) with Windows PowerShellTest Driven Development (TDD) with Windows PowerShell
Test Driven Development (TDD) with Windows PowerShell
 
Workshop: Unit Testing in Python
Workshop: Unit Testing in PythonWorkshop: Unit Testing in Python
Workshop: Unit Testing in Python
 
Behaviour Driven Development Hands-on
Behaviour Driven Development Hands-onBehaviour Driven Development Hands-on
Behaviour Driven Development Hands-on
 
Neo4j Graph Database, from PHP
Neo4j Graph Database, from PHPNeo4j Graph Database, from PHP
Neo4j Graph Database, from PHP
 
Leaning on the two Ts
Leaning on the two TsLeaning on the two Ts
Leaning on the two Ts
 
Php unit
Php unitPhp unit
Php unit
 
Code Quality Control in a PHP project. GeekTalks, Cherkassy 2020
Code Quality Control in a PHP project. GeekTalks, Cherkassy 2020Code Quality Control in a PHP project. GeekTalks, Cherkassy 2020
Code Quality Control in a PHP project. GeekTalks, Cherkassy 2020
 
Passing the Joel Test in the PHP World (phpbnl10)
Passing the Joel Test in the PHP World (phpbnl10)Passing the Joel Test in the PHP World (phpbnl10)
Passing the Joel Test in the PHP World (phpbnl10)
 
Python debuggers slides
Python debuggers slidesPython debuggers slides
Python debuggers slides
 
Pair programming
Pair programmingPair programming
Pair programming
 
Codeception @ New Business Dept Adira Finance
Codeception @ New Business Dept Adira FinanceCodeception @ New Business Dept Adira Finance
Codeception @ New Business Dept Adira Finance
 
Automation using RobotFramework for embedded device
Automation using RobotFramework for embedded deviceAutomation using RobotFramework for embedded device
Automation using RobotFramework for embedded device
 

Ähnlich wie Continuous Integration In Php

Codeception: introduction to php testing
Codeception: introduction to php testingCodeception: introduction to php testing
Codeception: introduction to php testingEngineor
 
Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)Engineor
 
Joomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingJoomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingShyam Sunder Verma
 
[ENGLISH] TDC 2015 - PHP Trail - Tests and PHP Continuous Integration Enviro...
[ENGLISH] TDC 2015 - PHP  Trail - Tests and PHP Continuous Integration Enviro...[ENGLISH] TDC 2015 - PHP  Trail - Tests and PHP Continuous Integration Enviro...
[ENGLISH] TDC 2015 - PHP Trail - Tests and PHP Continuous Integration Enviro...Bruno Tanoue
 
Lighning Talk: PHP build process
Lighning Talk: PHP build processLighning Talk: PHP build process
Lighning Talk: PHP build processBryan Agee
 
Pentester++
Pentester++Pentester++
Pentester++CTruncer
 
Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8Sam Becker
 
DevOps presentation
DevOps presentationDevOps presentation
DevOps presentationAxsh Co. LTD
 
Boosting individual feedback with AutoFeedback
Boosting individual feedback with AutoFeedbackBoosting individual feedback with AutoFeedback
Boosting individual feedback with AutoFeedbackAntonio García-Domínguez
 
Stop Sucking at Building Stuff!
Stop Sucking at Building Stuff!Stop Sucking at Building Stuff!
Stop Sucking at Building Stuff!Puppet
 
The New York Times: Sustainable Systems, Powered by Python
The New York Times: Sustainable Systems, Powered by PythonThe New York Times: Sustainable Systems, Powered by Python
The New York Times: Sustainable Systems, Powered by PythonAll Things Open
 
Continuous Integration In A PHP World
Continuous Integration In A PHP WorldContinuous Integration In A PHP World
Continuous Integration In A PHP WorldIdaf_1er
 
The automation of the process of caring for the quality of the code in PHP an...
The automation of the process of caring for the quality of the code in PHP an...The automation of the process of caring for the quality of the code in PHP an...
The automation of the process of caring for the quality of the code in PHP an...Krzysztof (Chris) Ozog
 
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012Blend Interactive
 
Moodle Development Best Pracitces
Moodle Development Best PracitcesMoodle Development Best Pracitces
Moodle Development Best PracitcesJustin Filip
 
Releaseflow: a healthy build and deploy process
Releaseflow: a healthy build and deploy processReleaseflow: a healthy build and deploy process
Releaseflow: a healthy build and deploy processChristopher Cundill
 
Teaching Open Source In The University
Teaching Open Source In The UniversityTeaching Open Source In The University
Teaching Open Source In The UniversityDominique Cimafranca
 

Ähnlich wie Continuous Integration In Php (20)

Codeception: introduction to php testing
Codeception: introduction to php testingCodeception: introduction to php testing
Codeception: introduction to php testing
 
Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)
 
Joomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingJoomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation Testing
 
[ENGLISH] TDC 2015 - PHP Trail - Tests and PHP Continuous Integration Enviro...
[ENGLISH] TDC 2015 - PHP  Trail - Tests and PHP Continuous Integration Enviro...[ENGLISH] TDC 2015 - PHP  Trail - Tests and PHP Continuous Integration Enviro...
[ENGLISH] TDC 2015 - PHP Trail - Tests and PHP Continuous Integration Enviro...
 
Lighning Talk: PHP build process
Lighning Talk: PHP build processLighning Talk: PHP build process
Lighning Talk: PHP build process
 
Pentester++
Pentester++Pentester++
Pentester++
 
Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8
 
DevOps presentation
DevOps presentationDevOps presentation
DevOps presentation
 
Ui Testing with Ghost Inspector
Ui Testing with Ghost InspectorUi Testing with Ghost Inspector
Ui Testing with Ghost Inspector
 
Boosting individual feedback with AutoFeedback
Boosting individual feedback with AutoFeedbackBoosting individual feedback with AutoFeedback
Boosting individual feedback with AutoFeedback
 
Stop Sucking at Building Stuff!
Stop Sucking at Building Stuff!Stop Sucking at Building Stuff!
Stop Sucking at Building Stuff!
 
The New York Times: Sustainable Systems, Powered by Python
The New York Times: Sustainable Systems, Powered by PythonThe New York Times: Sustainable Systems, Powered by Python
The New York Times: Sustainable Systems, Powered by Python
 
Continuous Integration In A PHP World
Continuous Integration In A PHP WorldContinuous Integration In A PHP World
Continuous Integration In A PHP World
 
The automation of the process of caring for the quality of the code in PHP an...
The automation of the process of caring for the quality of the code in PHP an...The automation of the process of caring for the quality of the code in PHP an...
The automation of the process of caring for the quality of the code in PHP an...
 
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
 
Moodle Development Best Pracitces
Moodle Development Best PracitcesMoodle Development Best Pracitces
Moodle Development Best Pracitces
 
Releaseflow: a healthy build and deploy process
Releaseflow: a healthy build and deploy processReleaseflow: a healthy build and deploy process
Releaseflow: a healthy build and deploy process
 
Teaching Open Source In The University
Teaching Open Source In The UniversityTeaching Open Source In The University
Teaching Open Source In The University
 
Automated testing
Automated testingAutomated testing
Automated testing
 
Daniel Sloof: Magento on HHVM
Daniel Sloof: Magento on HHVMDaniel Sloof: Magento on HHVM
Daniel Sloof: Magento on HHVM
 

Mehr von Wilco Jansen

Wisconsin Jug Presentation
Wisconsin Jug PresentationWisconsin Jug Presentation
Wisconsin Jug PresentationWilco Jansen
 
Cms Bash Groningen Opening talk
Cms Bash Groningen Opening talkCms Bash Groningen Opening talk
Cms Bash Groningen Opening talkWilco Jansen
 
Joomladay Netherlands - Security
Joomladay Netherlands - SecurityJoomladay Netherlands - Security
Joomladay Netherlands - SecurityWilco Jansen
 
Webcast So C 2009, Why Community Matters
Webcast So C 2009, Why Community MattersWebcast So C 2009, Why Community Matters
Webcast So C 2009, Why Community MattersWilco Jansen
 
Joomladay UK - Joomla! Where Are We Now
Joomladay UK - Joomla! Where Are We NowJoomladay UK - Joomla! Where Are We Now
Joomladay UK - Joomla! Where Are We NowWilco Jansen
 
Joomladay UK SEO presentation
Joomladay UK SEO presentationJoomladay UK SEO presentation
Joomladay UK SEO presentationWilco Jansen
 
Joomladay Switzerland - security
Joomladay Switzerland - securityJoomladay Switzerland - security
Joomladay Switzerland - securityWilco Jansen
 
Joomladay Switzerland - Joomla! 1.5 and roadmap to future versions
Joomladay Switzerland - Joomla! 1.5 and roadmap to future versionsJoomladay Switzerland - Joomla! 1.5 and roadmap to future versions
Joomladay Switzerland - Joomla! 1.5 and roadmap to future versionsWilco Jansen
 
Impact Of A Cms Framework Change - Holland Open Netherlands
Impact Of A Cms Framework Change - Holland Open NetherlandsImpact Of A Cms Framework Change - Holland Open Netherlands
Impact Of A Cms Framework Change - Holland Open NetherlandsWilco Jansen
 
2008 04 04 Joomla!Dagen
2008 04 04 Joomla!Dagen2008 04 04 Joomla!Dagen
2008 04 04 Joomla!DagenWilco Jansen
 
Presentatie De Zwerm Groep Vtiger Dutch Joomla!day
Presentatie De Zwerm Groep Vtiger Dutch Joomla!dayPresentatie De Zwerm Groep Vtiger Dutch Joomla!day
Presentatie De Zwerm Groep Vtiger Dutch Joomla!dayWilco Jansen
 
Police Utrecht Web Dutch Joomla! day
Police Utrecht Web Dutch Joomla! dayPolice Utrecht Web Dutch Joomla! day
Police Utrecht Web Dutch Joomla! dayWilco Jansen
 
Joomladagen 2008 Sugar Crm Joomla Bridge Bas Vredeling
Joomladagen 2008   Sugar Crm Joomla Bridge   Bas VredelingJoomladagen 2008   Sugar Crm Joomla Bridge   Bas Vredeling
Joomladagen 2008 Sugar Crm Joomla Bridge Bas VredelingWilco Jansen
 
Joomla10 Joomla15 Migratie
Joomla10 Joomla15 MigratieJoomla10 Joomla15 Migratie
Joomla10 Joomla15 MigratieWilco Jansen
 
Seo Presentation Lars Hilse on the Dutch Joomla!day 5 April 2008
Seo Presentation Lars Hilse on the Dutch Joomla!day 5 April 2008Seo Presentation Lars Hilse on the Dutch Joomla!day 5 April 2008
Seo Presentation Lars Hilse on the Dutch Joomla!day 5 April 2008Wilco Jansen
 
Presentation Angie Radke and Kor Dwarshuis on the Dutch Joomla!day April 5th ...
Presentation Angie Radke and Kor Dwarshuis on the Dutch Joomla!day April 5th ...Presentation Angie Radke and Kor Dwarshuis on the Dutch Joomla!day April 5th ...
Presentation Angie Radke and Kor Dwarshuis on the Dutch Joomla!day April 5th ...Wilco Jansen
 
ACL presentation Hannes Pappenberg on Dutch Joomla!day 5 April 2008
ACL presentation Hannes Pappenberg on Dutch Joomla!day 5 April 2008ACL presentation Hannes Pappenberg on Dutch Joomla!day 5 April 2008
ACL presentation Hannes Pappenberg on Dutch Joomla!day 5 April 2008Wilco Jansen
 

Mehr von Wilco Jansen (20)

Wisconsin Jug Presentation
Wisconsin Jug PresentationWisconsin Jug Presentation
Wisconsin Jug Presentation
 
Cms Bash Groningen Opening talk
Cms Bash Groningen Opening talkCms Bash Groningen Opening talk
Cms Bash Groningen Opening talk
 
Joomladay Netherlands - Security
Joomladay Netherlands - SecurityJoomladay Netherlands - Security
Joomladay Netherlands - Security
 
Webcast So C 2009, Why Community Matters
Webcast So C 2009, Why Community MattersWebcast So C 2009, Why Community Matters
Webcast So C 2009, Why Community Matters
 
Cms Expo Keynote
Cms Expo KeynoteCms Expo Keynote
Cms Expo Keynote
 
Joomladay UK - Joomla! Where Are We Now
Joomladay UK - Joomla! Where Are We NowJoomladay UK - Joomla! Where Are We Now
Joomladay UK - Joomla! Where Are We Now
 
Joomladay UK SEO presentation
Joomladay UK SEO presentationJoomladay UK SEO presentation
Joomladay UK SEO presentation
 
Joomladay Switzerland - security
Joomladay Switzerland - securityJoomladay Switzerland - security
Joomladay Switzerland - security
 
Joomladay Switzerland - Joomla! 1.5 and roadmap to future versions
Joomladay Switzerland - Joomla! 1.5 and roadmap to future versionsJoomladay Switzerland - Joomla! 1.5 and roadmap to future versions
Joomladay Switzerland - Joomla! 1.5 and roadmap to future versions
 
Impact Of A Cms Framework Change - Holland Open Netherlands
Impact Of A Cms Framework Change - Holland Open NetherlandsImpact Of A Cms Framework Change - Holland Open Netherlands
Impact Of A Cms Framework Change - Holland Open Netherlands
 
2008 04 04 Joomla!Dagen
2008 04 04 Joomla!Dagen2008 04 04 Joomla!Dagen
2008 04 04 Joomla!Dagen
 
Presentatie De Zwerm Groep Vtiger Dutch Joomla!day
Presentatie De Zwerm Groep Vtiger Dutch Joomla!dayPresentatie De Zwerm Groep Vtiger Dutch Joomla!day
Presentatie De Zwerm Groep Vtiger Dutch Joomla!day
 
Police Utrecht Web Dutch Joomla! day
Police Utrecht Web Dutch Joomla! dayPolice Utrecht Web Dutch Joomla! day
Police Utrecht Web Dutch Joomla! day
 
Joomladagen 2008 Sugar Crm Joomla Bridge Bas Vredeling
Joomladagen 2008   Sugar Crm Joomla Bridge   Bas VredelingJoomladagen 2008   Sugar Crm Joomla Bridge   Bas Vredeling
Joomladagen 2008 Sugar Crm Joomla Bridge Bas Vredeling
 
Joomla10 Joomla15 Migratie
Joomla10 Joomla15 MigratieJoomla10 Joomla15 Migratie
Joomla10 Joomla15 Migratie
 
Seo Presentation Lars Hilse on the Dutch Joomla!day 5 April 2008
Seo Presentation Lars Hilse on the Dutch Joomla!day 5 April 2008Seo Presentation Lars Hilse on the Dutch Joomla!day 5 April 2008
Seo Presentation Lars Hilse on the Dutch Joomla!day 5 April 2008
 
Presentation Angie Radke and Kor Dwarshuis on the Dutch Joomla!day April 5th ...
Presentation Angie Radke and Kor Dwarshuis on the Dutch Joomla!day April 5th ...Presentation Angie Radke and Kor Dwarshuis on the Dutch Joomla!day April 5th ...
Presentation Angie Radke and Kor Dwarshuis on the Dutch Joomla!day April 5th ...
 
ACL presentation Hannes Pappenberg on Dutch Joomla!day 5 April 2008
ACL presentation Hannes Pappenberg on Dutch Joomla!day 5 April 2008ACL presentation Hannes Pappenberg on Dutch Joomla!day 5 April 2008
ACL presentation Hannes Pappenberg on Dutch Joomla!day 5 April 2008
 
Jd
JdJd
Jd
 
Jd2
Jd2Jd2
Jd2
 

Kürzlich hochgeladen

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 

Kürzlich hochgeladen (20)

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 

Continuous Integration In Php

  • 1. Continuous Integration in PHP Why, what and how? Wilco Jansen October 4th 2009 Tdose, at the Fontys University of Applied Science in Eindhoven, Netherlands
  • 2. Wilco Jansen Formerly Involved in Joomla • Board member Open Source matters • Core team member • (first ever) Development coordinator • Creator of the Joomla bug-squad • Google Summer of Code program manager 2006, 2007 and 2008 editions • Google Highly Open participation content program manager in 2008
  • 3. This presentation is about development tools
  • 5. That help build better software in PHP
  • 6. Things to think about before you run out of time...
  • 7. Tools will solve some problems
  • 8. Why use continuous integration? ● The earliest possible detection of problems in the software ● Detection of integration problems, no last minute hiatus before releases ● Early warning of broken/incompatible code ● Early warning of conflicting changes ● Immediate unit testing of all changes ● Constant availability of a “current” build for testing, demo or release purposes ● The immediate impact of checking in incomplete or broken code acts as an incentive to developers to learn to work more incrementally with shorter feedback cycles
  • 9. Why use continuous integration?
  • 11. The classic approach ● Write a test program (or be the tester) ● Run the test program (or perform the test yourself) ● Manually verify the output ● Delete the test program
  • 13. Continuous integration emerged from Extreme programming
  • 14. Question you would like to answer...
  • 15. Does my code work? And Does it still work after I committed new code?
  • 17. Write a unit test! ● Executable specification ● Automatic evaluation ● A simple test environment ● Instant feedback ● Used as regression test
  • 18. Detect problems in the earliest possible stage
  • 19.
  • 20. Defacto standard for unit testing of PHP applications ● Member of the xUnit family ● Inspired by tools like Junit, TestNG, Junitour, JExample etc. ● Latest stable version 3.4.0 (released 16 September 2009)
  • 21. Things to keep in mind...
  • 22. Unit tests should run in less than 1 ms
  • 23. Software testing categories ● Small – Unit tests ● Check conditional logic in the code ● No debugger required ● Runs in less than 1 ms ● Small – Functional tests ● Check whether the interface between classes abide by their contacts
  • 24. Does PHP Unit only run tests?
  • 25. Other things PHPUnit can do ● Skeleton generation ● Integration of Selennium
  • 26. PHP Unit and code coverage analyses
  • 27. PHP Unit and code coverage analyses ● Helps you with analyzing which statements, branches and paths are executed within the test run: ● Statement coverage ● Branch coverage ● Path coverage ● 100% code coverage is preferred, but does not say anything about the test completeness!
  • 29. PHP Code Sniffer (phpcs)
  • 30. PHP Code Sniffer “Sniffs”... ● PHP ● Javascript ● CSS To detect violations of defined coding standards with as main goal to ensure code remains clean and consistent. Following coding standards are default available: MySource, PHPCS, Zend, PEAR and Squiz
  • 32. Other available tools ● PHP copy/paste detector ● PHP Depend – software metric tool ● PHP Loc – Lines of code analyses ● PHP PMD – Project Mess Detector Note: only copy/paste detection will be part of this presentation
  • 34. Code duplication (phpcd) ● Code is marked duplicate when two sequences of code are: ● Textually identical ● Token for token identical ● Functionally identical ● Problems ● Duplication of code contradicts code reuse ● Co-evolution of clones hinders maintenance
  • 36. How it all can be put together?
  • 37. Pick your continuous build environment
  • 38. General mode of operation ● Developer commits code ● Commit triggers a build (initiated by versioning system, or by polling the version system) ● Build script is run ● Output is processed, notification send
  • 40.
  • 41. Ant is used to process the build
  • 43. A fool with a tool is still a fool!
  • 44. One of the hardest things to express about continuous integration is that makes a fundamental shift to the whole development pattern, one that isn't easy to see if you've never worked in an environment that practices it. In fact most people do see this atmosphere if they are working solo - because then they only integrate with themselves. For many people team development just comes with certain problems that are part of the territory. Continuous integration reduces these problems, in exchange for a certain amount of discipline.
  • 45.
  • 46. The end... Acknowledgement Links ● Part of this presentation was inspired ● PHPUnit - http://www.phpunit.de by “The State of QA Tools for PHP” ● PHP Code sniffer - from Sabastian Bergmann http://pear.php.net/package/PHP_CodeSniffer/ About me and this presentation ● PHP copy/paste detector - ● Personal blog can be found on http://github.com/sebastianbergmann/phpcpd/ http://www.jfoobar.org ● Cruisecontrol - ● Slides will be uploaded to http://cruisecontrol.sourceforge.net/ http://slideshare.net/willebil ● PHP Under control - http://phpundercontrol.org/ ● Follow me on twitter: ● Bamboo - http://twitter.com/willebil http://www.atlassian.com/software/bamboo/ ● PHP lines of code - http://github.com/sebastianbergmann/phploc