Entries tagged as continuous integrationRelated tags ant arbit bug fix cruisecontrol git github lint php phpmd phpundercontrol phpunit release announcement sebastian marek cyclomatic complexity ipc karlsruhe kore software metrics talks cli npath complexity php5 php_depend pmd static code analysis checkstyle design quality php_codesniffer quality assurance css customization dashboard ezcomponents java server pages layout phpdoc testing tutorial usability torii portal book phpugdo conference crazy dortmund elephpant ext/filter fabien potencier fun hamburg logger phpbbq phpt phpug pirum software architecture software design static_reflection thinkpad tools unconference unit test xml xpath zce zend certified engineer optimization performance elger mayflower php_codebrowser thorsten annotations overview pyramid cologne customerSunday, January 31. 2010phpUnderControl 0.5.1 releasedToday I have released phpUnderControl version 0.5.1. It's a bug fix release that closes several issues open since a long time. First of all I would like to thank Sebastian Marek who was the main contributor to this releases, so a big thankyou to you.
Beside the new release some more things have changed. From now on the phpUnderControl development is hosted on github. This means that from now on the latest version of phpUnderControl can be obtained with the following command:
mapi@arwen ~ $ git clone \
git://github.com/manuelpichler/phpUnderControl.git
Additionally we have moved the phpUnderControl's PEAR Channel Server from pear.phpunit.de to its own server pear.phpundercontrol.org. At this point I would like to thank Sebastian for providing phpUnderControl's infrastructure under the PHPUnit umbrella for the last three years. mapi@arwen ~ $ pear uninstall phpunit/phpUnderControl mapi@arwen ~ $ pear channel-discover pear.phpundercontrol.org mapi@arwen ~ $ pear install --alldeps phpuc/phpUnderControl-beta Starting to download phpUnderControl-0.5.1.tgz (539,717 bytes) ..........................................done: 539,717 bytes install ok: channel://pear.phpundercontrol.org/phpUnderControl-0.5.1
Posted by Manuel Pichler
in php, phpugdo, phpundercontrol, planet-php, projects
at
21:16
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: ant, bug fix, continuous integration, phpundercontrol, release announcement, sebastian marek
Wednesday, February 25. 2009phpUnderControl tutorialJust now I found in Felix's blog this excellent phpUnderControl tutorial that comes with useful tips and helping scripts. Because I think it is a really good source to get started with phpUnderControl I will link it here. Sunday, November 30. 2008phpUnderControl 0.4.7 released
Posted by Manuel Pichler
in php, phpugdo, phpundercontrol, projects
at
13:31
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: continuous integration, cruisecontrol, phpundercontrol, release announcement
Saturday, September 20. 2008Documentation error for "merge-phpunit"
There was a documentation error in the previously presented ant build file for the new
Beside this documentation error, there was a bug in version 0.4.3 related to the same topic, which is fixed now. So please make sure you have the latest version (at least 0.4.4) installed.
Posted by Manuel Pichler
in php, phpugdo, phpundercontrol, planet-php, projects
at
10:51
| Comments (0)
| Trackbacks (0)
Wednesday, September 10. 2008phpUnderControl 0.4.4 bugfix releaseI recently released a bugfix version of phpUnderControl. Beside some minor view errors like the odd/even rows problem, the 0.4.4 release of phpUnderControl fixes a bug in the new merged phpunit logs feature, which doesn't cause CruiseControl to fail for such builds.
Posted by Manuel Pichler
in php, phpugdo, phpundercontrol, projects
at
21:10
| Comment (1)
| Trackback (1)
Defined tags for this entry: continuous integration, cruisecontrol, php5, phpundercontrol, phpunit, release announcement
Sunday, September 7. 2008phpUnderControl 0.4.3 releasedI currently released a new version of phpUnderControl. Beside some minor fixes this release comes with a new feature to aggregate test results of multiple PHPUnit runs.
Use the new cli command
Posted by Manuel Pichler
in php, phpugdo, phpundercontrol, planet-php, projects
at
19:11
| Comment (1)
| Trackback (1)
Defined tags for this entry: continuous integration, cruisecontrol, phpundercontrol, phpunit, release announcement
Sunday, July 27. 2008Everything looks fine, but it failsYesterday kore asked me about a strange behavior of phpUnderControl. The last arbit build done by phpUnderControl has failed, but when we looked over the different result pages everything looks fine. Strange! What has happened? After an analysis session of the 6MB XML log file I detected the following self explaining entry. The PHPUnit tests for arbit had completely failed. <?xml version="1.0" encoding="UTF-8"?> <cruisecontrol> ... <build error=".../arbit/build.xml:20: exec returned: 255" time="12 minutes 56 seconds"> ... <target name="phpunit" time="1 second"> <task location=".../arbit/build.xml:20: " name="exec" time="1 second"> <message priority="debug"><![CDATA[Current OS is Linux]]></message> <message priority="debug"><![CDATA[Executing 'phpunit' with arguments: '--log-xml' 'build/logs/phpunit.xml' '--log-pmd' 'build/logs/phpunit.pmd.xml' '--log-metrics' 'build/logs/phpunit.metrics.xml' '--coverage-xml' 'build/logs/phpunit.coverage.xml' '--coverage-html' 'build/coverage' 'arbitTestSuite' 'source/tests/suite.php' The ' characters around the executable and arguments are not part of the command.]]></message> <message priority="info"><![CDATA[Fatal error: main(): Failed opening required 'modules_tracker_suite.php' (include_path='.../arbit/source/src/:.../arbit/source/src/libraries/:.:.../php-5.3-cvs/lib/php') in .../arbit/source/tests/suite.php on line 0]]></message> <message priority="info"><![CDATA[Call Stack:]]></message> <message priority="info"><![CDATA[0.0005 318436 1. {main}() .../php-5.3-cvs/bin/phpunit:0]]></message> <message priority="info"><![CDATA[0.2345 542264 2. require('.../php-5.3-cvs/lib/php/PHPUnit/TextUI/Command.php') .../php-5.3-cvs/bin/phpunit:44]]></message> <message priority="info"><![CDATA[1.0595 5278380 3. PHPUnit_TextUI_Command::main() .../php-5.3-cvs/lib/php/PHPUnit/TextUI/Command.php:528]]></message> <message priority="info"><![CDATA[1.0616 5294940 4. PHPUnit_Runner_BaseTestRunner->getTest() .../php-5.3-cvs/lib/php/PHPUnit/TextUI/Command.php:90]]></message> <message priority="info"><![CDATA[1.0617 5295224 5. PHPUnit_Runner_BaseTestRunner->loadSuiteClass() .../php-5.3-cvs/lib/php/PHPUnit/Runner/BaseTestRunner.php:200]]></message> <message priority="info"><![CDATA[1.0617 5295508 6. PHPUnit_Runner_StandardTestSuiteLoader->load() .../php-5.3-cvs/lib/php/PHPUnit/Runner/BaseTestRunner.php:269]]></message> <message priority="info"><![CDATA[1.0828 5295792 7. PHPUnit_Util_Fileloader::checkAndLoad() .../php-5.3-cvs/lib/php/PHPUnit/Runner/StandardTestSuiteLoader.php:97]]></message> <message priority="info"><![CDATA[1.1736 5296168 8. PHPUnit_Util_Fileloader::load() .../php-5.3-cvs/lib/php/PHPUnit/Util/Fileloader.php:105]]></message> <message priority="info"><![CDATA[1.1746 5328364 9. include_once('.../arbit/source/tests/suite.php') .../php-5.3-cvs/lib/php/PHPUnit/Util/Fileloader.php:120]]></message> </task> </target> </build> ... </cruisecontrol> Ok, the test run failed, but why did phpUnderControl say: All Tests passed?
The answer is really simple. Due to the fact that phpunit died, it didn't generate any log file and previous log files still reside in
At this moment I realized that I have never mentioned a clean-target for the ant
You should add an additional target to your ant <?xml version="1.0" encoding="UTF-8"?> <project name="phpundercontrol.org" default="build" basedir="."> ... <target name="clean"> <!-- Remove old log files --> <delete> <fileset dir="${basedir}/build/logs" includes="**.*" /> </delete> <!-- Remove old api documentation --> <delete> <fileset dir="${basedir}/build/api" includes="**.*" /> </delete> <!-- Remove old coverage report --> <delete> <fileset dir="${basedir}/build/coverage" includes="**.*" /> </delete> </target> <target name="build" depends="clean,checkout,php-documentor,php-codesniffer,phpunit" /> ... </project> That's it. Now you will get the expected(not really) result: No Tests Run - This project doesn't have any tests.
Posted by Manuel Pichler
in php, phpugdo, phpundercontrol, projects
at
15:14
| Comments (0)
| Trackback (1)
Defined tags for this entry: ant, arbit, continuous integration, cruisecontrol, phpundercontrol, phpunit
Tuesday, March 18. 2008Integrate php lint syntax checks in your build processHere is a small code snippet that can be used to integrate php's internal lint syntax check into your build process. The ant task apply behaves like the exec task, but it accepts a nested fileset element. This allows to process a set of input files thru a single command. <?xml version="1.0" encoding="UTF-8"?> <project name="phpUnderControl" basedir="." default="build"> ... <target name="checkphp"> <apply executable="php" failonerror="true"> <arg value="-l" /> <fileset dir="source/src"> <include name="**/*.php" /> </fileset> </apply> </target> <target name="build" depends="checkphp,php-codesniffer,phpdoc,phpunit" /> ... </project> This can also be used as an addition in your phpunit target or any other command which executes code during the build-process, when the command would quit due to a syntax error.
Posted by Manuel Pichler
in php, phpugdo, phpundercontrol, projects
at
21:05
| Comments (4)
| Trackbacks (0)
Saturday, February 16. 2008Howto customize phpUnderControl!Due to the fact that every software is individual and in this context the used tools differ from build-process to build-process phpUnderControl 0.3.6 introduced a new feature that allows to customize the main menu bar. It is a simple placeholder based preprocessor. It extracts custom tabs from an existing phpUnderControl installation and takes them into newer version during the update process. At the moment only the main.jsp file supports this new preprocessor between each of the predefined tabs. Each phpUnderControl placeholder has the following format <%-- phpUnderControl ([0-9]+) --%> where ([0-9]+) represents a unique number. The following example shows a section from the main.jsp file as it is shipped with phpUnderControl 0.3.6. ... <cruisecontrol:tab name="log" url="<%=logs_url%>" label="XML Log File" /> <%-- phpUnderControl 4 --%> <cruisecontrol:tab name="metrics" label="Metrics" > <%@ include file="metrics.jsp" %> </cruisecontrol:tab> <%-- phpUnderControl 5 --%> <cruisecontrol:tab name="coverage" label="Coverage"> ... </cruisecontrol:tab> <%-- phpUnderControl 6 --%> <cruisecontrol:tab name="documentation" label="Documentation"> ... Now I would like to add two more documentation types to my build result. The agile Testdox documentation, generated by PHPUnit and the end user documentation generated from docbook xml files in the source repository. <%-- phpUnderControl 4 --%> <cruisecontrol:tab name="metrics" label="Metrics" > <%@ include file="metrics.jsp" %> </cruisecontrol:tab> <%-- begin phpUnderControl 5 --%> <cruisecontrol:tab name="testdox" label="Testdox"> <cruisecontrol:artifactsLink> <iframe src="<%= artifacts_url %>/testdox/testdox.html" width="100%" height="550" /> </iframe> </cruisecontrol:artifactsLink> </cruisecontrol:tab> <cruisecontrol:tab name="manual" label="Manual"> <cruisecontrol:artifactsLink> <iframe src="<%= artifacts_url %>/manual/index.html" width="100%" height="550" /> </iframe> </cruisecontrol:artifactsLink> </cruisecontrol:tab> <%-- end phpUnderControl 5 --%> <cruisecontrol:tab name="coverage" label="Coverage"> ... </cruisecontrol:tab> <%-- phpUnderControl 6 --%> I simply translated the placeholder number 5 into an opening %<-- begin phpUnderControl 5 --%> and a closing <%-- end phpUnderControl 5 --%> placeholder and put my custom tabs between this two comment. And this is what it looks like now. And the best thing is that you do not need to worry about future updates.
Posted by Manuel Pichler
in php, phpugdo, phpundercontrol, projects
at
15:32
| Comments (2)
| Trackbacks (0)
Defined tags for this entry: continuous integration, cruisecontrol, customization, java server pages, layout, phpundercontrol, phpunit
Tuesday, February 12. 2008phpUnderControl 0.3.6Except minor enhancements and bugfixes the latest phpUnderControl version comes with two new features.
Posted by Manuel Pichler
in php, phpugdo, phpundercontrol, projects
at
11:19
| Comments (6)
| Trackbacks (0)
Defined tags for this entry: continuous integration, cruisecontrol, phpundercontrol, phpunit, quality assurance, software metrics, testing
Sunday, February 3. 2008New phpUnderControl release 0.3.5Yesterday I have released the latest phpUnderControl 0.3.5 version. In addition to many minor improvements this version brings two new features. A new index page, inspired by the dashboard of the continuous integration tool hudson phpUnderControl dashboard and a custom PhpDocumentor template which has its roots in the eZ Components api documentation. new phpdoc template.
Except these changes phpUnderControl comes with a lot of minor visual changes, mostly done by kore. Anymore I would like to thank tobias for his work on saturday evening, to get the phpunit.de pear channel to work
Posted by Manuel Pichler
in php, phpugdo, phpundercontrol, planet-php
at
19:41
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: continuous integration, cruisecontrol, css, dashboard, phpdoc, phpundercontrol, quality assurance
Saturday, January 19. 2008phpUnderControl 0.3.x releasedYesterday I released version 0.3.(0|1|2) of phpUnderControl. Except bugfixes and enhancements the major change in this new version of phpUnderControl is an ezcGraph replacement of the original cewolf metrics view. For the excellent appearance of the generated graphics I would like to thank kore, who supported me actively with his deep knowledge of the ezcGraph component. Beside the better appearance, the new graph implementation has another advantage, it performs much better than the original cewolf implementation, because cewolf generates graphics in real time, while the new ezcGraph solution generates static graphics during the build process. To integrate the graph generator into your build process, you must alter the <publishers /> elements in the config.xml file. Simply add a CruiseControl execute-publisher that calls the phpUnderControl cli tool with the graph command, as shown in the following example. <cruisecontrol> <project name="php-under-control" buildafterfailed="false"> ... <publishers> ... <execute command="/path/to/phpuc(.php|.bat) graph logs/${project.name}"/> </publishers> </project> </cruisecontrol> The phpUnderControl graph command expects at least the project log directory as argument, it is the directory where CruiseControl stores the merged xml log files. In this default mode phpUnderControl will generate the metric charts for each build into logs/<project-name>/<build-timestamp>/graph directories. If you use a different CruiseControl setup where artifacts are not stored in the logs/ directory you can call the graph command with a second argument that specifies the output directory, for example:
[mapi@arwen /opt/cruisecontrol]$ phpuc graph logs/phpUnderControl \
artifacts/phpUnderControl
Finally I say thanks to Sebastian, because he integrates a new css file for the coverage reports into PHPUnit, that produces a harmonious overall picture between phpUnderControl and the coverage-report. This stylesheet is yet another contribution by kore. All phpUnderControl versions are available thru the phpunit.de pear channel, just type: [mapi@arwen ~]$ pear channel-discover pear.phpunit.de [mapi@arwen ~]$ pear install --alldeps phpunit/phpUnderControl-beta
Posted by Manuel Pichler
in php, phpugdo, phpundercontrol, planet-php
at
19:45
| Comments (11)
| Trackbacks (0)
Defined tags for this entry: continuous integration, cruisecontrol, css, ezcomponents, php, phpundercontrol, phpunit, quality assurance, testing
Saturday, October 27. 2007More QA with CruiseControl and PHP_CodeSnifferI am using CruiseControl for some time now, to run all Unit Tests for a project continuous after each commit. Since Sebastian Bergmann started the development of PHPUnit 3.2 he added support for software metrics and PMD to PHPUnit, that give you further informations about the quality of your source code. These two features are really well integrated into CruiseControl, the only thing you need to do is to comment out the following lines in the main.jsp file. <%-- <cruisecontrol:tab name="pmd" label="PMD"> <%@ include file="pmd.jsp" %> </cruisecontrol:tab> --%> The next thing that is important for each project is the coding standard of a project, a company or at least a single person. Java has a nice tool called Checkstyle that checks all your code against a defined set of rules. I knew this tool really well from my diploma thesis, because I used Checkstyle to check the complete code against the Sun coding standards. Checkstyle is also really good integrated into CruiseControl, so that it checks on each build that your code meets the coding standards.
So what can a PHP developer do, to achieve the same support? This question is answered fast! There is a nice PEAR package that does nearly the same job as Checkstyle. The name of this package is PHP_CodeSniffer. This PEAR package provides a variety of pre defined coding standards like PEAR, ZEND etc., a small cli script <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="no" indent="yes" /> <xsl:template match="/"> <checkstyle> <xsl:apply-templates select="phpcs/*" /> </checkstyle> </xsl:template> <xsl:template match="file"> <file> <xsl:attribute name="name"> <xsl:value-of select="@name" /> </xsl:attribute> <xsl:for-each select="child::*"> <xsl:call-template name="entry" /> </xsl:for-each> </file> </xsl:template> <xsl:template name="entry"> <error> <xsl:attribute name="line"> <xsl:value-of select="@line" /> </xsl:attribute> <xsl:attribute name="severity"> <xsl:value-of select="local-name()" /> </xsl:attribute> <xsl:attribute name="message"> <xsl:value-of select="text()" /> </xsl:attribute> </error> </xsl:template> </xsl:stylesheet>
You have to add the following lines to your ant <?xml version="1.0" encoding="UTF-8"?> <project name="mapi-xplib-de" default="build" basedir="."> ... <target name="checkstyle"> <exec executable="phpcs" output="${basedir}/build/logs/codesniffer.pcs" dir="${basedir}/source"> <arg line="--report=xml --standard=MapiSource --ignore=src/autoload src/" /> </exec> <exec executable="xsltproc" output="${basedir}/build/logs/checkstyle.xml" dir="${basedir}/build/logs"> <arg line="${checkstyle.xslt} ${basedir}/build/logs/codesniffer.pcs" /> </exec> </target> <target name="build" depends="checkout,checkstyle,test" /> ... </project>
PLEASE NOTE I know that ant supports xsl transformation without external exec commands but it doesn't work with my current gcj installation.
Posted by Manuel Pichler
in php, phpugdo
at
19:03
| Comment (1)
| Trackback (1)
Defined tags for this entry: checkstyle, continuous integration, cruisecontrol, php, php_codesniffer, quality assurance
(Page 1 of 1, totaling 13 entries)
|
ProjectsFurther stuffCategories |
