Continuous Integration In Php

Wilco Jansen
Wilco JansenProgram manager um Atos Origin
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
Continuous Integration In Php
●   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
Continuous Integration In Php
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.
Continuous Integration In Php
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
1 von 46

Recomendados

Test Driven Development with PHP von
Test Driven Development with PHPTest Driven Development with PHP
Test Driven Development with PHPRogério Vicente
2K views16 Folien
Project Management: Burn-Down Chart / OrangeHRM Project MOD (eng) von
Project Management: Burn-Down Chart / OrangeHRM Project MOD (eng)Project Management: Burn-Down Chart / OrangeHRM Project MOD (eng)
Project Management: Burn-Down Chart / OrangeHRM Project MOD (eng)Anatoliy Okhotnikov
3.4K views11 Folien
Automation testing for beginners on Selenium von
Automation testing for beginners on SeleniumAutomation testing for beginners on Selenium
Automation testing for beginners on Seleniumvaluebound
8.9K views7 Folien
Civilized Git Process von
Civilized Git ProcessCivilized Git Process
Civilized Git ProcessTu Hoang
1K views16 Folien
User story workflow (eng) von
User story workflow (eng)User story workflow (eng)
User story workflow (eng)Anatoliy Okhotnikov
1.7K views14 Folien
MSL2008. Debugging von
MSL2008. DebuggingMSL2008. Debugging
MSL2008. DebuggingJuan A. Suárez Romero
543 views31 Folien

Más contenido relacionado

Was ist angesagt?

PHPUnit with Magento von
PHPUnit with MagentoPHPUnit with Magento
PHPUnit with MagentoTu Hoang
2.4K views35 Folien
Effectively Reuse the Code Between PHP Projects von
Effectively Reuse the Code Between PHP ProjectsEffectively Reuse the Code Between PHP Projects
Effectively Reuse the Code Between PHP ProjectsAndrew Yatsenko
876 views31 Folien
Behaviour Testing and Continuous Integration with Drupal von
Behaviour Testing and Continuous Integration with DrupalBehaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with Drupalsmithmilner
904 views32 Folien
Continuous testing of a terminal font von
Continuous testing of a terminal fontContinuous testing of a terminal font
Continuous testing of a terminal fontRicardo Bánffy
50 views18 Folien
Framework von
FrameworkFramework
FrameworkSeungjoon Lee
134 views28 Folien
Don't Suck at Building Stuff - Mykel Alvis at Puppet Camp Altanta von
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
1.2K views30 Folien

Was ist angesagt?(20)

PHPUnit with Magento von Tu Hoang
PHPUnit with MagentoPHPUnit with Magento
PHPUnit with Magento
Tu Hoang2.4K views
Effectively Reuse the Code Between PHP Projects von Andrew Yatsenko
Effectively Reuse the Code Between PHP ProjectsEffectively Reuse the Code Between PHP Projects
Effectively Reuse the Code Between PHP Projects
Andrew Yatsenko876 views
Behaviour Testing and Continuous Integration with Drupal von smithmilner
Behaviour Testing and Continuous Integration with DrupalBehaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with Drupal
smithmilner904 views
Continuous testing of a terminal font von Ricardo Bánffy
Continuous testing of a terminal fontContinuous testing of a terminal font
Continuous testing of a terminal font
Ricardo Bánffy50 views
Don't Suck at Building Stuff - Mykel Alvis at Puppet Camp Altanta von Puppet
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
Puppet1.2K views
TDD in Go with Ginkgo and Gomega von Eddy Reyes
TDD in Go with Ginkgo and GomegaTDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and Gomega
Eddy Reyes3.2K views
Test Driven Development (TDD) with Windows PowerShell von Hemmerling
Test Driven Development (TDD) with Windows PowerShellTest Driven Development (TDD) with Windows PowerShell
Test Driven Development (TDD) with Windows PowerShell
Hemmerling800 views
Workshop: Unit Testing in Python von David Tan
Workshop: Unit Testing in PythonWorkshop: Unit Testing in Python
Workshop: Unit Testing in Python
David Tan496 views
Behaviour Driven Development Hands-on von Hemmerling
Behaviour Driven Development Hands-onBehaviour Driven Development Hands-on
Behaviour Driven Development Hands-on
Hemmerling716 views
Leaning on the two Ts von Mani Sarkar
Leaning on the two TsLeaning on the two Ts
Leaning on the two Ts
Mani Sarkar2.1K views
Code Quality Control in a PHP project. GeekTalks, Cherkassy 2020 von Andrew Yatsenko
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
Andrew Yatsenko330 views
Passing the Joel Test in the PHP World (phpbnl10) von Lorna Mitchell
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 Mitchell9.2K views
Python debuggers slides von mattboehm
Python debuggers slidesPython debuggers slides
Python debuggers slides
mattboehm555 views
Automation using RobotFramework for embedded device von Srix Sriramkumar
Automation using RobotFramework for embedded deviceAutomation using RobotFramework for embedded device
Automation using RobotFramework for embedded device
Srix Sriramkumar2.1K views

