<?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>Gojko Adzic &#187; user stories</title>
	<atom:link href="http://gojko.net/tag/user-stories/feed/" rel="self" type="application/rss+xml" />
	<link>http://gojko.net</link>
	<description>Building software that matters</description>
	<lastBuildDate>Wed, 04 Aug 2010 11:38:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Driving CRUD screens with BDD</title>
		<link>http://gojko.net/2010/07/22/driving-crud-screens-with-bdd/</link>
		<comments>http://gojko.net/2010/07/22/driving-crud-screens-with-bdd/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 09:39:25 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[bdd]]></category>
		<category><![CDATA[user stories]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=1966</guid>
		<description><![CDATA[There is a discussion on the UK agile testing mailing list on driving the development of an administrative application with BDD. It illustrates a problem that many teams have, so I&#8217;ll post my response here as well. Although we have a long way to go things are going OK at the moment and we feel [...]]]></description>
			<content:encoded><![CDATA[<p>There is a discussion on the <a href='http://groups.google.com/group/agile-testing-uk/browse_thread/thread/ff19a11ebb2c3609'>UK agile testing mailing list</a> on driving the development of an administrative application with BDD. It illustrates a problem that many teams have, so I&#8217;ll post my response here as well.</p>
<blockquote><p>
Although we have a long way to go things are going OK at the moment and we feel it is bringing some real focus to the development process. However a lot of the early stories are largely admin type CRUD &#8211; for<br />
 example functionaility to set up user defined entities and their user defined properties within the system and to provide a mechanism for relating these entities to each other<br />
&#8230;<br />
Does anyone have any advice about how to write tests for this sort of stuff or any experiences in starting out with BDD they can share. </p></blockquote>
<p>CRUD is not a user story, it&#8217;s a screen. It&#8217;s not a business function, but implementation detail. Why do the business users need a particular CRUD screen? (I know it sounds as a stupid rhetorical question, but I&#8217;m serious) What does it allow them to do?</p>
<p>Often you don&#8217;t need to implement an entire CRUD screen and deliver them one by one. Sometimes there is value in releasing two screens that allow you to set a subset of properties but together they bring value. You can then automate these tests through the UI and use the CRUD screens, but that will be hidden in the automation layer. Say for example that we have a risk report that lists users and their card numbers:</p>
<pre>
Scenario: Only regular customers with a specific risk category and 
              card type show up in risk reports
Given the following users
|name| type| card type| card number| risk category|
|Mike |VIP | Mastercard |53111 11111 11111 1111|X|
|Tom |VIP| Visa |41111 11111 11111 1111|Y|
John |Regular |Mastercard |51111 11111 11111 1111|X|
|Steve |Regular |Mastercard |52111 11111 11111 1111|Y|
Then the risk report for Mastercard and category X contains the following data
|John | 51111 11111 11111 1111|
</pre>
<p>This could, for example, invoke the user CRUD to save a user name, type and risk category and a completely different CRUD to save card details for that user. Any other information that would go on that CRUD (addresses, card expiry dates etc) aren&#8217;t part of this story or criteria because they are not important for this particular report.</p>
<p>Start with the outputs, the reports that the system produces, instead of data entry operations. this ensures that you have the data you need to produce the reports at the end, and that you don&#8217;t have superfluous data that nobody really cares about. if you don&#8217;t do that, the resulting data schemas are often overcomplicated and contain many things that simply aren&#8217;t used at the end at all.</p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2010/07/22/driving-crud-screens-with-bdd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delivering useful software</title>
		<link>http://gojko.net/2008/04/28/delivering-useful-software/</link>
		<comments>http://gojko.net/2008/04/28/delivering-useful-software/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 16:53:25 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[iterative]]></category>
		<category><![CDATA[project management]]></category>
		<category><![CDATA[user stories]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=121</guid>
		<description><![CDATA[One of central agile programming ideas is to deliver frequently and get feedback early. To get the full benefits of this approach, it is not enough just to make sure that we deliver often and seek feedback &#8212; it is extremely important to plan our deliveries correctly as well. If the deliverables are not complete [...]]]></description>
			<content:encoded><![CDATA[<p><img src='/images/940460_puzzle_pieces_3.jpg' style="border:1px solid black; margin:5px 5px 5px 5px" align="left"/>One of central agile programming ideas is to deliver frequently and get feedback early.  To get the full benefits of this approach, it is not enough just to make sure that we deliver often and seek feedback &mdash; it is extremely important to plan our deliveries correctly as well. If the deliverables are not complete in the sense that they can really be used in production, then the feedback is not as relevant as we would like it to be. </p>
<p>Here is a situation I have seen a few times more than I would have wanted: the team and the clients split the whole project into several phases that will be shipped every few weeks; early deliverables mostly provide the plumbing for the later ones, and have only enough user-interfacing functions for the plumbing to be tested functionally. The clients set up and play with each new release. They dutifully give their feedback and participate in testing each time. When the whole thing comes together on the end, it turns out that the system still requires a lot of changes to solve the problem that it was intended for &mdash; the iterations and customer feedback failed to provide the directions. <span id="more-121"></span></p>
<p>The problem hides in way that the project was split: <i>early deliverables mostly provide the plumbing for the later ones</i> and <i> the whole thing comes together on the end</i>. So, until very close to the end of the project, the deliverables could not really be used in production. Unless the software is really being used, we cannot expect authoritative feedback. The customers may be able to give us their general gut-feel and comment on functional correctness, but usability and feasibility can only be measured once the software is really actually used by people in the course of their daily business. Technical integration issues as well as usability (human-integration) issues are expected and typically not problematic to solve, but we must not let them pile up. Early feedback should allow us to solve some of those problems during the whole project, instead of finding them out on the end. </p>
<p>One more reason why deliverables should be used in production is that the customer&#8217;s business will rarely stand still during the course of the project, making the end result effectively a moving target. If the deliveries are not really used until the end of the project, then we have no idea whether they are in touch with the present business requirements. On the other hand, if the deliverables are used every day, we will know that straight away – and most likely the clients will ask for adjustments early.</p>
<h2>So how do we avoid this problem?</h2>
<p>Here are three ideas to avoid the problem:</p>
<ul>
<li>Focus on user stories, not on technical use cases</li>
<li>Plan deliveries so that they are complete in the sense that they can really be used in production</li>
<li>Divide and conquer: Split a big project into several mini-projects, and then focus on delivering those in a sequence</li>
</ul>
<h2>Focus on user stories</h2>
<p>User stories have emerged over the last several years as the preferred way of planning scope for agile projects. Focusing on user stories is a great way to split the project into parts that actually bring value to the customer, since every user story should have a clearly defined customer benefit. So planning deliverables in terms of user stories instead of technical use cases is a great first step. </p>
<p>A pitfall that we must avoid is to then batch stories based purely on technical dependencies. Although it makes perfect sense to have early deliverables provide the technical infrastructure for latter ones, and that type of dependency must be taken into consideration when planning deliverables, ordering purely based on that leads to the exact problem that we are trying to avoid. This is effectively <a href='http://gojko.net/2007/12/04/waterfall-trap/'>incremental, not iterative</a> development. </p>
<h2>Have production-worthy deliveries</h2>
<p>Instead of focusing on technical order, it is better to try plan deliveries so that every shipped version of the software can really be used in production. Although it is not always possible to adhere perfectly to this idea, it is a good general rule and we should try to keep the deliveries complete in that sense. While working on the delivery plan, just ask the clients this simple question: “pretend it&#8217;s magic and in a few months we give you these stories &mdash; would that piece of software be complete in the sense that it can actually be used in production?”. If the answer is no, go back to the drawing board.</p>
<p>Doing production-worthy deliveries several times during the project might require writing some throw-away code, but that is a small price to pay for early feedback (to programmers) and getting business benefits early (to customers). For example, several years ago I worked on a trading system that was supposed to replace excel-based trading and distribution management. One of the major problems that we were supposed to solve was optimising transport routes and providing transport plans to local centres. So our first delivery was a piece of software that allowed traders to input their trading plans (from the excel sheets), produced an optimised transport plan, and allowed them to export it back to excel. The first and third part of that delivery were thrown away later, but we got good feedback on a fairly complex part of the system and solved tons of edge cases that were not identified during initial planning. Traders were happy because this saved them a few hours of work every day, and they got that several months before the whole system was in place. </p>
<h2>Break a big project into mini-projects</h2>
<p><img src='/images/845334_russian_dolls.jpg' style="border:1px solid black; margin:5px 5px 5px 5px;" align="right" />Reg Braithwaite wrote that his <a href=”http://weblog.raganwald.com/2007/12/linus-torvalds-on-big-design-up-front.html”>Golden Hammer</a> for building software iteratively is to divide it into <a href='http://weblog.raganwald.com/2007/08/how-many-products-make-up-project.html'>separate products</a>. This makes excellent sense for building larger systems where the software will perform a lot of functions for a lot of people on the end. By dividing one single large product into smaller products we force ourselves to have cleaner interfaces and looser coupling between software components. This can allow us to develop them independently, and will also reduce the risk of the whole thing missing the target on the end. Each of those mini-products would be a deliverable, and it should be usable on its own. </p>
<p>I recently worked on a highly scalable e-commerce web site. We split the project into three separate products: an e-commerce integration platform, high-performance caching system and the actual of web site. The integration platform was delivered first, with a low-fi card processing web that was used for some 3rd party integration. It went live a year before the rest of the system, helping us flush out any problems with transaction processing. We had new requirements about this part of the system every few months, driven by the fact that people were actually using it. So when the project was close to the end, this integration platform was in touch with reality. The caching system went live next, and it was used to support a mobile content distribution application. Both the low-fi card processing site and the mobile app were not part of the initial plan, but we were able to slot them in nicely. The web site front end then built upon the foundations of those two systems that were in production for months. Thinking about the whole project in terms of separate products both helped us deliver it quicker (because we had real production feedback for parts of the system early on) and also increased the value of what we were doing (since the same components were used to support different applications and smaller projects that started after that big one). <i>Divide and conquer</i> approach paid off big.</p>
<h2>Deliveries and iterations</h2>
<p>I know that some of you, reading this, will now start to complain how iterations should be two to four weeks long and that the business problems are often larger than what can be solved in such a short period of time. I intentionally avoided using the word “iteration” in this discussion, because I do not think that every iteration needs to be delivered. </p>
<p>If an iteration result is not complete in the sense that it can really be used every day, then the iteration delivery will just sleep on the UAT servers after testers play with it for a while. To get quick feedback on such iterations, I propose giving clients access to the local integration environment and letting them play with the software there. You can avoid packaging and polishing and they do not have to update their local installations. </p>
<p>If an iteration produces software that can really be used every day, then ship it and make the clients use it. It is definitely useful to get feedback early, but having something go live, even if it causes rework or throwing away parts of software later, is much much more valuable than software that is only tested. It has more value for the customer, since they are getting a part of their problem solved earlier. It also has more value for the development of the whole project, since it brings real, authoritative feedback from everyday use.</p>
<p>Image credits: <a href="http://www.sxc.hu/profile/surely" target="_blank">Emin Ozkan</a> and <a href="http://www.sxc.hu/profile/sachyn" target="_blank">Sachin Ghodke</a>/SXC</p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2008/04/28/delivering-useful-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
