<?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/"
	>

<channel>
	<title>Dominique Stender &#187; Agile</title>
	<atom:link href="http://www.st-webdevelopment.com/category/agile/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.st-webdevelopment.com</link>
	<description>Good software is only the beginning...</description>
	<lastBuildDate>Wed, 14 Apr 2010 17:50:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Pen &amp; paper Scrum &#8211; 10 days edition</title>
		<link>http://www.st-webdevelopment.com/agile/2010/04/pen-paper-scrum-10-days-edition/</link>
		<comments>http://www.st-webdevelopment.com/agile/2010/04/pen-paper-scrum-10-days-edition/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 13:09:12 +0000</pubDate>
		<dc:creator>Dominique</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[KISS]]></category>
		<category><![CDATA[Scrum]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.st-webdevelopment.com/?p=422</guid>
		<description><![CDATA[New templates for ten day sprints to use in Scrum with pen &#038; paper.]]></description>
			<content:encoded><![CDATA[<p>True to the spirit of continuous improvement I just created new printout templates for a <a href="http://www.st-webdevelopment.com/wp-content/uploads/2010/04/SprintBacklog.v1.1-10days.pdf">Sprint Backlog</a> and a <a href="http://www.st-webdevelopment.com/wp-content/uploads/2010/04/SprintBurndownChart.v1.0.pdf">Sprint Burndown Chart</a> for ten-day sprints with <a title="Original article on Scrum with pen &amp; paper" href="/management/2010/01/scrum-pen-paper/" target="_self">pen &amp; paper Scrum</a>.</p>
<p>Hope you find them as useful as I do.</p>
<p>If you're irritated about what pen &amp; paper Scrum is refer to the <a title="Original article on Scrum with pen &amp; paper" href="/management/2010/01/scrum-pen-paper/" target="_self">original article</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.st-webdevelopment.com/agile/2010/04/pen-paper-scrum-10-days-edition/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Scrum with pen &amp; paper</title>
		<link>http://www.st-webdevelopment.com/management/2010/01/scrum-pen-paper/</link>
		<comments>http://www.st-webdevelopment.com/management/2010/01/scrum-pen-paper/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 02:22:08 +0000</pubDate>
		<dc:creator>Dominique</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Management]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[KISS]]></category>
		<category><![CDATA[project management]]></category>
		<category><![CDATA[Scrum]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.st-webdevelopment.com/?p=291</guid>
		<description><![CDATA[Dominique Stender hands out a set of no more than five .pdf print-out templates to enable you to get started with Scrum quickly and based solely on pen&#038;paper, thus not requiring the purchase of any tools.]]></description>
			<content:encoded><![CDATA[<p>A friend of mine recently asked me if I'd know any good freeware tools for use with Scrum. Well, I told him, I don't have any first hand experience with freeware Scrum tools but there certainly are a few.</p>
<p>However in the case that you're just starting with Scrum I would argue that you might be better off without tools. All tools force you into some kind of process that works for somebody else, but might not be optimal for you.</p>
<p>So instead of jumping to a fancy tool that comes with all the bells and whistles instantly, I'd recommend starting as low-tech as possible, learn the basics and discover your individual needs. After that you are enabled to get the Scrum tool that does exactly what you need it to do.</p>
<p>How do you start low-tech? Use pen and paper.<span id="more-291"></span></p>
<h4>Experience over tools</h4>
<p>Scrum as an agile methodology has a very shallow complexity. It doesn't require many artefacts in the forms of documents, lists, reports or charts.</p>
<p>The artefacts defined in Scrum are the <a href="http://www.st-webdevelopment.com/wp-content/uploads/2009/12/ProductBacklog.v1.1.pdf">Product Backlog</a>, <a href="http://www.st-webdevelopment.com/wp-content/uploads/2009/12/SprintBacklog.v1.1.pdf">Sprint Backlog</a> and a <a href="http://www.st-webdevelopment.com/wp-content/uploads/2009/12/SprintBurndownChart.v1.0.pdf">Sprint Burndown Chart</a>. Personally I find two more "artefacts" to be extremely useful: <a href="http://www.st-webdevelopment.com/wp-content/uploads/2009/12/UserStory.1.2.pdf">User Story Cards</a> and one set of <a href="http://www.st-webdevelopment.com/wp-content/uploads/2009/12/PlaningPokerCards.1.1.pdf">Planning Poker Cards</a> for each team member.</p>
<p>No more than three documents plus two helpers for all your project management needs. Sounds like thin ice? Believe me, I know how you feel but hear me out.</p>
<p>I started off doing Scrum in a waterfall environment, using tools that where developed for waterfall projects. It gave me the advantage of familiarity with the tools (false security?) but at the price of bad usability and cumbersome overhead.</p>
<p>Only since my ScrumMaster Certification I see the benefit of using low-tech "tools" like pen and paper. It is faster, more fun, breeds involvement and identification, can be distributed without permission and data security problems and most important: You will get a much better understanding how Scrum actually works.</p>
<p>Granted, the "high-tech" tools mandatory for my company are still in use, but I already wrote an <a title="My article on Attempting Scrum in a SDLC environment" href="/agile/2009/12/attempting-scrum-sdlc-environment-pt-2/" target="_self">article how to utilize SDLC tools best for Scrum</a> so let's keep that aside for a moment.</p>
<p>Doing Scrum "hands-on" with pen and paper is easier than you might think. There are no complex metrics or calculations to perform. You will see that your planning meetings get a totally different dynamic if you work with a stack of user story cards and pen &amp; paper. People interact physically with each other rather than staring at the pale image of the projector.</p>
<h4>The Product Backlog</h4>
<p>My <a href="http://www.st-webdevelopment.com/wp-content/uploads/2009/12/ProductBacklog.v1.1.pdf">product backlog template</a> is as simple as it gets. One column with the user story number, to make identification easy. A title and a complexity column is all that is filled out in the beginning, usually by the product owner.</p>
<p>In the planning sessions the team will use its planning poker cards to agree upon a complexity which we fill out together in the second column to the right.</p>
<p>Last not least I added a column for dependencies. This will contain the user story number(s) that need to be completed before the one at hand can be filled out.</p>
<h4>The User Story Cards</h4>
<p>The title of a feature in the product backlog serves only as a short summary of the feature itself. It will not explain the task, only give it a name.</p>
<p>User stories fill that gap. My <a href="http://www.st-webdevelopment.com/wp-content/uploads/2009/12/UserStory.1.2.pdf">User Story Card template</a> is half of an A-4 size paper, print it on a duplex printer (so that page 2 of the template is printed on the back) and cut it in half.</p>
<p>The head of the front page of the user story contains the user story number and the priority, both also found in the product backlog. Another header entry, the estimation is left empty. Here we will the required time (not points!) for the task, in the sprint planning meeting.</p>
<blockquote><p>Note that I estimate the features in the product backlog in story points through planning poker, but the tasks of a sprint in hours. One user story is usually comprised of several tasks. The "estimation" value on the user story card is the sum of hours for all tasks of this story.</p></blockquote>
<p>The main part of the front of the user story card is pretty much standard, it has to be filled with the role of the user ("as a ..."), a feature description ("I would like to ...") and the purpose of the feature ("in order to...").</p>
<blockquote><p>For example "<em>As a</em> logged in user <em>I would like to</em> be able to edit and store my delivery address <em>in order to</em> have it pre filled in the shopping basket."</p></blockquote>
<p>In short, the front of the card will give a good overview of a feature. The back contains additional notes and the acceptance criteria as given in the planning meeting.</p>
<h4>The Planning Poker Cards</h4>
<p>Planning poker is easy to perform but I find it notoriously difficult to describe. I will leave it to the ever helpful Wikipedia to give a good run-down of <a title="The Wikipedia on the process of planning poker" href="http://en.wikipedia.org/wiki/Planning_poker#Process" target="_blank" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Planning_poker_Process?referer=');">the process of planning poker</a>.</p>
<p>I can provide you with a template to cut out your own set of <a href="http://www.st-webdevelopment.com/wp-content/uploads/2009/12/PlaningPokerCards.1.1.pdf">Planning Poker Cards</a>. Bring a stack of uncut prints to your next meeting along with a bunch of scissors and cut them out together. Play your first couples of rounds on non-critical features or even features that do not exist in reality.</p>
<h4>The Sprint Backlog</h4>
<p>In the sprint planning meeting I bring the product backlog along, which has the complexity column already filled out. It contains the complexity in terms of story points, derived through planning poker.</p>
<p>During sprint planning the team picks features from the product backlog that have the highest priority to the product owner. The priority is usually based on business value so it makes perfect sense to finish the most valuable features first.</p>
<p>The user story that belongs to a product backlog feature is read aloud and a discussion starts. Questions are raised and clarified. This continues for a couple of minutes until the feature is commonly understood. Then, the team breaks the feature down in smaller tasks, which are written into the sprint backlog.</p>
<p>The <a href="http://www.st-webdevelopment.com/wp-content/uploads/2009/12/SprintBacklog.v1.1.pdf">sprint backlog template</a> once again contains the user story number to easily identify and group the tasks. The sprint backlog also contains a column for the name of the task and a whole lot of columns for numbers.</p>
<p>In the sprint planning session we discuss the overall complexity of each task of a feature and estimate an amount of time (in hours). This value is being written into the "Est." column, marking the initial estimation.</p>
<blockquote><p>Note that some teams prefer to estimate both product backlog features and sprint backlog tasks in story points (planning poker) while others prefer to estimate both in time. You'll have to find out what works best for you.</p></blockquote>
<p>The other columns marked "owner" and "1" to "15" are not filled out yet. During the sprint the team members will pick tasks for them to implement, and write their name into the "owner" column as soon as they do so.</p>
<p>Every evening before leaving the office the team members do a re-assessment how much time on their current task <em>is left </em>and write that into the column marking the Nth day of the sprint.</p>
<p>Let me say that again: The columns "1" to "15" contain the amount of time <em>that is left</em>. It is irrelevant how much time someone spent on a task. The criticality of a delay derives from too much work remaining.</p>
<h4>The Sprint Burndown Chart</h4>
<p>Finally there is the <a href="http://www.st-webdevelopment.com/wp-content/uploads/2009/12/SprintBurndownChart.v1.0.pdf">sprint burndown chart</a> which will display the amount of work <em>remaining </em>on an every day basis.</p>
<p>At the end of the sprint planning meeting the sum of time in the "Est." column of the sprint backlog is transferred to the "day 0" column in the sprint burndown chart.</p>
<blockquote><p>Note that the vertical axis doesn't have numbers assigned to it. Those vary wildly depending on team size, velocity and sprint length. Fill it out yourself.</p></blockquote>
<p>During the sprint I will take the sprint backlog every morning and update the sum of time at it's bottom. This number is X'ed on the corresponding "day N" column of the burndown chart and the joining X's connected. Done before each daily scrum this is a good information radiator telling everybody how well the progress is without even talking about it.</p>
<blockquote><p>It is a good idea to draw a line of "ideal progress" onto the burndown chart as well. This is a straight line, starting at the sum of values of the "Est." column in the sprint backlog, going straight to zero at the column of the last sprint day. This way you can easily real progress with ideal progress.</p></blockquote>
<h4>Conclusion</h4>
<p>So there you are, a <a href="http://www.st-webdevelopment.com/wp-content/uploads/2009/12/PenAndPaperScrum.zip">complete set of templates</a> for your pen &amp; paper based Scrum management needs. For your convenience I've also prepared a .zip file of all .pdfs that will also contain a set of Office 2000 compatible .doc and .xls files of the same templates.</p>
<p>Give it a try.</p>
<p>You can always come back to technical solutions or add a column here and there if you think you'll need them. The KISS principle applies. Keep it simple. I haven't really found a need for more columns in my projects yet. But your mileage may vary.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.st-webdevelopment.com/management/2010/01/scrum-pen-paper/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Estimation techniques compared</title>
		<link>http://www.st-webdevelopment.com/management/2010/01/estimation-techniques-compared/</link>
		<comments>http://www.st-webdevelopment.com/management/2010/01/estimation-techniques-compared/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 11:32:55 +0000</pubDate>
		<dc:creator>Dominique</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Management]]></category>
		<category><![CDATA[COCOMO]]></category>
		<category><![CDATA[estimation]]></category>
		<category><![CDATA[PERT]]></category>
		<category><![CDATA[planning poker]]></category>

		<guid isPermaLink="false">http://www.st-webdevelopment.com/?p=254</guid>
		<description><![CDATA[An experience base comparison of three estimation techniques for IT projects. I compare PERT, COCOMO and Planning Poker and discuss their individual pros and cons.]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-275" title="clockwork" src="http://www.st-webdevelopment.com/wp-content/uploads/2009/12/clockwork.jpg" alt="clockwork" width="190" height="400" />I was inspired to write this article by several threads in forums covering agile methodologies. The basic discussion was whether to estimate based on Story Points or time. To me - and most people participating in those discussions - there is no silver bullet and you will have to find out what works best for you yourself. In this article I'd like to muse about the various estimation techniques that I'm familiar with as well as the pros and cons that I ran into with each of them.</p>
<p>I will compare PERT and COCOMO, both being traditional techniques with a long history and Planning Poker, probably the most prevalent agile estimation technique.</p>
<p>All techniques have their pros and cons and it will be up to you to determine which technique will work best in your environment.</p>
<p>My comparison is purely based on experience, which is broader for PERT and more narrow for COCOMO and to some extend Planning Poker. Your mileage may vary. This article does not intend to be the definite guide on estimation techniques.</p>
<p>That being said, let's start shall we?<span id="more-254"></span></p>
<h4>PERT</h4>
<p>The <a title="Summary on PERT estimation" href="http://www.envisionsoftware.com/Management/Pert_Estimation.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.envisionsoftware.com/Management/Pert_Estimation.html?referer=');">PERT estimation</a> is the standard estimation technique at my company. It is time-based and probability-based. The basic formula is to estimate an optimistic time (Topt), realistic time (Treal) and pessimistic time (Tpess) for an activity and generate a mean value (Tm) based on the formula Tm = (Topt + 4 * Treal + Tpess) / 6.</p>
<p>The realistic time Treal is weighted four times higher than the optimum time and worst case time, the sum of all three is divided by six.</p>
<p>For example if a task might complete in two days if everything runs fine, in three days under normal conditions and in five days if we run into complications the PERT value would be (2 + 4*3 + 5) / 6 ~= 3.2 days.</p>
<p>If you estimate all tasks of a project with PERT you can generate the variance and get a buffer value out of it which can be pretty handy. Don't trust that buffer blindly though.</p>
<p>One of the pros for me is that PERT acknowledges the fact that humans are particularly bad in estimating a task down to a single number. The thought of optimistic, realistic and pessimistic cases alone works wonders in discussions. The formula usually does a decent job to come up with a mean value.</p>
<p>Also a pro for PERT is that it is reasonably fast. Estimating a 3 month project on a level of abstraction needed for an offer usually takes no longer than a couple of hours.</p>
<p>My biggest con against PERT is that it is easy to misuse it. What I see frequently is that a discussion starts whether or not a particular task has a risk. Often that leads to optimum and realistic estimation being the same, let's say 2-2-5 instead of 2-3-5 as shown above. Or in a similar manner, realistic and pessimistic estimation are the same: 2-3-3.</p>
<p>Instead of the above mentioned 3.2 days for 2-3-5 we get 2.5 days for 2-2-3 and 2.8 days for 2-3-3. In a nutshell that ruins your buffer. You do not want that.</p>
<p>Another more general issue I have is that PERT is time-based but I'll get to that in a bit.</p>
<h4>COCOMO</h4>
<p>For me <a title="The Wikipedia on the COCOMO estimation technique" href="http://en.wikipedia.org/wiki/COCOMO" target="_blank" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/COCOMO?referer=');">COCOMO </a>is the rocket science approach for estimations. It is complexity-based and rooted on calibration through historic data. The algorithm behind COCOMO will get fine tuned over time, while your "database" of historic data grows.</p>
<p>The key figure in COCOMO is the lines of code (LOC or SLOC), more frequently thousand lines of code (KSLOC). You need to know - or in the first project, estimate - how long it takes to produce 1000 lines of functional code. Analysis, design, coding, testing, ... included.</p>
<p>Then you need to do an estimation of how many lines of code will have to be written or changed for the new project.</p>
<p>A set of factors or "cost drivers" such as project complexity, required quality, team experience etc. is applied to the estimations and after putting all this into a formula you get the estimated amount of time.</p>
<p>By far my biggest issue with COCOMO is that it is slow and too complex. You can't get decent estimation quality with COCOMO in a short manner of time. Even intermediate COCOMO takes into account no less than fifteen cost drivers, all of which affect each and every task. The bottomline is that you need a tool for estimating.</p>
<p>Disclaimer: There is a variant of COCOMO that is faster than traditional COCOMO. Personally I don't find that to be very exact, though and hence not very useful.</p>
<p>The second con against COCOMO is that it is fragile. Change your team constellation from one team to another and your historic data is useless. The same applies more or less for all other cost drivers.</p>
<p>I like the idea that COCOMO gets calibrated with time through your historic estimations. But in the reality of changing teams, hardly comparable projects and time pressure that leads to historic data not being available in a clean form frankly I never saw that work. Granted, that is not a failure of COCOMO but rather the methodology not working for us.</p>
<p>What I generally like in COCOMO is that it is complexity-based rather than time-based.</p>
<h4>Planning Poker</h4>
<p><a title="The Wikipedia on the Planning Poker estimation technique" href="http://en.wikipedia.org/wiki/Planning_poker" target="_blank" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Planning_poker?referer=');">Planning poker</a> is an agile estimation technique. As the name implies it is based on playing cards (<a title="Planning poker cards .pdf for download" href="/agile/2009/11/planning-poker-cards-pdf-download/" target="_self">my .pdf for download</a>) . The estimations in planning poker are relative, complexity-based and consensus-oriented.</p>
<p>Each planning poker card will show a number: "0.5-1-2-3-5-8-13-20-40-100-?-infinity" are a common set but there are other variations. The card "?" indicates that the estimating person can't estimate the task and "infinity" translates into "really, really huge" and can be seen as a sign that the task should be broken down into several smaller tasks.</p>
<p>The estimation works as follows: Each team member has a set of cards on his own. A task is explained, usually by the product owner / customer. A discussion takes place to clarify doubts from the team. After the task is clear, each team member picks a card out of his stack secretly and in unison they show the cards to each other.</p>
<p>If the numbers on each team members' card are reasonably close together (i.e. 8-13-8-8-5-13) a rough mean value is "calculated" (probably 8 in this case) and the next task comes up for estimation.</p>
<p>In case the numbers vary wildly the team members with the lowest and highest numbers explain why they picked their number. This is to reveal misunderstandings and generate a broader understanding for <em>all </em>team members. After that a second estimation round is performed. The process repeats until all numbers are reasonably close.</p>
<p>By now you may ask what the numbers are indicating? They do <em>not </em>indicate time. The card "5" does not mean "five days" or "five hours". The cards indicate complexity. There is no unit for the numbers, they are commonly referred to as story points or points for short.</p>
<p>What points show is that a task with a complexity of 2 is twice as complex as a task with 1 point and roughly half as complex as a 5 point task.</p>
<p>When estimating with planning poker it is absolutely mandatory to understand that each tasks complexity is only relative to another task. So what you do is you pick a comparable task that has already been developed (from your last project or the last sprint in the current project) and assign a medium sized number to it, for example "eight". Now for the current bunch of tasks you ask your team to compare the new task to that one and pick a card from their stack based on its relative size.</p>
<p>What you get is a consensus-based estimation how big or small a current task is related to one that is well known and understood. Since a task with complexity "eight" is almost twice as big as complexity "five", and you know how much time "eight" took to plan, develop, document and test, you have a rough idea how long the new task with complexity "five" will take.</p>
<p>My biggest pro for Planning Poker is that it will enable your team to estimate their own work. Usually this will take a few iterations as they need to get to know their own pitfalls but the long term benefits clearly outweigh the initial pains. Once the team knows how to estimate, you will not find anyone outside the team who can estimate the teams own work.</p>
<p>Another big pro for Planning Poker is that it is by far the fastest approach and that it is fun. Calculating numbers for hours and hours is boring, planning poker is more of a focused discussion.</p>
<p>One negative aspect of Planning Poker is that it is somewhat fragile. If your team size changes often, getting good estimations out of Pllanning Poker might be hard. But in agile the team constellation should stay constant even more than in traditional methodologies.</p>
<h4>Bottomline</h4>
<p>That's it, the three estimation techniques I'm most familiar with.</p>
<p>If you work in a traditional environment, give PERT a try. Use COCOMO if you can afford the overhead and if you have comparable projects in a very stable environment.</p>
<p>In any case I urge you to try out Planning Poker. While the methodology itself is agile, I don't see why Planning Poker should not work for you, even if you're in a traditional waterfall of SDLC environment. It will give your team a much better understanding of the upcoming work and enable it to participate in a project at a much earlier stage than usual. Through that, the team will feel involved and motivation will go up.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.st-webdevelopment.com/management/2010/01/estimation-techniques-compared/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ken Schwaber&#8217;s &#8220;Confusion about Scrum&#8221;</title>
		<link>http://www.st-webdevelopment.com/agile/2010/01/ken-schwaber-confusion-scrum/</link>
		<comments>http://www.st-webdevelopment.com/agile/2010/01/ken-schwaber-confusion-scrum/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 06:50:14 +0000</pubDate>
		<dc:creator>Dominique</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Jeff Sutherland]]></category>
		<category><![CDATA[Ken Schwaber]]></category>
		<category><![CDATA[Scrum]]></category>
		<category><![CDATA[split up]]></category>

		<guid isPermaLink="false">http://www.st-webdevelopment.com/?p=297</guid>
		<description><![CDATA[My thoughts about the article by Ken Schwaber "Confusion about Scrum" and the possible implication on a global scale]]></description>
			<content:encoded><![CDATA[<p>On December 31st 2009 Ken Schwaber posted his article "<a title="Ken Schwaber: Confusion about Scrum" href="http://groups.yahoo.com/group/scrumdevelopment/message/43850" target="_blank" onclick="pageTracker._trackPageview('/outgoing/groups.yahoo.com/group/scrumdevelopment/message/43850?referer=');">Confusion about Scrum</a>" in the Yahoo <a title="The Yahoo! Newsgroup on ScrumDevelopment" href="http://groups.yahoo.com/group/scrumdevelopment/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/groups.yahoo.com/group/scrumdevelopment/?referer=');">ScrumDevelopment</a> Newsgroup.</p>
<p>He states that</p>
<blockquote><p>There are now two definitions of Scrum. One is maintained and sustained by Jeff Sutherland and myself at <a title="Scrum.org" href="http://www.scrum.org" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.scrum.org?referer=');">www.scrum.org</a>. Another is an old copy that is posted at <a title="The ScrumAlliance" href="http://www.scrumalliance.org" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.scrumalliance.org?referer=');">www.scrumalliance.org</a>, by the ScrumAlliance.</p></blockquote>
<p>His article continues mentioning what sounds like the start of a copyright dispute over the Chinese version of the<a title="Ken Schwaber, Jeff Sutherland: The Scrum Guide" href="http://www.scrum.org/storage/scrumguides/Scrum%20Guide.pdf" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.scrum.org/storage/scrumguides/Scrum_20Guide.pdf?referer=');"> Scrum Guide</a> (English version) which in its original form is written and maintained by Ken Schwaber and Jeff Sutherland. Apparently now the ScrumAlliance claims ownership to the Chinese translation of the <a title="Ken Schwaber, Jeff Sutherland: The Scrum Guide" href="http://www.scrum.org/storage/scrumguides/Scrum%20Guide.pdf" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.scrum.org/storage/scrumguides/Scrum_20Guide.pdf?referer=');">Scrum Guide</a> (again the English version). As Ken points out</p>
<blockquote><p>Any of you familiar with copyright law know that a derivative of the original is still owned by the original copyright holder.</p></blockquote>
<p>Ken Schwaber recommends</p>
<blockquote><p>that you refer to the<a title="Ken Schwaber, Jeff Sutherland: The Scrum Guide" href="http://www.scrum.org/storage/scrumguides/Scrum%20Guide.pdf" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.scrum.org/storage/scrumguides/Scrum_20Guide.pdf?referer=');"> Scrum Guide</a> created and sustained by<br />
the authors of Scrum, Jeff and myself.</p></blockquote>
<p>This is serious news.<span id="more-297"></span></p>
<h4>Do we see the beginning of a split up of Scrum?</h4>
<p>Well I don't know about that but the way I read the article we are seeing a split up between Ken Schwaber and Jeff Sutherland with the ScrumAlliance.</p>
<p>Already <a title="Scrum.org" href="http://www.scrum.org/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.scrum.org/?referer=');">scrum.org</a>, maintained by Ken Schwaber and Jeff Sutherland offers a Scrum Assessment program that looks similar to the one offered by the ScrumAlliance.</p>
<h4>What good will come out of it?</h4>
<p>Well again, I don't know. My personal opinion is "not so much".</p>
<p>I see Ken's point and his desire to keep his intellectual property his (and Jeff's).</p>
<p>I also agree with Ken that it is required to have one (!) formal description of what Scrum is. As he points out in application Scrum is mixed up with other agile approaches such as Kanban, XP and others. This makes it important to have one (!) "master copy" of what is Scrum and what is not Scrum. A benchmark is required.</p>
<p>Paul Oldfield of Capgemini may be right that in reality, in the scope of your project it does not matter whether your Scrum is 100% pure or whether you mix it with other methodologies in order to make it work for you.</p>
<p><strong>The importance of a formal definition is on the global scale, not on project scale.</strong></p>
<p>If Scrum minus Burndown Chart, plus 30% Kanban and estimations done through COCOMO works in your project, keep doing that! But don't call it Scrum.</p>
<p>There is only one definition for each of software design pattern. Differences in implementation in your project don't matter. But if I ask in a job interview what the "goal" of the Factory design pattern is and the answer is not something along the lines of "it deals with the problem of creating objects without specifying the exact class of object that will be created" ( (c) Wikipedia) the candidate fails. He doesn't know the Factory design pattern.</p>
<p>If you tell me your estimation method is PERT and the formular is "(opt + 3*real + pess) / 6" you are not using PERT. The estimation technique you're using might work perfectly well for you but it is not PERT.</p>
<p>Same for Scrum. The importance of one formal definition lies in what you know and what everybody (!) agrees to, not in what you do.</p>
<h4>We need one formal definition</h4>
<p>We are able to benchmark people against a principle only if there is one commonly agreed upon definition.</p>
<p>If there are several definitions of one principle the whole idea gets diluted and harder to assess. The principle in itself might - but doesn't have to - become less important.</p>
<p>I have no background information on what lead to the confusion as Ken calls it. But surely I hope that all involved parties get back on one table and keep Scrum unique. Keep it simple. Don't dilute it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.st-webdevelopment.com/agile/2010/01/ken-schwaber-confusion-scrum/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Attempting Scrum in a SDLC environment, pt. 2</title>
		<link>http://www.st-webdevelopment.com/agile/2009/12/attempting-scrum-sdlc-environment-pt-2/</link>
		<comments>http://www.st-webdevelopment.com/agile/2009/12/attempting-scrum-sdlc-environment-pt-2/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 16:13:02 +0000</pubDate>
		<dc:creator>Dominique</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Scrum]]></category>
		<category><![CDATA[SDLC]]></category>
		<category><![CDATA[workplace]]></category>

		<guid isPermaLink="false">http://www.st-webdevelopment.de/?p=50</guid>
		<description><![CDATA[Dominique Stender shares a few ideas and experiences on how to use traditional management tools like bug tracking and time tracking / planning software in a more agile way.]]></description>
			<content:encoded><![CDATA[<p>In the <a title="First part of my discussion of Scrum in a SDLC environment" href="/agile/2009/11/attempting-scrum-in-a-sdlc-environment-pt-1/" target="_self">first part</a> of this article series, I covered the aspects of the real life office environment. This included the lack of physical space for pinboards etc. Go check it out.</p>
<p>In this second part I will focus more on the virtual environment, the tools typically used by a company following the traditional waterfall approach / SDLC and how you might still be able to use these tools for Scrum.</p>
<h4>Bug tracking system</h4>
<p><img class="alignleft size-full wp-image-183" title="tentacle" src="http://www.st-webdevelopment.com/wp-content/uploads/2009/12/tentacle.jpg" alt="tentacle" width="190" height="399" />Let me start with the bug tracking system. Most likely your organization will have one of those. Typically issues can be categorized, prioritized and assigned to a person as well as tagged or grouped into releases. To make this tool work for you in a more agile way you could create a couple of additional categories and put everything (!) into that system: Don't put only issues into it. Also add things like feature requests, enhancements, documentation, testing and refactoring tasks. I'm sure you can come up with more with a bit of thinking. Just be careful not to make this more complicated than required... <img src='http://www.st-webdevelopment.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Well, that looks pretty much like a product backlog to me. You can do a printout of the overview and pin that to the board for better clarity. Stick it to the window with Scotch Tape if you don't have a pin board. In any case you should make this virtual backlog physical, otherwise the transparency will suffer. Only with a physical product backlog the team will have a clear idea about the big picture.</p>
<p>The overhead to maintain that printout would be minimal. You effectively avoid having two independent lists (in my experience always a recipe for disaster) and your not-so-agile management will probably be pleasantly surprised by the transparency you introduce.</p>
<h4><span id="more-50"></span>Time tracking system</h4>
<p>Next on my list is time tracking software. You know, that thing where you book how much time you spend on  each project and / or task.</p>
<p>Well, there are two major ways to handle these in an agile way.</p>
<p>First, you (or the project manager) can create one bookable item in the tracking software for each of the tasks in the sprint. That'd mean one bookable item for each issue in the Bug tracking system (see above).</p>
<p>The benefit of this approach comes with reports - if that time tracking software allows custom reports based on Excel or similar, you can create a sprint burndown chart quite easily. Each item has a planned amount of effort (from Sprint planning) and the actual effort booked by all team members. That's all you need for a burndown. Calculate the sum of each and have Excel calculate a bar chart for each day - the sum of the planned efforts minus daily booked time is the sum of currently remaining efforts... at least until a task is re-evaluated. In this case you'd have to change your estimation.</p>
<p>The downside of this approach I'd say is efficiency. Depending on how userfriendy the interface is, tracking the time as a member of the agile team in a halfway precise manner can take quite a bit of time. Time better spent elsewhere. However, your company might demand such fine grained tracking. In that case it is best to get the most of it and get the burndown chart out of it as well.</p>
<p>The other way to handle this is on the other extreme of the bandwidth. Create one single task for the project and have all members of the team book all times onto that. They will love you. Higher management however may not, so use this with care. If you decide to go with this, you should encourage the team members to update the story cards with the current estimations, to keep track of where you are in the sprint and to generate the sprint burndown chart manually.</p>
<p>As always, the truth probably is somewhere in between. You could create one task for each type of work, i.e. one each for coding, testing, documentation, technical design, ... This will give much more clarity without too much overhead.</p>
<h4>Conclusion</h4>
<p>Your mileage may vary. The ideas presented here work for me, in the company I work, with the expectations that my management has. This may or may not hold true for you, and in your environment.</p>
<p>Let me know how you handle these situations! Use the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.st-webdevelopment.com/agile/2009/12/attempting-scrum-sdlc-environment-pt-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Continuous integration for PHP, pt. 4</title>
		<link>http://www.st-webdevelopment.com/test-automation/2009/11/howto-continuous-integration-php-pt-4/</link>
		<comments>http://www.st-webdevelopment.com/test-automation/2009/11/howto-continuous-integration-php-pt-4/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 02:51:14 +0000</pubDate>
		<dc:creator>Dominique</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[phing]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[software build]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://www.st-webdevelopment.com/?p=136</guid>
		<description><![CDATA[In the fourth article in the series on continuous integration for PHP Dominique Stender showcases how to run Subversion updates automatically from phing and run a set of tests if a new revision was retrieved from Subversion. ]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-137" title="clouds" src="http://www.st-webdevelopment.com/wp-content/uploads/2009/11/clouds.jpg" alt="clouds" width="190" height="400" />This is the fourth article in my series about continuous integration for PHP. You might want to read the <a title="First article in my continuous integration series, covering basic understanding" href="/test-automation/2009/11/howto-setting-continous-integration-php/" target="_self">first</a>, <a title="Second article in my continuous integration series, covering the server installation" href="/test-automation/2009/11/howto-continuous-integration-php-pt-2/" target="_self">second</a> and <a title="Third article in my series on continuous integration for PHP" href="/test-automation/2009/11/howto-continuous-integration-php-pt-3/" target="_self">third article</a> prior to this.</p>
<p>We're getting closer and closer to full test automation and continuous integration. The last article introduced you to how to write <a title="PHPUnit - unittesting for PHP" href="http://www.phpunit.de" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.phpunit.de?referer=');">PHPUnit </a>tests for <a title="Selenium RC - automated frontend testing" href="http://seleniumhq.org/projects/remote-control/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/seleniumhq.org/projects/remote-control/?referer=');">SeleniumRC </a>so that we can test website frontends through PHPUnit. After that we wrote our own phing build script that ran our backend as well as the frontend tests automatically, generated an code coverage report based on Xdebug as well as an comprehensive APIDoc based on PHPDoc comments.</p>
<p>The phing build script we used for this - test.xml - was executed manually by calling</p>
<pre>phing -f test.xml</pre>
<p>on the command line. Everything happened on the development virtual host.</p>
<p>The next logical step is to automate this and perform the additional tasks required to run continuous integration.</p>
<p>The first step is to do a manual svn checkout on the integration virtual host, so we have setup that is identical to the development virtual host.</p>
<p>Now, what the automation will have to do is a Subversion update of the integration virtual host in order to retrieve the latest copy. If the revision changes in that process (that is, if we indeed fetched newer files from Subversion) we again run the tests and generate the reports. If all tests succeed we can safely assume that we have a running system, and we can decide to create a tarball from it or update the staging system for our project manager / client to check it out. On the other hand, if a test fails we'd like to be notified by email.</p>
<p>This is exactly what a second phing build script will do.</p>
<p><span id="more-136"></span></p>
<h4>Introducing more flexibility</h4>
<p>Before we can do all that, we need to make a small but very important change to the Selenium RC test case. The setUp() method of out tests/TestForm.php file configures SeleniumRC so that it points to http://integration.local which is our development environment. This means that no matter where we run the frontend tests, this test would always test our development environment! Clearly not what we want.</p>
<p>If the developer runs the test manually (by executing phing -f test.xml on the commandline), the development environment has to be used. For the automation, the integration host http://integrate.integration.local has to be used.</p>
<p>We accomplish this by changing the setUp() method to this:</p>
<pre class="php">function setUp() {
  // determine hostname based on phing property
  $startDir = Phing::getProperty('application.startdir');
  preg_match('/\/(default|integration|demo)/', $startDir, $vhostMainDir);

  switch($vhostMainDir[1]) {
    case 'default':
      $browserUrl = 'http://integration.local/';
      break;

    case 'integration':
      $browserUrl = 'http://integrate.integration.local/';
      break;

    case 'demo':
      $browserUrl = 'http://demo.integration.local/';
      break;

    default:
  } // end: switch

  $this-&gt;screenshotUrl    = $browserUrl . 'reports/selenium';
  $this-&gt;screenshotPath    = $_ENV['PWD'] . '/../reports/selenium';
  $this-&gt;setBrowser('*firefox');
  $this-&gt;setBrowserUrl($browserUrl);
} // end: function setUp()</pre>
<p>We retrieve the application.startdir property and with this information we can decide in which environment we run to set the browser URL and the screenshot path correctly.</p>
<h4>Committing and retrieve everything to Subversion.</h4>
<p>With that flexibility issue in the test out of the way we can commit the whole development environment /var/www/vhosts/default to Subversion:</p>
<pre>svn import /var/www/vhosts/default https://your.subversion.server/repository/path/trunk
svn checkout --force https://your.subversion.server/repository/path/trunk /var/www/vhosts/default</pre>
<p>Your development environment now is connected to the subversion repository.</p>
<p>Next, you have to do another svn checkout from the same repository URL, this time to the integration environment.</p>
<pre>svn checkout --force https://your.subversion.server/repository/path/trunk /var/www/vhosts/integration</pre>
<p>Now the integration environment is identical to the development environment.</p>
<blockquote><p>Note that the virtual host configuration file for apache will not be overwritten, since the filenames are different. However the integration environment now contains two .conf files for apache. Since only the correct one is linked to /etc/apache2/sites-available, no harm is done though.</p></blockquote>
<h4>The continuous integration build script.</h4>
<p>The single addition between our manual tests from the test.xml phing build file and the continuous integration is another phing build file that you will find at buildScripts/updateAndBuild.xml. If you open it in an editor it will look like this.</p>
<pre class="xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;project basedir="." default="runTests" name="updateWorkingCopy"&gt;
  &lt;property name="demoDir"      value="/var/www/vhosts/demo" /&gt;
  &lt;property name="baseDir"      value="/var/www/vhosts/integration" /&gt;
  &lt;property name="htdocsDir"    value="${baseDir}/htdocs" /&gt;
  &lt;property name="testDir"      value="${baseDir}/tests/" /&gt;
  &lt;property name="reportDir"    value="${htdocsDir}/reports" /&gt;
  &lt;property name="seleniumDir"  value="${reportDir}/selenium" /&gt;
  &lt;property name="masterFile"   value="updateAndBuild" /&gt;
  &lt;property name="buildVersion" value="1.6.1" /&gt;
  &lt;property name="srcDir"       value="/var/www/vhosts/integration/htdocs" /&gt;
  &lt;property name="svnUser"      value="your_svn_user" /&gt;
  &lt;property name="svnPass"      value="your_svn_password" /&gt;

  &lt;!--fetch current revision of working copy --&gt;
  &lt;target name="getOriginalRevision"&gt;
    &lt;svnlastrevision workingcopy="${baseDir}" propertyname="svnOriginalRevision" /&gt;
    &lt;echo msg="Current revision of this working copy: ${svnOriginalRevision}" /&gt;
  &lt;/target&gt;

  &lt;!-- update local working copy --&gt;
  &lt;target name="svnUpdate"&gt;
    &lt;svnupdate username="${svnUser}" password="${svnPass}" nocache="true" todir="${baseDir}" /&gt;
  &lt;/target&gt;

  &lt;!-- fetch revision of working copy again --&gt;
  &lt;target name="getCurrentRevision" depends="svnUpdate"&gt;
    &lt;svnlastrevision workingcopy="${baseDir}" propertyname="svnCurrentRevision" /&gt;
    &lt;echo msg="Revision of this working copy after svn update: ${svnCurrentRevision}" /&gt;
  &lt;/target&gt;

  &lt;!-- create the tarball from the integration VHost--&gt;
  &lt;target name="tar"&gt;
    &lt;echo msg="Creating archive..." /&gt;
    &lt;tar destfile="${baseDir}/builds/build-${buildVersion}.r${svnCurrentRevision}.tar.gz" compression="gzip"&gt;
      &lt;fileset dir="${htdocsDir}"&gt;
        &lt;include name="**" /&gt;
        &lt;exclude name="reports/**" /&gt;
      &lt;/fileset&gt;
    &lt;/tar&gt;
    &lt;echo msg="Build copied and compressed into directory!" /&gt;
  &lt;/target&gt;

  &lt;!-- updates the demo VHost after all tests have succeeded --&gt;
  &lt;target name="updateDemo"&gt;
    &lt;!-- change baseDir to demoDir --&gt;
    &lt;property name="baseDir" value="${demoDir}" override="true" /&gt;
    &lt;phingcall target="svnUpdate" /&gt;
  &lt;/target&gt;

  &lt;!-- compare original and current working copy revisions --&gt;
  &lt;target name="runTests"  depends="getOriginalRevision,getCurrentRevision"&gt;
    &lt;if&gt;
      &lt;equals arg1="${svnOriginalRevision}" arg2="${svnCurrentRevision}" /&gt;
      &lt;then&gt;
        &lt;echo msg="Working copy is up to date." /&gt;
      &lt;/then&gt;
      &lt;else&gt;
        &lt;echo msg="Updated working copy from SVN, starting integration tests." /&gt;
        &lt;phing phingfile="test.xml" haltonfailure="true" /&gt;
        &lt;phingcall target="tar" /&gt;
        &lt;phingcall target="updateDemo" /&gt;
      &lt;/else&gt;
    &lt;/if&gt;
  &lt;/target&gt;
&lt;/project&gt;</pre>
<p>Let's go through this script step by step.</p>
<ol>
<li>The target &lt;getOriginalRevision&gt; gets called first.<br />
Thankfully phing provides a ready-made task to retrieve the Subversion revision of a given path. We store that revision in the property ${svnOriginalRevision}.</li>
<li>Next, the &lt;svnUpdate&gt; target performs a Subversion update on the whole integration environment, ensuring we get any updates that have been committed since the last run. Since this environment will never be edited there will never be any merge conflicts.</li>
<li>Then the&lt; svnCurrentRevision&gt; target fetches the Subversion revision number of the integration environment again and stores it in a property, this time in ${svnCurrentRevision}. Note that this target is identical to &lt;getOriginalRevision&gt;, except for the property used.</li>
<li>After we have ensured that the integration environment is up to date, the main target &lt;runTests&gt; compares the ${svnOriginalRevision} with ${svnCurrentRevision} to check if a newer version has arrived. If not, this continuous integration loop stops. No need to test again what was already tested.</li>
<li>If the execution did not stop - that is, if a newer source code version has arrived - we use the &lt;phing&gt; task to execute the test.xml build file we introduced in the <a title="Third article in my series on continuous integration for PHP" href="/test-automation/2009/11/howto-continuous-integration-php-pt-3/" target="_self">third part of this series</a>.<br />
The buildAndUpdate.xml uses the same properties as the test.xml and because of that the latter will now run in the integration environment.</li>
<li>In case the test.xml script runs through without error a tarball is created automatically, containing everything in the htdocs directory.</li>
<li>Last not least we perform a SVN update on the demo environment.</li>
</ol>
<blockquote><p>Note that the test.xml build file will now send an email if one of the tests fails!</p>
<p>This is due to the fact that the updateAndBuild.xml sets the ${masterFile} property to a value that causes an &lt;if&gt; task in test.xml (line 112) to pass. This way the developers will automatically be alerted if the current revision in the integration environment is broken. If the test.xml is executed manually the if-condition will not apply and no mail is sent.</p></blockquote>
<h4>Testing the phing script.</h4>
<p>You can direct your SSH shell to /var/www/vhosts/integration and execute</p>
<pre>phing -f buildScripts/updateAndBuild.xml</pre>
<p>but this will not do much good since the integration environment is up to date.</p>
<p>What I would recommend is to create a new file in the development environment /var/www/vhosts/default and fill it with some arbitrary text, only to add and commit that file to Subversion. Then return to the integration environment and run the same command.</p>
<p>Voila! The phing script updated the integration environment, recognized the update and started all tests (this time in the integration environment). Once more, a reports folder has been created (again in the integration environment) and filled. A new folder /var/www/vhosts/integration/builds will have been created, containing a .tar.gz file with the latest build.</p>
<blockquote><p>Note that this folder may get huge very fast, depending on project complexity. It is probably advisable to deactivate the automatic tarball generation task for a real life environment.</p></blockquote>
<p>If you add an error to one of the tests, you should get an email. Double check the ${errorMail} property in test.xml and make sure the server can successfully sent mails if you don't.</p>
<p>The last step for you to do is to set up a cronjob to run the phing command periodically. Make sure the cron environment is forwarding the X server display and otherwise is as close as your shell environment as possible, because otherwise you will run into all sorts of issues. This is the nature of cron...</p>
<h4>This concludes my tutorial on continuous integration for PHP.</h4>
<p>Leave me a comment if you liked the series, if you have questions or suggestions for improvements. I will work on a fifth and last article about my own thoughts for possible improvements, to be published in a bit.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.st-webdevelopment.com/test-automation/2009/11/howto-continuous-integration-php-pt-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HOWTO: Continuous Integration for PHP, pt. 3</title>
		<link>http://www.st-webdevelopment.com/test-automation/2009/11/howto-continuous-integration-php-pt-3/</link>
		<comments>http://www.st-webdevelopment.com/test-automation/2009/11/howto-continuous-integration-php-pt-3/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 18:48:27 +0000</pubDate>
		<dc:creator>Dominique</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[phing]]></category>
		<category><![CDATA[phpunit]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[Xvfb]]></category>

		<guid isPermaLink="false">http://www.st-webdevelopment.com/?p=97</guid>
		<description><![CDATA[A detailed explanation how to combine PHPUnit, SeleniumRC and phing to create a thorough overview of a PHP project.]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-98" title="gourd" src="http://www.st-webdevelopment.com/wp-content/uploads/2009/11/gourd.jpg" alt="gourd" width="190" height="400" />This is the third article in my series about continuous integration for PHP. You might want to read the <a title="First article in my continuous integration series, covering basic understanding" href="/test-automation/2009/11/howto-setting-continous-integration-php/" target="_self">first </a>and <a title="Second article in my continuous integration series, covering the server installation" href="/test-automation/2009/11/howto-continuous-integration-php-pt-2/" target="_self">second</a> article prior to this.</p>
<p>In this article I want to introduce you to the way I run the continuous integration tests, what to run when, and where. If you're unsure how to write unittests, this will not be covered in this article but <a title="PHPUnit homepage" href="http://www.phpunit.de/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.phpunit.de/?referer=');">phpunit.de</a> has an excellent documentation section just covering <a title="How to write tests for PHPUnit" href="http://www.phpunit.de/manual/current/en/writing-tests-for-phpunit.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.phpunit.de/manual/current/en/writing-tests-for-phpunit.html?referer=');">how to write tests</a>. Another section is there covering <a title="How to write tests for SeleniumRC" href="http://www.phpunit.de/manual/current/en/selenium.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.phpunit.de/manual/current/en/selenium.html?referer=');">how to write tests for SeleniumRC</a>.</p>
<p>Let me start this article with a short summary of what we have installed in the second part: We have a pretty standard LAMP server based on Ubuntu Linux. Then there is PHPUnit for unit and regression testing as well as phing, our integration server. We added SeleniumRC as a frontend test tool, then Xvfb and Firefox to facilitate the frontend tests. xdebug is used by PHPUnit for code coverage reports and phpDocumentor will be used by phing for automatic APIdoc generation.</p>
<p>A Subversion client to fetch latest updates out of the repository completes the setup.</p>
<p>Ok, let's dig a little deeper into the filesystem structure and how to use it, shall we?</p>
<p><span id="more-97"></span>We installed three virtual hosts in apache, one for development, one for the integration and one as staging system.</p>
<div id="attachment_62" class="wp-caption aligncenter" style="width: 447px"><img class="size-full wp-image-62" title="environment" src="http://www.st-webdevelopment.com/wp-content/uploads/2009/11/environment.png" alt="My continuous integration environment" width="437" height="273" /><p class="wp-caption-text">My continuous integration environment</p></div>
<p>The whole setup is merely to demonstrate the workflow. In reality the integration and staging environment would most likely run on a separate machine, or two.</p>
<p><img class="alignleft size-full wp-image-99" title="hostStructure" src="http://www.st-webdevelopment.com/wp-content/uploads/2009/11/hostStructure.png" alt="hostStructure" width="120" height="173" />Each virtual host contains the same initial directory structure, like you see on the left. The image shows the structure of the default server (used for development).</p>
<p>You see the ./conf folder, which stores the Apache configuration file. You can add your own configuration files to this folder if you like.</p>
<p>The ./htdocs folder is what you think it is, the webserver root.</p>
<p>The ./tests and ./buildScripts folders will contain the test classes, as well as all files required by phing to build the project.</p>
<p>This layout is simple, yet effective. It cleanly separates the utilities used for testing and continuous integration from the rest of the project, thus making packaging and deployment comparatively easy.</p>
<p>In the screenshot you also see that the whole default virtual host is under revision control. Experience shows that in the end, you will want everything versioned no matter what you think initially.</p>
<p>Last not least the screenshot shows the other two virtual hosts 'integration' and 'demo', both being under version control as well - but more on that later.</p>
<h4>Ok, are you ready to write some tests?</h4>
<p>Some of the scripts discussed below are quite long, so I will not post them here in the blog in their full length. You can get a <a href="http://www.st-webdevelopment.com/wp-content/uploads/2009/11/vhost.zip">continuous integration test file setup</a> (.zip file) for ease of use.</p>
<p>We start with a simple file which we put in default/htdocs/class.hello.php:</p>
<pre name="code" class="php">&lt;?php
 class HelloWorld {
   public function hello() {
     return 'Hello World';
   } // end: function hello()
 } // end: class HelloWorld
?&gt;</pre>
<p>As you see the class HelloWorld contains a single method 'hello' without any parameters that returns the famous 'Hello World'. The corresponding unittest is equaly simple. We create a second file in default/tests/Test.HelloWorld.php:</p>
<pre name="code" class="php">&lt;?php
require_once('PHPUnit/Framework.php');
include_once('../htdocs/class.hello.php');

class TestHelloWorld extends PHPUnit_Framework_TestCase {
  private $ciTestObj = null;

  public function setUp() {
    $this-&gt;ciTestObj = new HelloWorld();
  } // end: function setUp()

  public function testHello() {
    $this-&gt;assertEquals($this-&gt;ciTestObj-&gt;hello(), 'Hello World');
  } // end: function testHello()
} // end: class TestHelloWorld
?&gt;</pre>
<p>Now, the property $ciTestObj contains an instance of the test object which is our HelloWorld class from the first script. The only test we perform is an assertEquals() call that compares the return value of the HelloWorld::hello() method with the static string 'Hello World'.</p>
<p>Save the file and connect to the continuous integration server using your favorite SSH client. Change into the tests directory and execute phpunit:</p>
<pre>phpunit Test.HelloWorld.php</pre>
<p>You should get a result similar to this:</p>
<pre>PHPUnit 3.4.2 by Sebastian Bergmann.
.
Time: 1 second
OK (1 test, 1 assertion)</pre>
<p>Hooray, the test passed. Our class behaves as expected.</p>
<h4>The second step will be to run a frontend test in SeleniumRC.</h4>
<p>Usually you would create a test in Firefox with SeleniumIDE set to write PHPUnit test files instead of the html default. However for a quick success I recommend copy-pasting the test that I prepared.</p>
<blockquote><p>Before we attempt to run SeleniumRC in the continuous integration server, configure your SSH client to allow X forwarding. If it is currently inactive, enable it. The test won't run without that. Double check your settings are correct.</p></blockquote>
<p>Ok, once more we start with our test subject. This time it is a very simple html page with a form. The form doesn't do anything except filling the form fields with the values you entered before submit. Create a file default/htdocs/form.php with the following content:</p>
<pre name="code" class="xhtml">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"&gt;
&lt;head&gt;
  &lt;title&gt;Testable form&lt;/title&gt;
  &lt;meta http-equiv="content-type" content="text/html; charset=utf-8" /&gt;
  &lt;style type="text/css"&gt;
    body {background-color: #fff;}
    label {
      display: block;
      float: left;
      min-width: 140px;
      padding-right: 5px;
    }
    input,textarea {
      border: 1px inset;
      margin: 5px 0;
    }
    textarea {height: 150px;}
    input[type=submit] {border: 1px outset;}
   .long {width: 300px;}
  &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;h2&gt;Selenium RC test form&lt;/h2&gt;
  &lt;p&gt;
    This form does have absolutelly no purpose other than being a test subject for selenium RC.
  &lt;/p&gt;
  &lt;form action="&lt;?php echo $PHP_SELF; ?&gt;" method="post"&gt;
    &lt;label for="firstname"&gt;firstname, lastname: *&lt;/label&gt;&lt;input type="text" name="firstname" value="&lt;?php echo $_POST['firstname']; ?&gt;" /&gt; &lt;input type="text" name="lastname" value="&lt;?php echo $_POST['lastname']; ?&gt;" /&gt;&lt;br /&gt;
    &lt;label for="email"&gt;email: *&lt;/label&gt;&lt;input type="text" name="email" value="&lt;?php echo $_POST['email']; ?&gt;" /&gt;&lt;br /&gt;
    &lt;label for="url"&gt;homepage:&lt;/label&gt;&lt;input type="text" name="url" value="&lt;?php echo $_POST['url']; ?&gt;" /&gt;&lt;br /&gt;
    &lt;label for="subject"&gt;subject: *&lt;/label&gt;&lt;input type="text" name="subject" value="&lt;?php echo $_POST['subject']; ?&gt;" /&gt;&lt;br /&gt;
    &lt;label for="comment"&gt;your message: *&lt;/label&gt;&lt;textarea name="comment"&gt;&lt;?php echo $_POST['comment']; ?&gt;&lt;/textarea&gt;&lt;br /&gt;
    &lt;label for=""&gt;&amp;nbsp;&lt;/label&gt;&lt;input type="submit" value="submit" /&gt;
  &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>Open it in your browser, just to confirm that it is working. If you followed this howto step by step, http://integration.local/form.php should work just fine. You should do the same from the command line on the server to see if local access is also correct:</p>
<pre>lynx http://integration.local/form.php</pre>
<p>If that is not working, go back to the <a title="Second article on continuous integration for PHP" href="http://www.st-webdevelopment.com/test-automation/2009/11/howto-continuous-integration-php-pt-2/" target="_self">second part</a> of this series and check the settings in the hosts files. However if it does, we can write our test for the subject. Open a new file in default/tests/TestForm.php and paste this:</p>
<pre name="code" class="php">&lt;?php
require_once('PHPUnit/Extensions/SeleniumTestCase.php');

class TestForm extends PHPUnit_Extensions_SeleniumTestCase {
  protected $captureScreenshotOnFailure = TRUE;
  protected $screenshotUrl = 'http://integration.local/reports/selenium';

  function setUp() {
    $this-&gt;screenshotPath = $_ENV['PWD'] . '/../reports/selenium';
    $this-&gt;setBrowser('*firefox');
    $this-&gt;setBrowserUrl('http://integration.local/');
  } // end: function setUp()

  function testFormSubmit() {
    $this-&gt;open('/form.php');
    $this-&gt;waitForPageToLoad('30000');
    $this-&gt;type('firstname', 'SeleniumRC');
    $this-&gt;type('lastname', 'Testautomation');
    $this-&gt;type('email', 'selenium@example.com');
    $this-&gt;type('url', 'http://seleniumhq.com');
    $this-&gt;type('subject', 'Test for Selenium RC');
    $this-&gt;type('comment', 'This is just to test Selenium RC in a continuous integration environment with Phing and PHPUnit.');

    $this-&gt;click('//input[@value="submit"]');
    $this-&gt;waitForPageToLoad('30000');
    $this-&gt;assertEquals('SeleniumRC', $this-&gt;getValue('firstname'));
    $this-&gt;assertEquals('Testautomation', $this-&gt;getValue('lastname'));
    $this-&gt;assertEquals('selenium@example.com', $this-&gt;getValue('email'));
    $this-&gt;assertEquals('http://seleniumhq.com', $this-&gt;getValue('url'));
    $this-&gt;assertEquals('Test for Selenium RC', $this-&gt;getValue('subject'));
    $this-&gt;assertEquals('This is just to test Selenium RC in a continuous integration environment with Phing and PHPUnit.', $this-&gt;getValue('comment'));
  } // end: function testFormSubmit()
} //end: class TestForm
?&gt;</pre>
<blockquote><p>Note that before 30th of November 2009 the above code contained the wrong hostnames for both TestFor::screenShotUrl and the setBrowserUrl() call. Sorry for this! The .zip file has been corrected, as well.</p></blockquote>
<p>This PHPUnit test will start a firefox browser on the server, hit the form.php on the server and fill out the form. It will submit the form and compare the values in the form fields with those entered previously with assertions.</p>
<p>To check this we run PHPUnit again. Since this is a frontend test it required Xvfb (our X server) and SeleniumRC to run.</p>
<pre>Xvfb :1 -screen 0 1280x1024x24 &amp;
env DISPLAY=:1 java -jar /var/www/SeleniumRC/selenium-server-1.0.1/selenium-server.jar  &amp;</pre>
<p>Ignore all errors and warnings that Xvfb will probably throw for now - those will be interesting only if the tests fail. It takes some time for both daemons to start up, but after a bit of patience we can  run PHPUnit:</p>
<pre>phpunit TestForm.php</pre>
<p>The first thing you will notice is that it takes some time before PHPUnit is doing anything - that is while firefox starts - but then it is cluttering the screen with output (actually most of it doesn't come from PHPUnit but from SeleniumRC but you get the point).</p>
<p>The important part is that the output ends with something like this:</p>
<pre>.
Time: 24 seconds
OK (1 test, 6 assertions)</pre>
<p>You already know what this means... the test passed, the form works as expected. Just to clarify once again: We just tested a website in Firefox by writing and executing a PHPUnit test class.</p>
<p>Now you will want to stop both Xvfb and SeleniumRC in order to continue:</p>
<pre>kill -TERM %2
kill -TERM %1</pre>
<h4>Step three: Automate all tests with phing.</h4>
<p>Now that the PHPUnit tests run independently it is time for some more automation with phing, our integration server. Check out the test.xml file in the buildScripts folder contained in the <a href="http://www.st-webdevelopment.com/wp-content/uploads/2009/11/vhost.zip">.zip file</a> that contains the test setup. It is over 100 lines long so I will not post it here. If you're familiar with the <a title="Getting started with phing, the php build server" href="http://phing.info/docs/guide/stable/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/phing.info/docs/guide/stable/?referer=');">file structure of a phing build script</a>, you will see that the file consists of a couple of targets which will implement the following workflow:</p>
<ol>
<li>Removing a htdocs/report folder (more on that in a bit)<br />
&lt;target name="prepare"&gt;</li>
<li>Prepare a (temporary) xdebug code coverage database<br />
&lt;target name="coveragePrepare"&gt;</li>
<li>Start Xvfb and SeleniumRC, just like we did above<br />
&lt;target name="setUp"&gt;</li>
<li>Generate an APIdoc using phpDocumentor<br />
&lt;target name="doc"&gt;</li>
<li>Running all PHPUnit tests inside the tests folder<br />
&lt;target name="unittest"&gt;</li>
<li>Generating the code coverage report<br />
&lt;target name="coverageReport"&gt;</li>
<li>Shutting down Xvfb and SeleniumRC again<br />
(inside the "main" target)</li>
<li>In some condition (which we discuss in a bit) the build script will send a mail notification that the build tests have failed.</li>
</ol>
<p>But first let's do the fun thing, run the script. Once piece of advice though: You might want to go to line no 23 of the test.xml script and set your own mail Id. While running the script in this constellation the mail will not be used but better cover this now than wonder why mails are not reaching you later.</p>
<p>So go ahead... change into the default/buildScripts directory and execute</p>
<pre>phing -f test.xml</pre>
<p>Phing will read in the .xml file and perform all the tasks mentioned above in that order. Once the script has finished, check the htdocs folder. Now there is a reports subfolder that hasn't been there before. This is where all test results are stored. To be specific:</p>
<ol>
<li>Your PHPUnit test results
<p>http://integration.local/reports/phpunit/</li>
<li>A code coverage report
<p>http://integration.local/reports/coverage/</li>
<li>PHP APIDoc
<p>http://integration.local/reports/apidocs/</li>
</ol>
<p>There is an additional folder http://integration.local/reports/selenium/ which contains the STDOUT and STDERR logs generated by SeleniumRC but that is really only of interest if something goes wrong in the execution of the frontend tests.</p>
<p>Open each of the URLs above in your browser to see what you got. I believe it is pretty impressive.</p>
<h4>Final note on the text.xml file.</h4>
<p>To avoid this article getting even longer, I'll cut things short. The test.xml phing build script is meant to be run by the developer, and manually so. It will only work in the 'default' virtual host unless you change the properties on top. But please keep them as they are for now, as in the fourth article of this series I'll explain how to use another phing build file to automate all things once and for all.</p>
<p>The idea behind the test.xml build file is to make it easy for the developer to get a thorough overview of his working copy - without the need to commit everything just to see what is breaking.</p>
<p>I can only motivate you to try and play around with things. One cool detail for example is that PHPUnit will automatically make a screenshot from the website in firefox whenever a SeleniumRC test assertion fails. So break one assertion and visit the phpunit report file in your browser and you will find a report on what failed along with a URL (sadly it is not linked).</p>
<p>This concludes the third part of the continuous integration for PHP series. Come back in a couple of days for details on <a title="Fourth article in my series on continuous integration for PHP" href="/test-automation/2009/11/howto-continuous-integration-php-pt-4/" target="_self">how to automate the build process</a> in the integration virtual host.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.st-webdevelopment.com/test-automation/2009/11/howto-continuous-integration-php-pt-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Planning Poker cards .pdf for download</title>
		<link>http://www.st-webdevelopment.com/agile/2009/11/planning-poker-cards-pdf-download/</link>
		<comments>http://www.st-webdevelopment.com/agile/2009/11/planning-poker-cards-pdf-download/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 02:39:39 +0000</pubDate>
		<dc:creator>Dominique</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[estimation]]></category>
		<category><![CDATA[planning poker]]></category>

		<guid isPermaLink="false">http://www.st-webdevelopment.com/?p=106</guid>
		<description><![CDATA[A simple and straight-forward .pdf with planning poker cards to print and cut out and use for your own agile estimations.]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-112" title="renderwave1" src="http://www.st-webdevelopment.com/wp-content/uploads/2009/11/renderwave1.jpg" alt="renderwave1" width="190" height="400" />Planning poker is an estimation technique which is widely used by the agile community and which I just introduced to my team yesterday. In case you're not familiar with what planning poker is about, the <a title="The Wikipedia on planning poker" href="http://en.wikipedia.org/wiki/Planning_poker" target="_blank" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Planning_poker?referer=');">Wikipedia </a>has a pretty decent explanation.</p>
<p>While you can buy professional card decks for planning poker online from many sources [<a title="Planning poker card deck from mountaingoatsoftware" href="http://store.mountaingoatsoftware.com/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/store.mountaingoatsoftware.com/?referer=');">1</a>], [<a title="Planning poker card deck from agile42.com" href="http://www.agile42.com/cms/pages/poker/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.agile42.com/cms/pages/poker/?referer=');">2</a>], I decided to try a little more subtle start and go with our own cut-out version.</p>
<p>So that's my post for the day... click on the link to get the probably most minimalistic <a href="/wp-content/uploads/2009/11/planning_poker_cards_v1.1.pdf">Planning Poker cards</a> wordwide <img src='http://www.st-webdevelopment.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . Don't expect anything flashy though... it will get the job done, but that's about it.</p>
<p>Psssssst... the third article in my <a title="My article series on continuous integration for PHP" href="/test-automation/2009/11/howto-setting-continous-integration-php/" target="_self">series on continuous integration for PHP</a> will be out in less than 48 hours...</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 34px; width: 1px; height: 1px;">wordwide <img src='http://www.st-webdevelopment.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</div>
]]></content:encoded>
			<wfw:commentRss>http://www.st-webdevelopment.com/agile/2009/11/planning-poker-cards-pdf-download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Continuous Integration for PHP, pt. 2</title>
		<link>http://www.st-webdevelopment.com/test-automation/2009/11/howto-continuous-integration-php-pt-2/</link>
		<comments>http://www.st-webdevelopment.com/test-automation/2009/11/howto-continuous-integration-php-pt-2/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 04:53:10 +0000</pubDate>
		<dc:creator>Dominique</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Linux installation]]></category>
		<category><![CDATA[phing]]></category>
		<category><![CDATA[phpunit]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[Xvfb]]></category>

		<guid isPermaLink="false">http://www.st-webdevelopment.de/?p=76</guid>
		<description><![CDATA[A step-by-step guide how to install a continuous integration environment for PHP based on Ubuntu Linux, PHPUnit, phing, phpDocumentor, Xvfb and SeleniumRC]]></description>
			<content:encoded><![CDATA[<p>This is the second in the series of articles on continuous integration for PHP. You might want to start reading the <a title="First article on continuous integration for PHP" href="/test-automation/2009/11/howto-setting-continous-integration-php/" target="_self">first article</a>, covering the basic tools in the setup before you continue here.</p>
<p>Here I will give you a step-by-step guide how to set up a LAMP server with all the necessary tools to run a thorough set of tests and reports.</p>
<p>As of this writing <a title="Ubuntu Linux" href="http://www.ubuntu.com/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.ubuntu.com/?referer=');">Ubuntu Linux</a> version 9.10 (Karmic Koala) has just been released. Personally I like Ubuntu for its ease of use, so this howto will focus on that. I assume that the general setup will be slightly different if you use another flavor of Linux, though.</p>
<p>If you don't have a spare computer lying around just yet, install <a title="VMWare Server" href="http://www.vmware.com/products/server/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.vmware.com/products/server/?referer=');">VMWare Server</a>. That will get you going well enough to convince your manager that a few hundred bucks for a medium-spec server will be well invested money.</p>
<p>This step of the tutorial assumes that you're at least somewhat familiar with the Linux command line. If you are not, do yourself a favor and get in touch with one of your system administrators. Make him understand what you want and convince him to divert from the typical company guidelines for server installation. You might want to show him this:</p>
<blockquote><p>This will be a test server. It will not run in production. It will never be accessible by the public. It'll be a proof of concept and will be replaced by a server compliant to all guidelines once this proof of concept is approved by management.</p></blockquote>
<p>For those of you who do this on their own: The above paragraph is for you. All aspects of creating a secure, well administered server with backup are ignored in this tutorial. Do not attempt to run this box online.</p>
<p>One more comment. Even if you're convinced that you'll not be using one of the packages or reports described below, just install them for now. The whole setup is well under 2GB and it works. Removing a package might break things.</p>
<p>This being said, are you ready for the installation?</p>
<h4><span id="more-76"></span>Step one: Set up a LAMP Server.</h4>
<p>Go to the <a title="Ubuntu Linux" href="http://www.ubuntu.com/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.ubuntu.com/?referer=');">Ubuntu Homepage</a> and download the .iso CD image of 9.10 Karmic Koala. I grabbed the 32-bit version but I assume the 64-bit will run just fine. VMWare users: You can directly mount the .iso image as CD in the virtual machine. No need to burn a disc.</p>
<p>Follow the graphical installer, it is pretty straight forward. Write down the user name for the unprivileged user you will be asked to create during the process, we will need it later.</p>
<p>When you reach the package selection, check 'LAMP', 'OpenSSH' and 'Samba', you will need it.</p>
<p>Now go for lunch, the download of the additional packages will take a bit.</p>
<h4>Step two: Basic setup.</h4>
<p>You should set up your OpenSSH public key authorization for root and one unprivileged user, any bash aliases that you like as well as any Samba shares that you require. Since I can't know your requirements, I won't even try to give a one-size-fits-all description. Push your question in the comments below and I will answer asap if I can.</p>
<p>You will want one Samba share pointing to where the apache environments will be:</p>
<pre>vi /etc/samba/smb.conf</pre>
<p>Activate the line reading</p>
<pre>security = user</pre>
<p>Append this section to the end of the file.</p>
<pre>#---- start webserver vhost main directory
comment = webserver main directory
read only = no
create mask = 0664
directory mask = 0775
force group = www-data
#---- end webserver vhost main directory</pre>
<p>After that, restart Samba</p>
<pre>/etc/init.d/samba restart</pre>
<h4>Step three: Install basic packages.</h4>
<p>A few essentials are missing after the initial installation of Ubuntu. For example we need to install quite a few additional PHP packages as well as <a title="Subversion homepage" href="http://subversion.tigris.org/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/subversion.tigris.org/?referer=');">Subversion</a> (my personal favorite in revision control).</p>
<p>Make sure you're logged in as root user.</p>
<pre>apt-get install php5 php5-dev php5-cli php5-curl php5-gd php5-mysql
apt get install php5-sqlite php5-xmlrpc php5-imagick php5-mcrypt
apt-get install php-pear php5-xsl php5-xdebug
apt-get install subversion
apt-get install zip unzip mailutils</pre>
<p>I assume that you might need additional PHP packages. Feel free to add them. However the list above is what we'll need for continuous integration.</p>
<h4>Step four: Install continuous integration software.</h4>
<p>This is where the fun starts. Luckily next to everything we need can be installed thru the handy PEAR installer, so the complexity is down to a minimum.</p>
<pre>pear channel-discover pear.phpunit.de
pear channel-discover pear.phing.info
pecl install xdebug
pear install phpunit/PHPUnit-3.4.2
pear install Image_GraphViz PhpDocumentor
pear install http://pear.phing.info/get/phing-2.4.0RC2.tgz
pear install channel://pear.php.net/VersionControl_SVN-0.3.3
pear install channel://pear.php.net/XML_Serializer-0.20.0
pear install PEAR_PackageFileManager_Plugins PEAR_PackageFileManager</pre>
<p>Please note that there is a death-grip like dependency between PHPUnit and phing. phing before v2.4 does not run with PHPUnit 3.4.x because one class was replaced in the latter. On the other hand, PHPUnit before version 3.4.x is not able to perform screenshots for failing Selenium tests, something that you'll definitely want if you plan to automate your frontend testing as well.</p>
<p>You might want to check the <a title="phing website - A build tool for PHP" href="http://phing.info/trac/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/phing.info/trac/?referer=');">phing website</a> if 2.4.0 final is released by the time you read this. I didn't run into any difficulties with the RC2 of phing though.</p>
<p>Since almost everything is based on PEAR, we need to adapt the include_path directive in the php.ini files:</p>
<p>Do a</p>
<pre>vi /etc/php5/apache2/php.ini</pre>
<p>and a</p>
<pre>vi /etc/php5/cli/php.ini</pre>
<p>and in both files find the line</p>
<pre>include_path = ".:/usr/share/php"</pre>
<p>and remove the comment.</p>
<h4>Step five: Install SeleniumRC.</h4>
<p><a title="Selenium RC homepage" href="http://seleniumhq.org/projects/remote-control/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/seleniumhq.org/projects/remote-control/?referer=');">SeleniumRC</a> or Selenium Remote Control is a solution to automate front end testing without the need for a display. For its installation, follow me:</p>
<pre>apt-get install openjdk-6-jre-headless xvfb lynx firefox imagemagick

wget -O /var/www/seleniumRC.zip http://release.seleniumhq.org/selenium-remote-control/1.0.1/selenium-remote-control-1.0.1-dist.zip
unzip /var/www/seleniumRC.zip -d /var/www/
mv /var/www/selenium-remote-control-1.0.1 /var/www/SeleniumRC
rm /var/www/seleniumRC.zip</pre>
<p>We now have the SeleniumRC server (a java program) installed in /var/www/SeleniumRC. Also, we installed the Xvfb virtual frame buffer X server and Firefox 3.5, the former enabling the latter to run without an attached monitor, mouse or keyboard.</p>
<h4>Step six: Create the 'dev' environment.</h4>
<p>As I described in the <a title="First article on continuous integration for PHP" href="/test-automation/2009/11/howto-setting-continous-integration-php/" target="_self">first article</a>, I typically use three different environments for continuous integration. A 'dev' environment for the developer, an 'int' environment where the continuous integration takes place as well as a third 'stage' environment to show the client the latest working revision.</p>
<p>In order to try out continuous integration we will simply install all three virtual hosts on one and the same machine.</p>
<p>With Ubuntu the default host for apache is in /var/www. While that is nice and well, I thrive for a little more consistency, hence we begin by moving the default host to its new home for its purpose as the 'dev' environment.</p>
<pre>mkdir -p /var/www/vhosts/default/conf
mkdir /var/www/vhosts/default/htdocs
mkdir /var/www/vhosts/default/tests
mkdir /var/www/vhosts/default/buildScripts</pre>
<pre>mv /var/www/index.html /var/www/vhosts/default/htdocs/.

mv /etc/apache2/sites-available/default /var/www/vhosts/default/conf/.
ln -s /var/www/vhosts/default/conf/default /etc/apache2/sites-available/default

mv /etc/apache2/sites-available/default-ssl /var/www/vhosts/default/conf/.
ln -s /var/www/vhosts/default/conf/default-ssl /etc/apache2/sites-available/default-ssl

vi /var/www/vhosts/default/conf/default</pre>
<p>Now change the DocumentRoot directive to</p>
<pre>/var/www/vhosts/default/htdocs</pre>
<p>and also change</p>
<pre>&lt;Directory /var/www&gt;</pre>
<p>to</p>
<pre>&lt;Directory /var/www/vhosts/default/htdocs&gt;</pre>
<h4>Step seven: Create the 'int' and 'stage' environments.</h4>
<p>The setup for both the integration and staging environments is almost identical to the 'dev' setup. We start with 'int':</p>
<pre>mkdir -p /var/www/vhosts/integration/conf
mkdir /var/www/vhosts/integration/htdocs
mkdir /var/www/vhosts/integration/tests
mkdir /var/www/vhosts/integration/buildScripts

cp /var/www/vhosts/default/conf/default /var/www/vhosts/integration/conf/vhost.conf
ln -s /var/www/vhosts/integration/conf/vhost.conf /etc/apache2/sites-available/integration.conf
ln -s /etc/apache2/sites-available/integration.conf /etc/apache2/sites-enabled/</pre>
<pre>vi /var/www/vhosts/integration/conf/vhost.conf</pre>
<p>Now add</p>
<pre>ServerName    integrate.integration.local</pre>
<p>and once more change the DocumentRoot directive, this time to</p>
<pre>/var/www/vhosts/integration/htdocs</pre>
<p>and also change</p>
<pre>&lt;Directory /var/www/vhosts/default/htdocs&gt;</pre>
<p>to</p>
<pre>&lt;Directory /var/www/vhosts/integration/htdocs&gt;</pre>
<p>As said, for the staging environment it is almost the same:</p>
<pre>mkdir -p /var/www/vhosts/demo/conf
mkdir /var/www/vhosts/demo/htdocs
mkdir /var/www/vhosts/demo/tests
mkdir /var/www/vhosts/demo/buildScripts

# create virtual host conf file
cp /var/www/vhosts/default/conf/default /var/www/vhosts/demo/conf/vhost.conf
ln -s /var/www/vhosts/demo/conf/vhost.conf /etc/apache2/sites-available/demo.conf
ln -s /etc/apache2/sites-available/demo.conf /etc/apache2/sites-enabled/</pre>
<pre>vi /var/www/vhosts/demo/conf/vhost.conf</pre>
<p>Now add</p>
<pre>ServerName    demo.integration.local</pre>
<p>and one last time change the DocumentRoot directive, this time to</p>
<pre>/var/www/vhosts/demo/htdocs</pre>
<p>and also change</p>
<pre>&lt;Directory /var/www/vhosts/default/htdocs&gt;</pre>
<p>to</p>
<pre>&lt;Directory /var/www/vhosts/demo/htdocs&gt;</pre>
<h4>Step eight: Setting permissions, restarting Apache<em><br />
</em></h4>
<p>We simply want to correct the file system permissions so that both the unprivileged user and the webserver have write permissions everywhere. You do remember that I said this server will not be secure, right?</p>
<p>Do you remember the user name for the unprivileged user you sat up during the installation procedure? Fill in that user name below</p>
<pre>chown -R YOUR_USERNAME:www-data /var/www
chmod -R g+w /var/www</pre>
<p>We need to restart apache in order to 'activate' the three virtual hosts we just created in step seven.</p>
<pre>/etc/init.d/apache2 restart</pre>
<h4>Last step: Making the host names known.</h4>
<p>You may have wondered about the unusual host names, ending in .local. Well you could name them whatever you want but I prefer .local personally because that makes it absolutely clear that this is a non public machine.</p>
<p>In order to make them accessible you may ask your system administrators to configure your local DNS zone. Or you simply add the host names to the hosts file of your development machine (probably Windows or Mac) and to the Ubuntu server we're currently configuring. For the latter one all you need to do is</p>
<pre>vi /etc/hosts</pre>
<p>and append this section</p>
<pre>127.0.0.1    integration.local
127.0.0.1    integrate.integration.local
127.0.0.1    demo.integration.local</pre>
<p>Note that on your Windows machine you will probably want to do the same, but with the IP address of the virtual machine. Your hosts file for Windows usually sits in c:\WINDOWS\system32\drivers\etc</p>
<h4>Alright, that's it!</h4>
<p>You've just set up the whole continuous integration environment.</p>
<p>Before I let you wander through the (required, really) manuals and user guides of <a title="User Guide for phing - the PHP build tool " href="http://phing.info/docs/guide/stable/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/phing.info/docs/guide/stable/?referer=');">phing</a>, <a title="User Guide for PHPUnit" href="http://www.phpunit.de/manual/3.4/en/index.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.phpunit.de/manual/3.4/en/index.html?referer=');">PHPUnit</a>, Selenium ([<a title="The official documentation for SeleniumIDE and SeleniumRC" href="http://seleniumhq.org/docs/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/seleniumhq.org/docs/?referer=');">1</a>], [<a title="PHPUnit manual about usage with SeleniumRC" href="http://www.phpunit.de/manual/3.4/en/selenium.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.phpunit.de/manual/3.4/en/selenium.html?referer=');">2</a>]) and what not, bare with me for a few more moments though.</p>
<p>Let us just summarize what we did.</p>
<p>We've set up an Ubuntu Linux server that runs on your computer, right along with whatever operating system you use to see this website.</p>
<p>That server has Apache, PHP, MySQL, Samba and OpenSSH and thus can be considered a full fledged LAMP server. However it is highly insecure.</p>
<p>We installed a PHP build tool (phing), a regression testing tool (PHPUnit),  Xdebug for code coverage. We can generate API docs on the fly (phpDocumentor) and we a graphical environment (Xvfb) and Firefox for frontend tests with Selenium.</p>
<p>All three Apache environments run on the same machine which is different what I mentioned to be my ideal setup in the <a title="First article in my series on setting up continuous integration for PHP" href="http://www.st-webdevelopment.de/test-automation/2009/11/howto-setting-continous-integration-php/" target="_self" onclick="pageTracker._trackPageview('/outgoing/www.st-webdevelopment.de/test-automation/2009/11/howto-setting-continous-integration-php/?referer=');">first article</a> of this series. However, for the purpose of this demo this is perfectly alright. If you want to go into production with continuous integration, simply repeat all the steps above for your two (or three) machines, once for each environment. You can and should leave out the Samba configuration for your integration and staging system however. Oh and get back to your system admin, thank him for his work so far and kindly ask him to secure those boxes!</p>
<p>Okay that concludes the second part in this series. Come back here in a bit to continue with the third part: <a title="Third article in my series on continuous integration for PHP" href="/test-automation/2009/11/howto-continuous-integration-php-pt-3/" target="_self">Automating tests and reports with phing</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.st-webdevelopment.com/test-automation/2009/11/howto-continuous-integration-php-pt-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Certified ScrumMaster!</title>
		<link>http://www.st-webdevelopment.com/agile/2009/11/certified-scrummaster/</link>
		<comments>http://www.st-webdevelopment.com/agile/2009/11/certified-scrummaster/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 05:22:41 +0000</pubDate>
		<dc:creator>Dominique</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[CSM]]></category>
		<category><![CDATA[Pete Deemer]]></category>
		<category><![CDATA[ScrumAlliance]]></category>
		<category><![CDATA[ScrumMaster]]></category>

		<guid isPermaLink="false">http://www.st-webdevelopment.de/?p=82</guid>
		<description><![CDATA[Dominique Stender is a certified ScrumMaster.]]></description>
			<content:encoded><![CDATA[<p>I just passed my online exam and am now a Certified ScrumMaster, acknowledged by the <a title="The ScrumAlliance" href="http://www.scrumalliance.org/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.scrumalliance.org/?referer=');">ScrumAlliance</a>. My thanks goes out to <a title="Pete Deemer on LinkedIn" href="http://sg.linkedin.com/in/petedeemer" target="_blank" onclick="pageTracker._trackPageview('/outgoing/sg.linkedin.com/in/petedeemer?referer=');">Pete Deemer</a> of <a title="Good Agile" href="http://goodagile.com/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/goodagile.com/?referer=');">GoodAgile </a>who did a great training program here in Bangalore.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.st-webdevelopment.com/agile/2009/11/certified-scrummaster/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