Similar a Continuous Integration In Php

Codeception: introduction to php testing von
Codeception: introduction to php testingCodeception: introduction to php testing
Codeception: introduction to php testingEngineor
2.8K views20 Folien
Codeception: introduction to php testing (v2 - Aberdeen php) von
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
456 views20 Folien
Joomla Code Quality Control and Automation Testing von
Joomla Code Quality Control and Automation TestingJoomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingShyam Sunder Verma
996 views42 Folien
[ENGLISH] TDC 2015 - PHP Trail - Tests and PHP Continuous Integration Enviro... von
[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
795 views49 Folien
Lighning Talk: PHP build process von
Lighning Talk: PHP build processLighning Talk: PHP build process
Lighning Talk: PHP build processBryan Agee
701 views19 Folien
Pentester++ von
Pentester++Pentester++
Pentester++CTruncer
3.5K views51 Folien

Similar a Continuous Integration In Php(20)

Codeception: introduction to php testing von Engineor
Codeception: introduction to php testingCodeception: introduction to php testing
Codeception: introduction to php testing
Engineor2.8K views
Codeception: introduction to php testing (v2 - Aberdeen php) von Engineor
Codeception: introduction to php testing (v2 - Aberdeen php)Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)
Engineor456 views
Joomla Code Quality Control and Automation Testing von Shyam Sunder Verma
Joomla Code Quality Control and Automation TestingJoomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation Testing
Shyam Sunder Verma996 views
[ENGLISH] TDC 2015 - PHP Trail - Tests and PHP Continuous Integration Enviro... von Bruno Tanoue
[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 Tanoue795 views
Lighning Talk: PHP build process von Bryan Agee
Lighning Talk: PHP build processLighning Talk: PHP build process
Lighning Talk: PHP build process
Bryan Agee701 views
Pentester++ von CTruncer
Pentester++Pentester++
Pentester++
CTruncer3.5K views
Test all the things! Automated testing with Drupal 8 von Sam Becker
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
Sam Becker1.4K views
Stop Sucking at Building Stuff! von Puppet
Stop Sucking at Building Stuff!Stop Sucking at Building Stuff!
Stop Sucking at Building Stuff!
Puppet1.2K views
The New York Times: Sustainable Systems, Powered by Python von All Things Open
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
All Things Open167 views
Continuous Integration In A PHP World von Idaf_1er
Continuous Integration In A PHP WorldContinuous Integration In A PHP World
Continuous Integration In A PHP World
Idaf_1er2.8K views
The automation of the process of caring for the quality of the code in PHP an... von Krzysztof (Chris) Ozog
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 von Blend Interactive
"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
Blend Interactive10K views
Moodle Development Best Pracitces von Justin Filip
Moodle Development Best PracitcesMoodle Development Best Pracitces
Moodle Development Best Pracitces
Justin Filip15.5K views

Más de Wilco Jansen

Wisconsin Jug Presentation von
Wisconsin Jug PresentationWisconsin Jug Presentation
Wisconsin Jug PresentationWilco Jansen
830 views28 Folien
Cms Bash Groningen Opening talk von
Cms Bash Groningen Opening talkCms Bash Groningen Opening talk
Cms Bash Groningen Opening talkWilco Jansen
778 views47 Folien
Joomladay Netherlands - Security von
Joomladay Netherlands - SecurityJoomladay Netherlands - Security
Joomladay Netherlands - SecurityWilco Jansen
858 views27 Folien
Webcast So C 2009, Why Community Matters von
Webcast So C 2009, Why Community MattersWebcast So C 2009, Why Community Matters
Webcast So C 2009, Why Community MattersWilco Jansen
456 views22 Folien
Cms Expo Keynote von
Cms Expo KeynoteCms Expo Keynote
Cms Expo KeynoteWilco Jansen
440 views21 Folien
Joomladay UK - Joomla! Where Are We Now von
Joomladay UK - Joomla! Where Are We NowJoomladay UK - Joomla! Where Are We Now
Joomladay UK - Joomla! Where Are We NowWilco Jansen
642 views37 Folien

Más de Wilco Jansen(20)

Wisconsin Jug Presentation von Wilco Jansen
Wisconsin Jug PresentationWisconsin Jug Presentation
Wisconsin Jug Presentation
Wilco Jansen830 views
Cms Bash Groningen Opening talk von Wilco Jansen
Cms Bash Groningen Opening talkCms Bash Groningen Opening talk
Cms Bash Groningen Opening talk
Wilco Jansen778 views
Joomladay Netherlands - Security von Wilco Jansen
Joomladay Netherlands - SecurityJoomladay Netherlands - Security
Joomladay Netherlands - Security
Wilco Jansen858 views
Webcast So C 2009, Why Community Matters von Wilco Jansen
Webcast So C 2009, Why Community MattersWebcast So C 2009, Why Community Matters
Webcast So C 2009, Why Community Matters
Wilco Jansen456 views
Joomladay UK - Joomla! Where Are We Now von Wilco Jansen
Joomladay UK - Joomla! Where Are We NowJoomladay UK - Joomla! Where Are We Now
Joomladay UK - Joomla! Where Are We Now
Wilco Jansen642 views
Joomladay UK SEO presentation von Wilco Jansen
Joomladay UK SEO presentationJoomladay UK SEO presentation
Joomladay UK SEO presentation
Wilco Jansen939 views
Joomladay Switzerland - security von Wilco Jansen
Joomladay Switzerland - securityJoomladay Switzerland - security
Joomladay Switzerland - security
Wilco Jansen1.1K views
Joomladay Switzerland - Joomla! 1.5 and roadmap to future versions von Wilco Jansen
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
Wilco Jansen1.4K views
Impact Of A Cms Framework Change - Holland Open Netherlands von Wilco Jansen
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
Wilco Jansen497 views
2008 04 04 Joomla!Dagen von Wilco Jansen
2008 04 04 Joomla!Dagen2008 04 04 Joomla!Dagen
2008 04 04 Joomla!Dagen
Wilco Jansen401 views
Presentatie De Zwerm Groep Vtiger Dutch Joomla!day von Wilco Jansen
Presentatie De Zwerm Groep Vtiger Dutch Joomla!dayPresentatie De Zwerm Groep Vtiger Dutch Joomla!day
Presentatie De Zwerm Groep Vtiger Dutch Joomla!day
Wilco Jansen485 views
Police Utrecht Web Dutch Joomla! day von Wilco Jansen
Police Utrecht Web Dutch Joomla! dayPolice Utrecht Web Dutch Joomla! day
Police Utrecht Web Dutch Joomla! day
Wilco Jansen599 views
Joomladagen 2008 Sugar Crm Joomla Bridge Bas Vredeling von Wilco Jansen
Joomladagen 2008   Sugar Crm Joomla Bridge   Bas VredelingJoomladagen 2008   Sugar Crm Joomla Bridge   Bas Vredeling
Joomladagen 2008 Sugar Crm Joomla Bridge Bas Vredeling
Wilco Jansen520 views
Joomla10 Joomla15 Migratie von Wilco Jansen
Joomla10 Joomla15 MigratieJoomla10 Joomla15 Migratie
Joomla10 Joomla15 Migratie
Wilco Jansen489 views
Seo Presentation Lars Hilse on the Dutch Joomla!day 5 April 2008 von Wilco Jansen
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
Wilco Jansen603 views
Presentation Angie Radke and Kor Dwarshuis on the Dutch Joomla!day April 5th ... von Wilco 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 ...
Wilco Jansen486 views
ACL presentation Hannes Pappenberg on Dutch Joomla!day 5 April 2008 von Wilco Jansen
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
Wilco Jansen424 views

Último

Future of AR - Facebook Presentation von
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentationssuserb54b561
15 views27 Folien
NET Conf 2023 Recap von
NET Conf 2023 RecapNET Conf 2023 Recap
NET Conf 2023 RecapLee Richardson
10 views71 Folien
Piloting & Scaling Successfully With Microsoft Viva von
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft VivaRichard Harbridge
12 views160 Folien
Design Driven Network Assurance von
Design Driven Network AssuranceDesign Driven Network Assurance
Design Driven Network AssuranceNetwork Automation Forum
15 views42 Folien
Business Analyst Series 2023 - Week 3 Session 5 von
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5DianaGray10
300 views20 Folien
"Running students' code in isolation. The hard way", Yurii Holiuk von
"Running students' code in isolation. The hard way", Yurii Holiuk "Running students' code in isolation. The hard way", Yurii Holiuk
"Running students' code in isolation. The hard way", Yurii Holiuk Fwdays
17 views34 Folien

Último(20)

Future of AR - Facebook Presentation von ssuserb54b561
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
ssuserb54b56115 views
Piloting & Scaling Successfully With Microsoft Viva von Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
Business Analyst Series 2023 - Week 3 Session 5 von DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10300 views
"Running students' code in isolation. The hard way", Yurii Holiuk von Fwdays
"Running students' code in isolation. The hard way", Yurii Holiuk "Running students' code in isolation. The hard way", Yurii Holiuk
"Running students' code in isolation. The hard way", Yurii Holiuk
Fwdays17 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 von Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi132 views
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 von IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
6g - REPORT.pdf von Liveplex
6g - REPORT.pdf6g - REPORT.pdf
6g - REPORT.pdf
Liveplex10 views
Voice Logger - Telephony Integration Solution at Aegis von Nirmal Sharma
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma39 views
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors von sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab21 views
Case Study Copenhagen Energy and Business Central.pdf von Aitana
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdf
Aitana16 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... von James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson92 views

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
  • 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
  • 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.
  • 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