<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>PhpUnderControl Framework For Symfony Projects</title>
	<atom:link href="http://anoosphpundercontrol.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://anoosphpundercontrol.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Fri, 20 May 2011 11:21:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='anoosphpundercontrol.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>PhpUnderControl Framework For Symfony Projects</title>
		<link>http://anoosphpundercontrol.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://anoosphpundercontrol.wordpress.com/osd.xml" title="PhpUnderControl Framework For Symfony Projects" />
	<atom:link rel='hub' href='http://anoosphpundercontrol.wordpress.com/?pushpress=hub'/>
		<item>
		<title></title>
		<link>http://anoosphpundercontrol.wordpress.com/2008/07/29/phpundercontrol-framework-for-symfony-projects/</link>
		<comments>http://anoosphpundercontrol.wordpress.com/2008/07/29/phpundercontrol-framework-for-symfony-projects/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 13:17:08 +0000</pubDate>
		<dc:creator>anoopvdk</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software Testing]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Cruisecontrol]]></category>
		<category><![CDATA[PhpUnderControl]]></category>
		<category><![CDATA[selenium RC test integrate with cruise control]]></category>
		<category><![CDATA[sg test4cruise]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://anoosphpundercontrol.wordpress.com/?p=3</guid>
		<description><![CDATA[Introduction phpUnderControl is an extension for Cruise Control that integrates several PHP development tools, such as PHPUnit Which contains a rich set of features like Unit Testing and Functional Testing, Code Coverage, Project Mess Detection and Software Metrics etc, PHP_Code Sniffer For static code analysis PHPDocumentor For API documentation generation. It comes with a powerful [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoosphpundercontrol.wordpress.com&amp;blog=4358442&amp;post=3&amp;subd=anoosphpundercontrol&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="margin-bottom:0;"><span style="font-size:medium;"><strong>Introduction</strong></span></p>
<p style="margin-bottom:0;">phpUnderControl is an extension for Cruise Control that integrates several PHP development tools, such as</p>
<ul>
<li> <a id="g7gg" title="PHPUnit" href="http://www.phpunit.de/pocket_guide/3.3/en/index.html">PHPUnit</a>
<ul>
<li>Which contains a rich set of features like  Unit Testing and Functional Testing, Code Coverage, Project Mess Detection and Software Metrics etc,</li>
</ul>
</li>
<li><strong><a id="uf92" title="PHP_Code Sniffer" href="https://pear.php.net/reference/PHP_CodeSniffer-0.7.0/PHP_CodeSniffer/_PHP_CodeSniffer-0.7.0---CodeSniffer.php.html">PHP_Code Sniffer</a> </strong>
<ul>
<li>For static code analysis</li>
</ul>
</li>
<li><a id="bscx" title="PHPDocumentor" href="http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.pkg.html">PHPDocumentor</a>
<ul>
<li>For API documentation generation. It comes with a powerful command-line tool that can, among other things, automatically create Cruise Control&#8217;s XML configuration files for your project.</li>
</ul>
</li>
</ul>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><span style="font-size:medium;"><strong>Initial Setups for phpUnder Control</strong></span></p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>Prerequisites</strong></p>
<ol>
<li>JDK Version 1.5 or above</li>
<li><a id="u9jm" title="Symfony Framework" href="http://www.symfony-project.org/installation/1_1" target="_blank">Symfony Framework</a></li>
</ol>
<p><strong>Setting Up JDK</strong></p>
<ol>
<li>Download &amp; extract Latest JDK from <a id="peuo" title="Latest JDK download" href="http://java.sun.com/javase/downloads/index_jdk5.jsp">SUN Java</a> to /usr/java (Standard path)</li>
<li>Setup the environment (Linux)
<ol>
<li>Edit /etc/profile and add the below to make it available global</li>
<li>export JAVA_HOME=/usr/java/jdk1.6.0_06</li>
<li>export PATH=$PATH:$JAVA_HOME/bin</li>
<li>save and exit.</li>
<li>A restart or #source /etc/profile would require to make the changes effective.</li>
<li>Check the version details Execute the command &#8220;java -version&#8221;. Should see something like</li>
</ol>
</li>
</ol>
<div style="margin-left:80px;">
<div id="0" style="margin-left:40px;">java version &#8220;1.6.0_06&#8243;</div>
</div>
<div id="2" style="margin-left:80px;">
<div id="3" style="margin-left:40px;">Java(TM) SE Runtime Environment (build 1.6.0_06-b02)<br />
Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)</div>
</div>
<div id="5">
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>Setting symfony and plugins</strong></p>
<ol>
<li>Install the symfony framework.</li>
</ol>
<div id="knu9" style="margin-left:40px;">Further information on installing symfony framework can be obtained from http://www.symfony-project.org/installation/1_1</div>
<ol>
<li>Install the sgtest4cruise plugin.
<ol>
<li>Download plugin from <a id="d50p30" href="http://trac.symfony-project.org/attachment/wiki/HowToSaveLimeTestsInXUnitFormatAndIntegrateThemWithCruiseControl/sgTest4CruisePlugin.tar.gz">symfony plugins for </a>cruise control.</li>
<li>Put this file in the plugins directory of your application.</li>
<li>Add the plugin to &#8220;enabled_modules&#8221; in settings.yml of your application.</li>
<li>Modify the following variables to the needs of your project in <strong>app.yml</strong> of your application:</li>
</ol>
</li>
</ol>
<ul style="margin-left:80px;">
<li>app_test4cruise_lime_file: path to the lime.php file in Symfony</li>
<li>app_test4cruise_sg_lime_file: path to the extended library</li>
<li>app_test4cruise_log: path to generated log file</li>
</ul>
<p style="margin-bottom:0;"><span style="font-size:medium;"><strong>Setting <a id="vd0m" title="CruiseControl" href="http://cruisecontrol.sourceforge.net/" target="_blank">CruiseControl</a> CodeBase</strong></span></p>
<p style="margin-bottom:0;margin-left:40px;">As mentioned earlier phpUnderControl is extension of Cruise Control, so we want to  set up Cruise Control first.</p>
<p style="margin-bottom:0;">
<ol>
<li>Just download <a id="d50p40" href="http://sourceforge.net/project/showfiles.php?group_id=23523&amp;package_id=16338,">cruise control</a> 2.7.2 (or recent version) archives from &#8220;sourceforge.net&#8221;.</li>
<li>Unzip the contents into an arbitrary folder (CCHOME)</li>
</ol>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><span style="font-size:medium;"><strong>Install phpUnderControl </strong></span></p>
<p style="margin-bottom:0;margin-left:40px;">The preferred way to install phpUnderControl is PEAR installation. The following steps will helps to install phpunderControl  on to your system</p>
<div id="bo7." style="margin-left:40px;">
<ol>
<li>pear config-set preferred_state beta</li>
<li>pear channel-discover components.ez.no</li>
<li>pear channel-discover 	pear.phpunit.de</li>
<li>pear install &#8211;alldeps 	phpunit/phpUnderControl</li>
</ol>
</div>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><span style="font-size:medium;"><strong>Patch your phpUnderControl with cruise control</strong></span></p>
<p style="margin-bottom:0;">Simple ! Execute the following command from terminal window.</p>
<ul>
<li> phpUnderControl/bin/phpuc(.php|.bat) install /path/to/cruise control</li>
</ul>
</div>
<div id="b_d83">
<p style="margin-bottom:0;"><span style="font-size:small;"><strong>Folder Structure</strong></span></p>
<p style="margin-bottom:0;">Now you should create a well defined folder structure for the phpundercontrol framework. First of all we need to</p>
<ol>
<li>create a new folder with your project name in” ./cruise control/project/  “   path. After that we can use svn checkout for getting the latest version of the application and put it under “/path/to/cruisecontrol/project/project name/ “  folder with a new folder name as source. Else we can also create symbolic link with same name(source) and pointed to your actual application path (Only if the website is hosted locally on that particular server).</li>
</ol>
<p style="margin-bottom:0;">Now the time to create your log files, it is better to create all log files under a common folder. So create a folder with name build under “/path/to/cruise control/project/project name/ “ cruisecontrol latest</p>
<p style="margin-bottom:0;">Create separate folders for log doc etc under build folder</p>
<p style="margin-bottom:0;">Now your framework&#8217;s folder structure looks like below</p>
<p style="margin-bottom:0;">+ cruisecontrol</p>
<p style="margin-bottom:0;">+ projects</p>
<p style="margin-bottom:0;">+ &lt;Your project name&gt;</p>
<p style="margin-bottom:0;">+ source</p>
<p style="margin-bottom:0;">+ build</p>
<p style="margin-bottom:0;">+					logs</p>
<p style="margin-bottom:0;">+ doc</p>
<p style="margin-bottom:0;">+ coverage</p>
<p style="margin-bottom:0;">Now your phpundercontrol  Framework is ready. Now you can create a build file  for your application under project name folder  and edit config file for  phpundercontrol under cruise control folder. Now the folder structure like</p>
<p style="margin-bottom:0;">+ cruisecontrol</p>
<p style="margin-bottom:0;">config.xml</p>
<p style="margin-bottom:0;">+ projects</p>
<p style="margin-bottom:0;">+ Your project name</p>
<p style="margin-bottom:0;">build.xml</p>
<p style="margin-bottom:0;">+ source</p>
<p style="margin-bottom:0;">+ build</p>
<p style="margin-bottom:0;">+						logs</p>
<p style="margin-bottom:0;">+						doc</p>
<p style="margin-bottom:0;">+						coverage</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong><span style="font-size:small;">Create Build.xml</span></strong></p>
<p style="margin-bottom:0;">This section describes how to configure your project using &#8220;ant&#8221; build method</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">At first the file should contain the following lines.</p>
<p style="margin-bottom:0;">&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;</p>
<p style="margin-bottom:0;">&lt;project name=&#8221;project name&#8221; basedir=&#8221;/path/to/cruisecontrol/projects/project name/&#8221;&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;/project&gt;</p>
<p style="margin-bottom:0;"><strong>Working Copy Target</strong></p>
<p style="margin-bottom:0;">We need a working copy of our application on which the build process is executed . Its much preferred to create a symbolic link to the actual path of your application if both application and phpUnderControl are running on same server. Otherwise go for svn checkout option, For that create a new target method under &lt;project&gt;. The parameter for svn update is</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;target name=&#8221;checkout&#8221;&gt;</p>
<p style="margin-bottom:0;">&lt;exec executable=&#8221;svn&#8221; dir=&#8221;${basedir}/source&#8221;&gt;</p>
<p style="margin-bottom:0;">&lt;arg line=&#8221;up&#8221; /&gt;</p>
<p style="margin-bottom:0;">&lt;/exec&gt;</p>
<p style="margin-bottom:0;">&lt;/target&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">* Please note that we need to do an initial checkout before starting an svn update.</p>
<p style="margin-bottom:0;"><strong><br />
</strong></p>
<p style="margin-bottom:0;"><strong>Unit Test Target</strong></p>
<p style="margin-bottom:0;">Here we use lime test for running the tests rather than phpunit because symfony framework does not support phpunit. Unit test command are as follows</p>
<p style="margin-bottom:0;">&lt;target name=&#8221;unitTest&#8221; &gt;</p>
<p style="margin-bottom:0;">&lt;exec dir=&#8221;${project.dir}&#8221; executable=&#8221;php&#8221; failonerror=&#8221;true&#8221;&gt;</p>
<p style="margin-bottom:0;">&lt;arg line=&#8221;symfony sg-test4cruise ${test.app.name}&#8221; /&gt;</p>
<p style="margin-bottom:0;">&lt;/exec&gt;</p>
<p style="margin-bottom:0;">&lt;/target&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">Before that mention {project.dir} and {test.app.name}. Here {project.dir} is ${basedir}/source and {test.app.name} is depends on your application.</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>PHPDocumentor  Target</strong></p>
<p style="margin-bottom:0;">We have to add new target Phpdocumentor for generate documentation of  our php files on each build.  The commands are as follows</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;target name=&#8221;phpDocumentor&#8221;&gt;</p>
<p style="margin-bottom:0;">&lt;exec executable=&#8221;phpdoc&#8221; dir=&#8221;${application.dir}&#8221;&gt;</p>
<p style="margin-bottom:0;">&lt;arg line=&#8221;-i om/,map/ -d src/ -t ${log.dir}/doc&#8221; /&gt;</p>
<p style="margin-bottom:0;">&lt;/exec&gt;</p>
<p style="margin-bottom:0;">&lt;/target&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">Where</p>
<p style="margin-bottom:0;">-i    &#8211;ignore       : file(s) that will be ignored, multiple separated by &#8216;,&#8217;.  Wildcards * and ? are ok</p>
<p style="margin-bottom:0;">-d    &#8211;directory   : name of a directory(s) to parse directory1,directory2</p>
<p style="margin-bottom:0;">-t    &#8211;target         : path where to save the generated files</p>
<p style="margin-bottom:0;">{log.dir}             : ${basedir}/build/</p>
<p style="margin-bottom:0;">{application.dir}: Depends on your application</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>CodeSniffer Target</strong></p>
<p style="margin-bottom:0;">PHP_CodeSniffer is a PHP5 script that tokenises and &#8220;sniffs&#8221; PHP and JavaScript code to detect violations of a defined coding standard. It is an essential development tool that ensures your code remains clean and consistent. It can also help prevent some common semantic errors made by developers. The build commands for this</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;target name=&#8221;phpCodeSniffer&#8221;&gt;</p>
<p style="margin-bottom:0;">&lt;exec executable=&#8221;phpcs&#8221; dir = “$${project.dir}&#8221;   output= “${log.dir}/log/ CodesnifferResult.xml&#8221;/&gt;                            		&lt;arg line=&#8221;&#8211;report=checkstyle &#8211;standard=Symfony –ignore= what are the files you want to exclude from code sniffs activity&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;/exec&gt;</p>
<p style="margin-bottom:0;">&lt;/target&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>Deleting the Existing Log files</strong></p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">If you want delete all log files before run the build then you need to create a new target &#8216;init&#8217;for that</p>
<p style="margin-bottom:0;">&lt;target name=&#8221;init&#8221;&gt;</p>
<p style="margin-bottom:0;">&lt;delete&gt;</p>
<p style="margin-bottom:0;">&lt;fileset dir=&#8221;${log.dir}/&#8221; includes=&#8221;**/*.*&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;/delete&gt;</p>
<p style="margin-bottom:0;">&lt;/target&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>Finishing the ant build file</strong></p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">Finally we have to combine the four independent targets into a single target. So create we create a new target &#8216;all&#8217;  that depends on the other four. And the commands</p>
<p style="margin-bottom:0;">&lt;target name=&#8221;all&#8221; depends=&#8221;init, phpCodeSniffer, phpDocumentor, unitTest&#8221; /&gt;</p>
<p style="margin-bottom:0;">&lt;/project&gt;</p>
<p style="margin-bottom:0;"><strong>The final build.xml file look like this</strong></p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;</p>
<p style="margin-bottom:0;">&lt;project name=&#8221;project name&#8221; basedir=&#8221;/path/to/cruisecontrol/projects/project name/&#8221;&gt;</p>
<p style="margin-bottom:0;">&lt;property name=&#8221;base.dir&#8221; value=&#8221;source&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;property name=&#8221;log.dir&#8221; value=&#8221;build&#8221; /&gt;</p>
<p style="margin-bottom:0;">&lt;property name=&#8221;application.dir&#8221; value=&#8221;${base.dir}/to your application working patht&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;property name=&#8221;test.app.name&#8221; value=&#8221;Applicatin name&#8221; /&gt;</p>
<p style="margin-bottom:0;">&lt;property name=&#8221;project.name&#8221; value=&#8221;projectname&#8221;/&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;target name=&#8221;all&#8221; depends=&#8221;init, phpCodeSniffer, phpDocumentor, unitTest&#8221; /&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;target name=&#8221;init&#8221;&gt;</p>
<p style="margin-bottom:0;">&lt;delete&gt;</p>
<p style="margin-bottom:0;">&lt;fileset dir=&#8221;${log.dir}/&#8221; includes=&#8221;**/*.*&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;/delete&gt;</p>
<p style="margin-bottom:0;">&lt;/target&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;target name=&#8221;unitTest&#8221; &gt;</p>
<p style="margin-bottom:0;">&lt;exec dir=&#8221;${project.dir}&#8221; executable=&#8221;php&#8221; failonerror=&#8221;true&#8221;&gt;</p>
<p style="margin-bottom:0;">&lt;arg line=&#8221;symfony sg-test4cruise ${test.app.name}&#8221; /&gt;</p>
<p style="margin-bottom:0;">&lt;/exec&gt;</p>
<p style="margin-bottom:0;">&lt;/target&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;target name=&#8221;phpDocumentor&#8221;&gt;</p>
<p style="margin-bottom:0;">&lt;exec executable=&#8221;phpdoc&#8221; dir=&#8221;${application.dir}&#8221;&gt;</p>
<p style="margin-bottom:0;">&lt;arg line=&#8221;-i om/,map/ -d src/ -t ${log.dir}/doc&#8221; /&gt;</p>
<p style="margin-bottom:0;">&lt;/exec&gt;</p>
<p style="margin-bottom:0;">&lt;/target&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;target name=&#8221;phpCodeSniffer&#8221;&gt;</p>
<p style="margin-bottom:0;">&lt;exec executable=&#8221;phpcs&#8221; dir = “$${project.dir}&#8221;   output= “${log.dir}/log/ CodesnifferResult.xml&#8221;/&gt;                            		&lt;arg line=&#8221;&#8211;report=checkstyle &#8211;standard=Symfony –ignore= what are the files you want to exclude from code sniffs activity&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;/exec&gt;</p>
<p style="margin-bottom:0;">&lt;/target&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;/project&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><span style="font-size:medium;"><strong>Cruisecontrol Config File</strong></span></p>
<p style="margin-bottom:0;">CruiseControl have one  configuration file config.xml that holds all projects. This file can be found the CruiseControl main directory. The main steps are</p>
<p style="margin-bottom:0;"><strong>a) First of all we need to add project element for our projet. </strong></p>
<p style="margin-bottom:0;">&lt;project name=&#8221;phpundercontrol.org&#8221; buildafterfailed=&#8221;false&#8221;&gt;  the buildafterfailed can be used to force CruiseControl that it retries to build a project, after a failed build without changes to the project sources. This option can be useful if the build process is based on an external resource, like a database server that could timeout during the build process.</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>b) Including required plugins</strong></p>
<p style="margin-bottom:0;">if we use svn checkout for getting the application then we must load corresponding plugin to the config.xml file</p>
<p style="margin-bottom:0;">&lt;plugin name=&#8221;svn&#8221;</p>
<p style="margin-bottom:0;">classname=&#8221;net.sourceforge.cruisecontrol.sourcecontrols.SVN&#8221; /&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>c)  Modificationset</strong></p>
<p style="margin-bottom:0;">It describe when will a new build happen, We can configure it in two methods first one by defining time intervells and second one is when there was a source.</p>
<p style="margin-bottom:0;">&lt;modificationset quietperiod=&#8221;60&#8243;&gt;</p>
<p style="margin-bottom:0;">&lt;svn localWorkingCopy=&#8221;projects/${project.name}/source/&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;/modificationset&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>d) Schedule</strong></p>
<p style="margin-bottom:0;">schedule element defines the number seconds to wait between two builds. The default schedule interval is 300 seconds(five minutes).</p>
<p style="margin-bottom:0;">&lt;schedule interval=&#8221;6000&#8243;&gt;</p>
<p style="margin-bottom:0;">&lt;ant anthome=&#8221;apache-ant-1.7.0&#8243; buildfile=&#8221;projects/${project.name}/build.xml&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;/schedule&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>e) Listeners</strong></p>
<p style="margin-bottom:0;">&lt;listeners&gt;</p>
<p style="margin-bottom:0;">&lt;currentbuildstatuslistener file=&#8221;logs/${project.name}/status.txt&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;/listeners&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>f) Bootstrappers</strong></p>
<p style="margin-bottom:0;">&lt;bootstrappers&gt;</p>
<p style="margin-bottom:0;">&lt;antbootstrapper anthome=&#8221;apache-ant-1.7.0&#8243; buildfile=&#8221;projects/${project.name}/build.xml&#8221; /&gt;</p>
<p style="margin-bottom:0;">&lt;/bootstrappers&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>g) Logging</strong></p>
<p style="margin-bottom:0;">Here we merge the logfiles</p>
<p style="margin-bottom:0;">&lt;log&gt;</p>
<p style="margin-bottom:0;">&lt;merge dir=&#8221;projects/${project.name}/build/&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;/log&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>h) Publishers</strong></p>
<p style="margin-bottom:0;">By using this we publish our results and send build status to the corresponding team members</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;execute command=&#8221;phpuc graph logs/${project.name} artifacts/${project.name}&#8221; /&gt;</p>
<p style="margin-bottom:0;">&lt;artifactspublisher dir=&#8221;projects/${project.name}/build/doc&#8221; dest=&#8221;artifacts/${project.name}&#8221; subdirectory=&#8221;doc&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;artifactspublisher dir=&#8221;projects/${project.name}/build/coverage-report&#8221; dest=&#8221;artifacts/${project.name}&#8221; subdirectory=&#8221;coverage&#8221;/&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;email mailhost=&#8221;host&#8221;</p>
<p style="margin-bottom:0;">returnaddress=&#8221;Daily-build@qburst.com&#8221;</p>
<p style="margin-bottom:0;">buildresultsurl=&#8221;${build.url}/buildresults/${project.name}&#8221;</p>
<p style="margin-bottom:0;">skipusers=&#8221;false&#8221;&gt;</p>
<p style="margin-bottom:0;">&lt;!&#8211;Add the SVN commit users ID and e-mail address&#8211;&gt;</p>
<p style="margin-bottom:0;">&lt;map alias=&#8221;PL&#8221; address=&#8221;pl@urcomapany.com&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;always address=&#8221;me@urcomapany .com&#8221; /&gt;</p>
<p style="margin-bottom:0;">&lt;/email&gt;</p>
<p style="margin-bottom:0;">&lt;/publishers&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><strong>The final config file look like</strong></p>
<p style="margin-bottom:0;">&lt;cruisecontrol&gt;</p>
<p style="margin-bottom:0;">&lt;plugin name=&#8221;svn&#8221; classname=&#8221;net.sourceforge.cruisecontrol.sourcecontrols.SVN&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;project name=&#8221;project name&#8221;&gt;</p>
<p style="margin-bottom:0;">&lt;listeners&gt;</p>
<p style="margin-bottom:0;">&lt;currentbuildstatuslistener file=&#8221;logs/${project.name}/status.txt&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;/listeners&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;bootstrappers&gt;</p>
<p style="margin-bottom:0;">&lt;antbootstrapper anthome=&#8221;apache-ant-1.7.0&#8243; buildfile=&#8221;projects/${project.name}/build.xml&#8221; /&gt;</p>
<p style="margin-bottom:0;">&lt;/bootstrappers&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;modificationset quietperiod=&#8221;10&#8243; requiremodification=&#8221;false&#8221;&gt;</p>
<p style="margin-bottom:0;">&lt;svn filesystem folder=&#8221;projects/${project.name}&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;/modificationset&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;schedule interval=&#8221;6000&#8243;&gt;</p>
<p style="margin-bottom:0;">&lt;ant anthome=&#8221;apache-ant-1.7.0&#8243; buildfile=&#8221;projects/${project.name}/build.xml&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;/schedule&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;log&gt;</p>
<p style="margin-bottom:0;">&lt;merge dir=&#8221;projects/${project.name}/build/log&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;merge dir=&#8221;projects/${project.name}/source/log&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;/log&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;publishers&gt;</p>
<p style="margin-bottom:0;">&lt;execute command=&#8221;phpuc graph logs/${project.name} artifacts/${project.name}&#8221; /&gt;</p>
<p style="margin-bottom:0;">&lt;artifactspublisher dir=&#8221;projects/${project.name}/build/doc&#8221; dest=&#8221;artifacts/${project.name}&#8221; subdirectory=&#8221;doc&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;artifactspublisher dir=&#8221;projects/${project.name}/build/coverage-report&#8221; dest=&#8221;artifacts/${project.name}&#8221; subdirectory=&#8221;coverage&#8221;/&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">&lt;email mailhost=&#8221;host&#8221;</p>
<p style="margin-bottom:0;">returnaddress=&#8221;Daily-build@qburst.com&#8221;</p>
<p style="margin-bottom:0;">buildresultsurl=&#8221;${build.url}/buildresults/${project.name}&#8221;</p>
<p style="margin-bottom:0;">skipusers=&#8221;false&#8221;&gt;</p>
<p style="margin-bottom:0;">&lt;!&#8211;Add the SVN commit users ID and e-mail address&#8211;&gt;</p>
<p style="margin-bottom:0;">&lt;map alias=&#8221;PL&#8221; address=&#8221;pl@urcomapany.com&#8221;/&gt;</p>
<p style="margin-bottom:0;">&lt;always address=&#8221;me@urcomapany .com&#8221; /&gt;</p>
<p style="margin-bottom:0;">&lt;/email&gt;</p>
<p style="margin-bottom:0;">&lt;/publishers&gt;</p>
<p style="margin-bottom:0;">&lt;/project&gt;</p>
<p style="margin-bottom:0;">&lt;/cruisecontrol&gt;</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><span style="font-size:small;"><strong>Notes :</strong></span></p>
<p style="margin-right:.41in;margin-bottom:0;">1) By defult we can see the result using URL <a id="d50p360" href="http://localhost:8080/">http://localhost:8080</a>.	But we can config this URL by adding a extra property in the config file &lt;property name=&#8221;build.url&#8221; value=&#8221;<a id="d50p361" href="http://your/">http://your</a> URL:5001&#8243; /&gt;</p>
<p style="margin-bottom:0;">If we enter different port other than 8080, then you should also change the jmxport  -webport  -rmiport   in cruisecontrol.sh/cruisecontrol.bat file</p>
<p style="margin-bottom:0;">2) You can make sure that file names coverage and doc  are same in the main.jsp file</p>
<p style="margin-bottom:0;">3) You can change the styles of the phpundercontrol page by editing the jsp files in the cruisecontrol/webapps/cruisecontrol/</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><span style="font-size:small;"><strong>Reference</strong></span></p>
<p style="margin-bottom:0;"><a id="d50p371" href="http://www.phpundercontrol.org/">http://www.phpundercontrol.org</a></p>
<p style="margin-bottom:0;"><a id="d50p373" href="http://trac.symfony-project.org/wiki/HowToSaveLimeTestsInXUnitFormatAndIntegrateThemWithCruiseControl">Symfony plugins for Cruisecontrol</a></p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;"><span style="font-size:small;"></span></p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/anoosphpundercontrol.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/anoosphpundercontrol.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anoosphpundercontrol.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anoosphpundercontrol.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anoosphpundercontrol.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anoosphpundercontrol.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/anoosphpundercontrol.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/anoosphpundercontrol.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/anoosphpundercontrol.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/anoosphpundercontrol.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anoosphpundercontrol.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anoosphpundercontrol.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anoosphpundercontrol.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anoosphpundercontrol.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anoosphpundercontrol.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anoosphpundercontrol.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoosphpundercontrol.wordpress.com&amp;blog=4358442&amp;post=3&amp;subd=anoosphpundercontrol&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://anoosphpundercontrol.wordpress.com/2008/07/29/phpundercontrol-framework-for-symfony-projects/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/19c4f35d56f3e27de832e0fb69946158?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">anoopvdk</media:title>
		</media:content>
	</item>
	</channel>
</rss>
