Continuous Integration in PHP Why, What and How?: Wilco Jansen
Continuous Integration in PHP Why, What and How?: Wilco Jansen
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
● Skeleton generation
● Integration of Selennium
PHP Unit and code coverage analyses
PHP Unit and code coverage analyses
● 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
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