Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
Continuous Integration in PHP
    Why, what and how?
             Wilco Jansen

              October 4th 2009

      Tdos...
Wilco Jansen


Formerly Involved in Joomla
•   Board member Open Source matters
•   Core team member
•   (first ever) Deve...
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 integra...
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
    yours...
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 fee...
Detect problems in the earliest possible stage
●   Defacto standard for unit testing of PHP
    applications
●   Member of the xUnit family
●   Inspired by tools like Ju...
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 requi...
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 w...
Coding standards...
PHP Code Sniffer (phpcs)
PHP Code Sniffer “Sniffs”...


●   PHP
●   Javascript
●   CSS
To detect violations of defined coding standards
with as mai...
An example run
Other available tools


 ●   PHP copy/paste detector
 ●   PHP Depend – software metric tool
 ●   PHP Loc – Lines of code a...
Copy/paste detection
Code duplication (phpcd)


●   Code is marked duplicate when two sequences
    of code are:
    ●   Textually identical
  ...
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...
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 ...
The end...


Acknowledgement                              Links
●   Part of this presentation was inspired    ●   PHPUnit ...
Continuous Integration In Php
Continuous Integration In Php
Continuous Integration In Php
Nächste SlideShare
Wird geladen in …5
×

von

Continuous Integration In Php Slide 1 Continuous Integration In Php Slide 2 Continuous Integration In Php Slide 3 Continuous Integration In Php Slide 4 Continuous Integration In Php Slide 5 Continuous Integration In Php Slide 6 Continuous Integration In Php Slide 7 Continuous Integration In Php Slide 8 Continuous Integration In Php Slide 9 Continuous Integration In Php Slide 10 Continuous Integration In Php Slide 11 Continuous Integration In Php Slide 12 Continuous Integration In Php Slide 13 Continuous Integration In Php Slide 14 Continuous Integration In Php Slide 15 Continuous Integration In Php Slide 16 Continuous Integration In Php Slide 17 Continuous Integration In Php Slide 18 Continuous Integration In Php Slide 19 Continuous Integration In Php Slide 20 Continuous Integration In Php Slide 21 Continuous Integration In Php Slide 22 Continuous Integration In Php Slide 23 Continuous Integration In Php Slide 24 Continuous Integration In Php Slide 25 Continuous Integration In Php Slide 26 Continuous Integration In Php Slide 27 Continuous Integration In Php Slide 28 Continuous Integration In Php Slide 29 Continuous Integration In Php Slide 30 Continuous Integration In Php Slide 31 Continuous Integration In Php Slide 32 Continuous Integration In Php Slide 33 Continuous Integration In Php Slide 34 Continuous Integration In Php Slide 35 Continuous Integration In Php Slide 36 Continuous Integration In Php Slide 37 Continuous Integration In Php Slide 38 Continuous Integration In Php Slide 39 Continuous Integration In Php Slide 40 Continuous Integration In Php Slide 41 Continuous Integration In Php Slide 42 Continuous Integration In Php Slide 43 Continuous Integration In Php Slide 44 Continuous Integration In Php Slide 45 Continuous Integration In Php Slide 46
Nächste SlideShare
[ENGLISH] TDC 2015 - PHP Trail - Tests and PHP Continuous Integration Environment for Agile Development
Weiter
Herunterladen, um offline zu lesen und im Vollbildmodus anzuzeigen.

10 Gefällt mir

Teilen

Herunterladen, um offline zu lesen

Continuous Integration In Php

Herunterladen, um offline zu lesen

Presentation given 4th of October on T-Dose event about continuous Integration In Php.

Ähnliche Bücher

Kostenlos mit einer 30-tägigen Testversion von Scribd

Alle anzeigen

Ähnliche Hörbücher

Kostenlos mit einer 30-tägigen Testversion von Scribd

Alle anzeigen

Continuous Integration In Php

  1. 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. 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. 3. This presentation is about development tools
  4. 4. Continuous integration in PHP
  5. 5. That help build better software in PHP
  6. 6. Things to think about before you run out of time...
  7. 7. Tools will solve some problems
  8. 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. 9. Why use continuous integration?
  10. 10. The classic approach
  11. 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
  12. 12. A fundamental shift
  13. 13. Continuous integration emerged from Extreme programming
  14. 14. Question you would like to answer...
  15. 15. Does my code work? And Does it still work after I committed new code?
  16. 16. Agile approach
  17. 17. Write a unit test! ● Executable specification ● Automatic evaluation ● A simple test environment ● Instant feedback ● Used as regression test
  18. 18. Detect problems in the earliest possible stage
  19. 19. ● 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)
  20. 20. Things to keep in mind...
  21. 21. Unit tests should run in less than 1 ms
  22. 22. 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
  23. 23. Does PHP Unit only run tests?
  24. 24. Other things PHPUnit can do ● Skeleton generation ● Integration of Selennium
  25. 25. PHP Unit and code coverage analyses
  26. 26. 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!
  27. 27. Coding standards...
  28. 28. PHP Code Sniffer (phpcs)
  29. 29. 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
  30. 30. An example run
  31. 31. 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
  32. 32. Copy/paste detection
  33. 33. 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
  34. 34. Example run
  35. 35. How it all can be put together?
  36. 36. Pick your continuous build environment
  37. 37. 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
  38. 38. Cruisecontrol and PHPUndercontrol
  39. 39. Ant is used to process the build
  40. 40. Remember...
  41. 41. A fool with a tool is still a fool!
  42. 42. 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.
  43. 43. 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
  • beherca

    Mar. 20, 2014
  • akempkens

    May. 30, 2011
  • debasys

    Nov. 21, 2010
  • up1

    Sep. 17, 2010
  • mrdiggler

    Jun. 12, 2010
  • paulstakem

    Jan. 5, 2010
  • haohappy

    Nov. 15, 2009
  • hthetiot

    Oct. 7, 2009
  • er.ssverma

    Oct. 5, 2009
  • dead_thinker

    Oct. 5, 2009

Presentation given 4th of October on T-Dose event about continuous Integration In Php.

Aufrufe

Aufrufe insgesamt

6.168

Auf Slideshare

0

Aus Einbettungen

0

Anzahl der Einbettungen

129

Befehle

Downloads

138

Geteilt

0

Kommentare

0

Likes

10

×