<?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>Tyner Blain &#187; Testing</title>
	<atom:link href="http://tynerblain.com/blog/category/software-development/testing/feed/" rel="self" type="application/rss+xml" />
	<link>http://tynerblain.com/blog</link>
	<description>Software product success.</description>
	<lastBuildDate>Thu, 02 Sep 2010 21:53:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Foundation Series: Inside A Scrum Sprint</title>
		<link>http://tynerblain.com/blog/2010/08/24/inside-a-scrum-sprint/</link>
		<comments>http://tynerblain.com/blog/2010/08/24/inside-a-scrum-sprint/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 04:06:22 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Foundation series]]></category>
		<category><![CDATA[Requirements]]></category>
		<category><![CDATA[Requirements Models]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[User Stories]]></category>
		<category><![CDATA[user stories inside a scrum sprint]]></category>
		<category><![CDATA[user story]]></category>
		<category><![CDATA[user story life cycle]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/?p=1279</guid>
		<description><![CDATA[
topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2010%2F08%2F24%2Finside-a-scrum-sprint%2F", "shorturl": "http://bit.ly/aSWSqO", "style": "big", "title": "Foundation Series: Inside A Scrum Sprint" });

People who already use Scrum will only find one new thing in this article &#8211; a way to communicate what happens inside a sprint that has proven effective for me.  People who are new to Scrum who wonder &#8220;how do things work [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2010%252F08%252F24%252Finside-a-scrum-sprint%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FaSWSqO%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Foundation%20Series%3A%20Inside%20A%20Scrum%20Sprint%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2010%2F08%2F24%2Finside-a-scrum-sprint%2F", "shorturl": "http://bit.ly/aSWSqO", "style": "big", "title": "Foundation Series: Inside A Scrum Sprint" });</script></div>
<p><img class="alignnone" title="Scrum Classroom" src="http://sehlhorst.smugmug.com/photos/50445724-M.jpg" alt="Photo of students in a classroom, learning scrum" width="250" height="195" /></p>
<p>People who already use <a title="Scrum introduction" href="http://www.mountaingoatsoftware.com/topics/scrum">Scrum </a>will only find one new thing in this article &#8211; a way to communicate what happens <em>inside</em> a sprint that has proven effective for me.  People who are new to Scrum who wonder &#8220;<em>how do things work inside a sprint?&#8221;</em> will see how things work in a way that avoids hyperbole and is easy to map to what they already understand from traditional software development processes.</p>
<h2><span id="more-1279"></span>Two Teams Separated by a Common Process</h2>
<p><img class="alignnone" title="George Bernard Shaw" src="http://sehlhorst.smugmug.com/Other/blog/GBS-small/980999434_zHDRi-O.jpg" alt="" width="187" height="250" /></p>
<p>George Bernard Shaw was <a title="George Bernard Shaw" href="http://en.wikipedia.org/wiki/George_Bernard_Shaw">an Irish author in London </a>who memorably said &#8220;<em>England and America are two countries separated by a common language.</em>&#8221;  The same can be said about teams developing in agile and waterfall processes.</p>
<p>The story of agile adoption is one that has many colorful examples of adoption and of <em>spreading the gospel</em>.  Some practitioners traveled across the ocean from the agile continent to the lands of agile and opportunity to reap the rewards.  A few of those, after realizing the benefits of agile, invade our consciousness with a <em>hellfire and brimstone tale of doom</em> for anyone who doesn&#8217;t convert to the new religion.</p>
<p>Others seem hell-bent on kidnapping entire development teams, smuggling them across the ocean in the belly of steamer ships and unceremoniously dumping them in the land of agile, ready or not.  Scrum is but one branch of the agile movement.</p>
<p>Stalwarts of <em>the old way, which has worked fine </em>for me<em>, thank you very much</em>, refuse to leave their comfortable lives to step into the unknown wilds of agile.  Open-minded but responsible potential converts ask questions to gain an understanding of what life in the new world might be like.  <em>What will life be like if I join this Scrum congregation?</em></p>
<h2>How Does Scrum <em>Really</em> Work?</h2>
<p>The <a title="Scrum by MountainGoat Software" href="http://www.mountaingoatsoftware.com/topics/scrum">best explanations of how scrum works</a> that I&#8217;ve read come from <a title="Mike Cohn" href="http://www.mountaingoatsoftware.com/company/about-mike-cohn">Mike Cohn</a> and <a title="Mountain Goat Software" href="http://www.mountaingoatsoftware.com/">Mountain Goat Software</a>.  The training, videos, and explanations they share provide fantastic top-down introductions (as well as guidance after adopting Scrum).  His book, <em><a title="User Stories Applied" href="http://www.amazon.com/dp/0321205685?tag=tbrb-20&amp;link_code=as3&amp;creativeASIN=0321205685&amp;creative=373489&amp;camp=211189">User Stories Applied</a></em>, is the ultimate reference when gaining an understanding of the mechanics of using user stories as the central artifacts for developing software with scrum.</p>
<p><img class="alignnone" title="Scrum process, from Mountain Goat Software" src="http://sehlhorst.smugmug.com/Other/blog/ScrumSmallLabelled/981015853_PJtuQ-O.png" alt="" width="399" height="188" /> [<a title="Scrum Process from Mountain Goat Software" href="http://sehlhorst.smugmug.com/Other/blog/ScrumLargeLabelled/981015855_M3hzW-O.png">larger image</a>]</p>
<p>The process diagram above provides a good outside-in, top-down view of how &#8220;this newfangled process&#8221; results in shippable product, incrementally.  It is a great way to present the concept of Scrum, and incremental development in general.</p>
<p>When people I&#8217;ve worked with first gain this understanding, they often ask, what are the artifacts that live in these backlogs?  User stories live there.  Sometimes <a title="Use Cases vs User Stories" href="http://tynerblain.com/blog/2009/02/02/user-stories-and-use-cases/">use cases make more sense than user stories for Scrum</a>- it depends (read the article to see which works best in your circumstance).  The common element is an <a title="Outside-In Software Development" href="http://tynerblain.com/blog/2007/09/27/outside-in/">outside-in</a>, <a title="User Centered Design" href="http://tynerblain.com/blog/2007/02/22/user-centered-design-bridge/">user-centric approach</a> to describing <em>which problems the software is intended to solve</em>.  This is also known as <a title="Goal Driven vs. Feature Driven development" href="http://tynerblain.com/blog/2006/08/09/features-or-goals/">goal-driven development</a>.</p>
<p>Once people understand the top-down view of the process, and have an idea of what user stories are, the next question they tend to ask is &#8220;how do stories move through the Scrum process?&#8221;</p>
<p>The first attempt at answering this question leans on the process diagram above:</p>
<ol>
<li>The product owner takes the most important stories from the <em>product backlog</em> and puts them into the <em>sprint backlog</em> &#8211; collaborating with the team to agree on the scope of work for <em>this</em> sprint (based on the amount of work, capacity of the team, real-world constraints, etc).</li>
<li>The team &#8220;<strong>works the stories</strong>&#8220;, meeting every day to communicate effectively and provide progress updates &#8211; best visualized with <a title="modified burndown chart" href="http://www.mountaingoatsoftware.com/scrum/alt-releaseburndown">a burndown chart</a>.  This chart says &#8220;we started with X work to do, and every day, we track how much of X remains to be done.&#8221;</li>
<li>At the end of the sprint, the work is done, and the software (or an update to the software) is ready to deliver.</li>
<li>Sometimes, multiple sprints happen between <em>releases</em> &#8211; launches of the updated software, because customers (and the rest of your organization) incur a cost when changing to the latest version.  But the output of each sprint <em>is deliverable</em> &#8211; that&#8217;s a key concept &#8211; even if you choose not to deliver it just yet.</li>
</ol>
<h2>What Does it Mean to <em>Work The Stories</em>?</h2>
<p>I&#8217;ve repeatedly had people ask, after absorbing the above explanation, &#8220;what does it mean to <em>work the stories</em>?&#8221;</p>
<p>I&#8217;ve had consistent success (in bridging the language divide) using the following diagrams (drawn on a whiteboard) to explain how stories flow through the sprint process in Scrum.</p>
<p>The first diagram shows that user stories have a structure &#8211; the story itself, and the acceptance criteria for the story. I also establish that the story is going to go through a life cycle within the sprint.</p>
<p><img class="alignnone" title="User Stories have structure and a lifecycle" src="http://sehlhorst.smugmug.com/Other/blog/201008242b/981774852_PbBwD-O.png" alt="" width="450" height="320" /> [<a title="anatomy of a user story inside a sprint" href="http://sehlhorst.smugmug.com/Other/blog/201008242/981808359_QsSxE-O.png">larger image</a>]</p>
<p>Next I remind folks that the user stories make it into the sprint backlog because they are the most important (highest priority) not-yet-implemented stories in the product backlog.</p>
<p><img class="alignnone" title="user stories in a sprint backlog" src="http://sehlhorst.smugmug.com/Other/blog/201008243b/981774888_7nARd-O.png" alt="" width="450" height="320" />[<a title="user stories in the sprint backlog come from the top of the product backlog" href="http://sehlhorst.smugmug.com/Other/blog/201008243/981808388_aWcsJ-O.png">larger image</a>]</p>
<p>Developers on the team <em>pull</em> stories from the sprint backlog and begin working on them.  These stories are <em>work in progress</em>, and are owned by individuals.  Some teams maintain that priority order within the sprint backlog (e.g. implement the most important story in the sprint first, etc.), while other teams use a more coarse-grained approach, relying on the product backlog prioritization to assure that everything in <em>this</em> sprint is the next most important stuff, and the order that the team implements, within the sprint, is up to the team.  Some folks like to strenuously debate this decision (<a title="Don't prioritize within sprints" href="http://agile.dzone.com/articles/scrum-anti-pattern">don&#8217;t prioritize within sprints</a> vs. <a title="Do prioritize within sprints" href="http://availagility.co.uk/2010/01/20/scrum-anti-pattern-not-prioritising-stories-within-sprints/">do prioritize within sprints</a>).  Both approaches are valid, and you should choose the right one for <em>your </em>team.</p>
<p><img class="alignnone" title="individuals pull stories from the backlog" src="http://sehlhorst.smugmug.com/Other/blog/201008244b/981774926_aBAn7-O.png" alt="" width="450" height="320" />[<a title="individuals pull stories from the backlog inside the sprint" href="http://sehlhorst.smugmug.com/Other/blog/201008244/981808413_QhD53-O.png">larger image</a>]</p>
<p>As each user story owner believes that her work is complete (all unit tests pass, and the developer believes that the acceptance criteria have been met), the story is ready to be tested by QA.  This step, in particular, helps people who are new to scrum and who think of things as &#8220;code and test&#8221;, to make some sense of the inner workings of a sprint.  When working with a team that was under-staffed in the QA department, I discovered that calling out this queue of user stories waiting to be tested helped convince management to increase QA investment in the team.  When too many stories pile up here, you know you have a problem.</p>
<p><img class="alignnone" title="completed user stories are queued up for QA" src="http://sehlhorst.smugmug.com/Other/blog/201008245b/981774942_xRKCT-O.png" alt="" width="450" height="320" />[<a title="user stories are queued for qa inside a sprint" href="http://sehlhorst.smugmug.com/Other/blog/201008245/981808440_kRCjz-O.png">larger image</a>]</p>
<p>The scrum team member responsible for testing the user story has the responsibility of assuring that it meets all of the acceptance criteria.  He pulls the story from the queue of &#8220;done&#8221; stories, and tests.</p>
<p><img class="alignnone" title="testing a user story within a sprint" src="http://sehlhorst.smugmug.com/Other/blog/201008246b/981774960_LBRof-O.png" alt="" width="450" height="320" />[<a title="qa rejecting a user story inside a sprint" href="http://sehlhorst.smugmug.com/Other/blog/201008246/981808480_22dSS-O.png">larger image</a>]</p>
<p>If the story fails to meet any of the acceptance criteria, it moves back into either the <em>sprint backlog</em> or the <em>being developed</em> column, where a member of the team resumes ownership of the user story and works to resolve the issue.  Once the issue is resolved, the user story is re-queued for testing.  When the user story meets the acceptance criteria, it is moved into the <em>done done</em> column.</p>
<p><img class="alignnone" title="user stories that are done done" src="http://sehlhorst.smugmug.com/Other/blog/201008247b/981774980_e85hf-O.png" alt="" width="450" height="320" />[<a title="lifecycle of a user story in a scrum sprint" href="http://sehlhorst.smugmug.com/Other/blog/201008247/981808535_CeNJf-O.png">larger image</a>]</p>
<h2>Conclusion</h2>
<p>If you are new to Scrum, and wondered how the sausage is made inside a sprint, this gives you a framework for understanding what is going on, and how the team delivers.  If you already know or use Scrum, you may have learned a couple things.</p>
<ul>
<li>Using this framework to describe how a sprint works is effective when explaining to people who do not have any experience with agile.</li>
<li>Laying things out this way visually, will give you an easy-to-see signal if your team is unbalanced between developers and testers.</li>
</ul>
<p>I&#8217;ve been involved with agile teams and processes for just over 11 years now, and incremental development is burned into my brain.  If you are new to scrum, <em>please</em> let me know if this seemed like a good way for you to consume this material.  If you&#8217;re an old hat, and have other suggestions or presentations, please add them in the comments below, because future readers will benefit from the additional ideas.</p>
<p> </p>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+Foundation+Series%3A+Inside+A+Scrum+Sprint+http://bit.ly/aUIIRm+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2010/08/24/inside-a-scrum-sprint/&amp;t=Foundation+Series%3A+Inside+A+Scrum+Sprint" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2010/08/24/inside-a-scrum-sprint/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Failure To Launch (Your Product)</title>
		<link>http://tynerblain.com/blog/2009/02/19/failure-to-launch/</link>
		<comments>http://tynerblain.com/blog/2009/02/19/failure-to-launch/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 22:21:37 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Ishikawa Diagram]]></category>
		<category><![CDATA[Product Management]]></category>
		<category><![CDATA[Requirements]]></category>
		<category><![CDATA[Requirements Models]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[ishikawa]]></category>
		<category><![CDATA[launch]]></category>
		<category><![CDATA[product launch]]></category>
		<category><![CDATA[root cause analysis]]></category>
		<category><![CDATA[start-up]]></category>
		<category><![CDATA[startup]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/?p=835</guid>
		<description><![CDATA[
topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2009%2F02%2F19%2Ffailure-to-launch%2F", "style": "big", "title": "Failure To Launch (Your Product)" });

Jump forward in time to the day of your next big product launch (first release, new features, new market segment, etc).  And your site/application crashes due to the &#8220;unexpected&#8221; demand.  All you can do now is look for a bucket of water to put [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2009%252F02%252F19%252Ffailure-to-launch%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Failure%20To%20Launch%20%28Your%20Product%29%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2009%2F02%2F19%2Ffailure-to-launch%2F", "style": "big", "title": "Failure To Launch (Your Product)" });</script></div>
<p><img class="alignnone" title="rocket launch failure" src="http://sehlhorst.smugmug.com/photos/476802889_vAUQs-L.jpg" alt="" width="250" height="186" /></p>
<p>Jump forward in time to the day of your next big product launch (first release, new features, new market segment, etc).  And your site/application crashes due to the &#8220;unexpected&#8221; demand.  All you can do now is look for a bucket of water to put out the fire.  What could you have done to prevent this disaster?  Jump back to today and start doing it!</p>
<h2><span id="more-835"></span>Backwards Planning</h2>
<p>Depending on how you look at things, this is a backwards planning exercise, or a variation of the  <em><a title="remember the future - innovation games book excerpt" href="http://800ceoread.com/excerpts/archives/006538.html">remember the future</a></em><a title="remember the future - innovation games book excerpt" href="http://800ceoread.com/excerpts/archives/006538.html"> innovation game</a>, or risk management, or proactive product management.  You can avoid a disaster by imagining what might happen, then hypothetically figuring out why it (would have) happened.  That leads to planning how you could prevent it.  And now you&#8217;ve left the dream world of a <a title="gedanken experiments" href="http://en.wikipedia.org/wiki/Thought_experiment">Gedanken experiment</a> and returned to the real world of product management.</p>
<h2>Problem Triage</h2>
<p>The way to approach this is straightforward.  Imagine some failure scenarios and the importance of preventing them:</p>
<p> </p>
<ol>
<li>Imagine a failure scenario.</li>
<li>&#8220;Predict&#8221; the likelihood of the failure.</li>
<li>&#8220;Estimate the impact of the failure.</li>
<li>Repeat for each scenario</li>
</ol>
<p>You can prioritize your failure scenarios by multiplying the likelihood of each with the impact of each, and sorting them from largest to smallest.  Then determine which ones you&#8217;re willing to address, and which ones you&#8217;re willing to risk.  You may not be able to predict the likelihood of some failures (at least until you do a root cause analysis).  Take each of these and put them directly above the scenario with the next highest impact.  The rationalle is that these are so bad, that you really want to find out how likely they are to happen.  Once you predict likelihood (see below) you can reprioritize.</p>
<h2>Root Cause Analysis</h2>
<p>For the failure scenarios you choose to address, the next step is to do a root cause analysis that identifies why it might have happened.  The best tool for capturing this analysis is an <a title="ishikawa diagrams" href="http://tynerblain.com/blog/2008/05/27/cause-and-effect-diagrams/">Ishikawa diagram</a>.  Consider that one problem you might face is your website crashing.</p>
<p><img class="alignnone" title="base problems ishikawa" src="http://sehlhorst.smugmug.com/photos/476855598_rsvGg-O.png" alt="" width="450" height="275" />[<a title="larger ishikawa diagram" href="http://sehlhorst.smugmug.com/photos/476855601_kAYeo-L.png">click for larger version</a>]</p>
<p>Essentially, you can crash your site by having too many users, too many concurrent users, or too many concurrent sign-ups.  Developing a cause-and-effect diagram (another name for an Ishikawa diagram) is usually an iterative and exploratory process.  You probably won&#8217;t create the simple version above first.  You may ask your implementation team &#8220;What can cause the website to crash?&#8221;  For each of their answers, you identify when that situation can happen.  Or you start top down.  Most likely, a mix of the two.  Your completed root cause analysis may look like the following:</p>
<p><img class="alignnone" title="complete failure analysis" src="http://sehlhorst.smugmug.com/photos/476855607_Vwh58-O.png" alt="" width="450" height="230" />[<a title="larger root cause analysis diagram" href="http://sehlhorst.smugmug.com/photos/476855612_J5jvk-L.png">click for larger version</a>]</p>
<p>At this point, your team can probably predict many (maybe all) of the root causes of a website crash.  The predictions may be conditional &#8211; &#8220;we can handle 10 concurrent users, but 20 probably kill us, and 100 definitely would.&#8221;  Developers are notoriously good at answering questions with conditional statements that reveal the nuances of their thinking.</p>
<p>Remember that you&#8217;re looking back from the future.  At product launch, what are you hoping for / reasonably expecting?  For this example, assume it is 10,000 total users, with 100 concurrent users (normally) and 500 concurrent signups.  You determine these numbers by working with your PR, marketing, or mar-com people (or wearing those hats, when it is all you).  Your plan is to do a big launch with a demo and a promo code for signup.  You know your audience will have internet connections, and will have twitter running at the time of your presentation.  You expect/dream of an immediate burst of signups, followed by tweets and word of mouth, and eventually blog articles causing additional growth over the next couple of weeks.</p>
<p>Use this data to feed back into the developer&#8217;s conditional responses.  If you&#8217;re like me, you will have found &#8220;absolute certainty of failure&#8221; from something.  And you may have even identified the thresholds for each element.  For example, database loading can handle 75 concurrent users, but with the current implementation, you only have enough database connections available to support 25 concurrent users.</p>
<p>Jumping back to the present, you now have some very discrete, and very important things to do before your launch.  If you need to, revisit the prioritized list of failure scenarios.  By looking at the next level of detail, have you found that the order of importance (to fix) has changed?  What about the &#8220;must fix&#8221; versus &#8220;willing to risk&#8221; line?  Has it moved?</p>
<p>Fold the &#8220;must fix&#8221; items into your backlog, and prioritize them relative to the other capabilities on your roadmap.  As a side note &#8211; make sure you&#8217;ve built in some testing to make sure you actually prevent the problems.  This might even be a great opportunity to implement &#8220;performance regression tests&#8221; &#8211; it is not enough to prevent bugs, you have to prevent slowdowns.</p>
<h2>Rethinking the Problem</h2>
<p>Without going into details on <em>how</em> the team will solve each problem, make sure that together you keep the Ishikawa diagrams in mind, and see how any proposed solutions might &#8220;reappear&#8221; on the diagram.  For example, rewriting your database connections to use asynchronous processes and a set of pooled connections may prevent a crash, but it may really hurt performance.  You may not have time to find an elegant solution.  So stop and rethink the problem.</p>
<p>At this point, you&#8217;ve said</p>
<ol>
<li>Given a marketing plan / launch strategy, we would crash the website.</li>
<li>We can make changes between now and the launch that will double the number of concurrent users we can support (or whatever), but that is not enough to support the launch strategy.</li>
<li>Solution: Change the launch strategy.</li>
</ol>
<p>Maybe you can&#8217;t support a wide-open promo-code based signup.  You should modify your launch so that it can only create as much demand as your product (including pending improvements) can support.  Maybe you limit it to the first 1,000 new users (probably more code to write to enforce the limit).  Maybe you launch with per-user invitations, where you can control the speed of propagation of invites (start with 100, when those have been sent, make another 100 available, etc).</p>
<h2>Entire Team Problem</h2>
<p>This is a problem that is solved collaboratively, by the entire team.  It is not just a &#8220;go write the code&#8221; problem.  What your product can support at a launch should drive how you choose to launch, just as how you choose to launch should drive what you want your product to support.  </p>
<p>You may have to delay a key capability in order to scale.  Does your marketing team know this?  Slightly less bad than crashing would be announcing a feature that is disabled.  Still need to announce the feature?  Pre-announce it: &#8220;Coming in a month&#8230;&#8221;</p>
<p>This stuff is important for every company and product, but it is especially critical for start-ups.  As a start-up, you have limited opportunities to grow, and a limited safety-net to catch you when you fail to capitalize on those opportunities.  So make sure everyone (not just the development team) is aligned to make the best use of each opportunity.</p>
<h2>Conclusion</h2>
<p>You have an opportunity to prevent problems.  All you have to do is imagine that they have happened in the future, figure out why they would have happened, then do what it takes (in software, or organizationally) to prevent them.</p>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+Failure+To+Launch+%28Your+Product...+http://bit.ly/Zw6ow+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2009/02/19/failure-to-launch/&amp;t=Failure+To+Launch+%28Your+Product..." title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2009/02/19/failure-to-launch/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Making Offshore Design Work</title>
		<link>http://tynerblain.com/blog/2008/05/14/offshore-design/</link>
		<comments>http://tynerblain.com/blog/2008/05/14/offshore-design/#comments</comments>
		<pubDate>Thu, 15 May 2008 03:39:58 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Communication]]></category>
		<category><![CDATA[Consulting]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Outsourcing]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[off-shoring]]></category>
		<category><![CDATA[offshoring]]></category>
		<category><![CDATA[offshoring design]]></category>
		<category><![CDATA[outsourcing design]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/?p=679</guid>
		<description><![CDATA[
topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2008%2F05%2F14%2Foffshore-design%2F", "style": "big", "title": "Making Offshore Design Work" });

When companies first start off-shoring, they usually send the &#8220;low level&#8221; implementation work overseas first, to work out the process kinks and manage risk.  Over time, your valued, domain-aware developers will perceive a lack of career opportunities with this limited role.  Naturally, you [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2008%252F05%252F14%252Foffshore-design%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Making%20Offshore%20Design%20Work%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2008%2F05%2F14%2Foffshore-design%2F", "style": "big", "title": "Making Offshore Design Work" });</script></div>
<p><img src="http://www.smugmug.com/photos/295434701_AKMnM-L.jpg" alt="offshore oil rig" width="250" height="191" /></p>
<p>When companies first start off-shoring, they usually send the &#8220;low level&#8221; implementation work overseas first, to work out the process kinks and manage risk.  Over time, your valued, domain-aware developers will perceive a lack of career opportunities with this limited role.  Naturally, you will want to consider sending design work offshore too.  You can make it work.  If you do it wrong, you&#8217;re toast.</p>
<p><span id="more-679"></span></p>
<h2>Different Models for Offshore Development</h2>
<p>There are many ways to organize software-creation teams (where creation includes product management, design, development and testing).  When developing an organizational design that incorporates elements of off-shoring, there are <a title="four offshoring models for software development" href="http://tynerblain.com/blog/2006/03/31/four-outsourcing-models-for-software-development/">four primary models for outsourced software creation</a>.</p>
<ol>
<li><strong>No offshore development at all</strong>.  Occasionally referred to as insourcing, this is the traditional &#8220;everyone in one place&#8221; model &#8211; or at least &#8220;everyone in similar time zones.&#8221;</li>
<li><strong><a title="low-level offshore development" href="http://tynerblain.com/blog/2008/05/05/offshore-development/">Low-level outsourcing</a></strong>.  The implementation teams (both coding and testing) are located offshore, with design and product management staying local.</li>
<li><strong>High-level outsourcing</strong>.  The focus of this article.  Keeping product management &#8220;local&#8221; but moving design and development responsibilities offshore.</li>
<li><strong>Complete technical outsourcing</strong>.  Everyone except the product manager is offshore.</li>
</ol>
<p>The models can be most easily compared when the same process is compared in each &#8211; just with different locations.  Co-location of team members has an impact when comparing face-to-face communication with online / phone / remote communication. But this factor is not a primary one in influencing team-decisions &#8211; it is no different than having someone who works from home. The key element in team dynamics is a dramatic shift in timezones.</p>
<p>This timezone shift causes a latency in the communication process, illustrated by the following example:</p>
<blockquote><p>Imagine the following expensive question and answer session:</p>
<ul>
<li>Person A asks person B a question.</li>
<li>12 hours later, person B responds with a request for a clarification.</li>
<li>12 hours later, Person A clarifies the question.</li>
<li>12 hours later, Person B responds with an answer.</li>
<li>12 hours later, Person A acknowledges the answer.</li>
</ul>
<p>When this communication channel happens between an onshore person and an offshore person, it takes <strong>48 hours</strong> instead of 48 minutes. The more this happens, the more expensive it is to outsource. The key to making low-level outsourcing work cost effectively is to minimize the impact of this communication latency, while realizing the benefits of lower salaries in the offshore location.</p>
<p><a title="low-level offshore development" href="../2008/05/05/offshore-development/" target="_blank"><cite>Making Offshore Development Work</cite></a></p></blockquote>
<p>This is why proper communication design is the make-or-break element of making collaborative teams work when using an outsourcing model that involves anyone being offshore.</p>
<h2>High-Level Outsourcing</h2>
<p>Consider the following software development process diagram (from <a title="four offshore development models" href="../2006/03/31/four-outsourcing-models-for-software-development/" target="_blank"><em>Four Application Development Outsourcing Models</em></a>):</p>
<p><img src="http://sehlhorst.smugmug.com/photos/62418699-L.jpg" alt="high level outsourcing process flow" width="401" height="800" /></p>
<p>In this off-shoring process flow diagram, the shaded areas represent the activities that happen offshore. Note that this is the exact same process flow that is used to describe the other outsourcing models. The difference from other models is primarily where resources are located, but also the relevant scope of responsibility. In comparison with <a title="making low-level outsourcing work" href="../2008/05/05/offshore-development/" target="_blank">low-level outsourcing</a>, the only difference in the process flow is that responsibility for test design and solution design is transitioned to the offshore development team.</p>
<h2>Artificial Boundary</h2>
<p>This model creates a bit of an artificial boundary between the “interpret requirement” step and the “design solution” and “design tests” steps. This artificial boundary creates a potentially odd dynamic within the team.</p>
<p>To make reading easier, we’ll talk about the development side of the process flow only, but the same ideas apply on the testing side.</p>
<p>This model has one developer interpreting requirements, and a different developer doing the design work. In an insourcing model, those two developers are usually the same person. In large development teams, a common breakout here is architect versus senior designer. The architect (the figure on top) would be responsible for those design considerations that span the enterprise and the senior designer would be responsible for those design considerations that affect a single application. Here’s a good background article by Scott Ambler on <a title="enterprise architecture approach" href="http://www.enterpriseunifiedprocess.com/essays/enterpriseArchitecture.html" target="_blank">approaching enterprise architecture</a>.</p>
<p>Why have an artificial boundary? Because this model is an emergent design.</p>
<ol>
<li>A company starts with low-level outsourcing.</li>
<li>The offshore developers complain about a lack of growth opportunities (both career and skill).</li>
<li>Executives are not prepared to completely outsource all technical work (risk aversion), or the team is not ready to succeed with that approach.</li>
</ol>
<p>Splitting the “interpret requirements” task from the “design a solution” task is a compromise. It minimizes the risk associated with providing growth opportunities to offshore team members. That risk is minimized by avoiding the high-latency communication channel (from onshore to offshore) when communicating requirements. Instead, the interpretation of the requirements is done onshore, and that interpretation is communicated.</p>
<p>You can argue that this model is the offspring of a trust issue within the organization. A company can absolutely say “We want growth opportunities for our offshore team members” and at the same time say “We are not ready to relinquish complete technical control.” This is definitely a trust issue, and therefore a <em>perceived</em> risk mitigation strategy. The risk may be very real, or non-existent. In either case, it is emotionally present.</p>
<h2>Vague Scope and Role Conflict</h2>
<p>If, while reading this, the notion of splitting interpretation from design feels uncomfortable, that’s because it is. For many teams that are <em>evolving</em> their outsourcing model, it feels uncomfortable, but it feels less uncomfortable than releasing complete technical control.</p>
<p>One problem, which I completely grok as a former developer, is that it is almost impossible to interpret requirements without imagining designs. But this model has different people performing the different tasks. So should the interpreter just discard those designs? Presumably the interpreter is more experienced, certainly more knowledgeable about the domain. It would be a shame to discard those design insights.</p>
<h2>Robbing Peter to Pay Paul</h2>
<p>This approach has clear benefits for the offshore developers who are now presented with growth opportunities. Unfortunately, you run the risk of sucking the fun out of the role of the interpreter &#8211; a senior, experienced developer with domain knowledge. While proper requirements interpretation can be fun, it usually is not fun for a developer. Only requirements people will enjoy those nuances, generally.</p>
<p>You risk eliminating a career path and growth opportunities for your onshore resources with this model.</p>
<h2>Division of Labor</h2>
<p>One approach that keeps the growth opportunities open for your senior onshore technical resources is to have them play multi-product, or architectural roles. This presents an opportunity for these individuals to apply organizational insights across products, finding synergies between applications and driving consistency and consolidation among applications. You essentially split the responsibilities “broad and deep” where the onshore designer is looking across the portfolio and the offshore designer has ownership responsibilities for a single application or scope. This is similar to the division of responsibilities that works well for tackling <a title="enterprise product management is broad and deep" href="../2008/01/23/enterprise-product-management/" target="_blank">enterprise product management</a>.</p>
<p>Instead of preventing communication of requirements across the high-latency channel, it minimizes it. The onshore designer acts as the liaison between multiple offshore designers, fielding interpretation questions, and more effectively, preventing them. Developers have a language all their own. Through a shared perspective on common experiences, they can communicate very efficiently &#8211; by analogy, <a title="symbolism and communication" href="../2006/02/12/symbolism-and-communication/" target="_blank">symbolically</a>, and via design patterns. These communication opportunities (between like-minded individuals) can have very high information density. For example, one developer can say “MVC pattern” to another, and that serves more effectively to communicate an approach to designing a solution (and a context / interpretation of requirements) far more efficiently than a product manager describing requirements that multiple tools and platforms should expose the same set of capabilities or behaviors [and that is overly short, because I don't feel like typing a comprehensive explanation of the <a title="MVC pattern at wikipedia" href="http://en.wikipedia.org/wiki/Model-view-controller" target="_blank">MVC pattern</a>].</p>
<p>Another approach is to <em>silo</em> the developers vertically &#8211; having some applications (or modules) following a low-level outsourcing model, and others practicing complete technical outsourcing. Any given team is operating discretely with a clearly defined set of responsibilities. The teams may just be operating differently. Essentially, you’re saying that your “average” is high level outsourcing, even though it is really a mix of two models. This doesn’t really count, since none of your teams are addressing the communication challenges of this model &#8211; your company is leapfrogging over it, but choosing to mitigate risk by doing it a little bit at a time.</p>
<p>You can also take the approach of having the onshore designer be responsible for over-arching and high-complexity design issues, with offshore designers owning more straightforward and lower risk design activities.</p>
<p>The best approach for maximizing your team’s effectiveness (and your HR goals) will be overwhelmingly determined by the individuals involved. If you’re in a large company, you probably don’t get to maximize team effectiveness &#8211; you are likely to be forced into a particular model. If you’re doing the forcing, recognize that one size does not fit all.</p>
<h2>High Latency Communication And Designing</h2>
<p>When circling back to the main challenge of offshoring &#8211; communication &#8211; you need to look at the nature of the communication that is subject to the high-latency of temporal displacement within the team. The key to making this model work is to leverage the efficiency of cross-talk between developers. That means having experienced people on both the offshore and onshore teams who share common design backgrounds (patterns, analogies, examples) and deep domain understanding (reducing the provision and clarification of <a title="It is all about context" href="../2006/11/09/requirements-context/" target="_blank">context </a>across the communication channel).</p>
<p>Design reviews are also very effective at eliminating the impact of this latency on communication. Design reviews typically happen as follows:</p>
<ol>
<li>Designer A spends time creating design based on an interpretation of requirements.</li>
<li>Designers A &amp; B get together and review the design in a relatively short meeting (or Designer B reviews a design document). Feedback is delivered in a burst.</li>
<li>Designer A spends time updating the design based on feedback from step 2.</li>
<li>Return to step 2 as many times as is needed.</li>
</ol>
<p>There is a big chunk of work involved in incorporating feedback from a design review. This can be folded into the “white space” between communications. In other words, while designer B is sleeping for the night, designer A is making updates. This looks like, <span style="text-decoration: underline;">but is not</span> the <a title="follow the sun" href="http://blogs.computerworld.com/node/1005" target="_blank">follow-the-sun</a> pattern.</p>
<blockquote><p>The follow-the-sun pattern is one where someone is always working. I’ve made this work on a project where there were two teams working 12 hour shifts with a 4 hour overlap (and a 4 hour “blackout”). Note &#8211; that isn’t sustainable, just anecdotal. I think the linked article is right, commonly, follow-the-sun implementation does not work, for the reasons cited in that article.</p></blockquote>
<p>What makes this very different is that we are <em>synchronizing</em> the naturally-occurring time lag between design reviews with the geographically-induced time lag in communication.</p>
<h2>Conclusion</h2>
<p>The strategy for successfully utilizing offshore resources for both implementation and design starts and ends with communication. It also requires attention to your specific people and their career aspirations.</p>
<ul>
<li>Utilize design reviews to take advantage of serendipitous time-lags in the communication cycle.</li>
<li>Assure that your role definitions are clear, and aligned with the aspirations of the people on your team.</li>
<li>Follow the <a title="effective offshore development process" href="../2008/05/05/offshore-development/" target="_blank">tips for effective offshore development</a> &#8211; this strategy builds on that one, it does not replace it.</li>
</ul>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+Making+Offshore+Design+Work+http://bit.ly/2QIv6E+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2008/05/14/offshore-design/&amp;t=Making+Offshore+Design+Work" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2008/05/14/offshore-design/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Making Offshore Development Work</title>
		<link>http://tynerblain.com/blog/2008/05/05/offshore-development/</link>
		<comments>http://tynerblain.com/blog/2008/05/05/offshore-development/#comments</comments>
		<pubDate>Tue, 06 May 2008 03:53:37 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Communication]]></category>
		<category><![CDATA[Consulting]]></category>
		<category><![CDATA[Outsourcing]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[offshore]]></category>
		<category><![CDATA[offshore development]]></category>
		<category><![CDATA[offshore testing]]></category>
		<category><![CDATA[outsourced development]]></category>
		<category><![CDATA[requirements testing]]></category>
		<category><![CDATA[testing requirements]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/?p=675</guid>
		<description><![CDATA[
topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2008%2F05%2F05%2Foffshore-development%2F", "style": "big", "title": "Making Offshore Development Work" });

Economic pressures are driving most companies in high-developer-salary markets to explore using offshore development teams as part of their approach to developing software.  Developing software with a global team presents new challenges as well as new benefits.  If you do it right, you [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2008%252F05%252F05%252Foffshore-development%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Making%20Offshore%20Development%20Work%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2008%2F05%2F05%2Foffshore-development%2F", "style": "big", "title": "Making Offshore Development Work" });</script></div>
<p><img src="http://sehlhorst.smugmug.com/photos/290461665_gH8Un-L.jpg" alt="offshore oil rig" width="250" height="225" /></p>
<p>Economic pressures are driving most companies in high-developer-salary markets to explore using offshore development teams as part of their approach to developing software.  Developing software with a global team presents new challenges as well as new benefits.  If you do it right, you can have a more cost-effective team.  If you do it wrong, you can have a disaster.</p>
<p><span id="more-675"></span></p>
<h2>Different Models for Offshore Development</h2>
<p>There are essentially <a title="offshore software development models" href="http://tynerblain.com/blog/2006/03/31/four-outsourcing-models-for-software-development/">four different models for managing a software development team</a>, with respect to onshore and offshore roles.</p>
<ol>
<li>No offshore development, also known as insourcing.</li>
<li>Low-level outsourcing, having the implementation (but not design) team members offshore.</li>
<li>High-level outsourcing, having the implementation <em>and</em> design team members offshore.</li>
<li>Complete technical outsourcing, having all technical implementation team members offshore.</li>
</ol>
<p>Each different model has the same set of people involved in the process, with the same channels of communication.  The differences are in <em>which</em> communications happen across geographic and temporal boundaries, and which communications happen in the same time zone.</p>
<p>For this article, we are focusing specifically on low-level outsourcing, where the communication channel most affected by different timezones is the one between design and implementation.</p>
<h2>Low-Level Outsourcing</h2>
<p>Consider the following software development process diagram (from <a title="four offshore development models" href="http://tynerblain.com/blog/2006/03/31/four-outsourcing-models-for-software-development/"><em>Four Application Development Outsourcing Models</em></a>):</p>
<p><img src="http://sehlhorst.smugmug.com/photos/62416957-L.jpg" alt="low-level outsourcing" width="401" height="800" /></p>
<p>Each area surrounded by a dashed line represents a different <em>type</em> of work, or a different required dominant skill set.  Every stage in the development process requires a different set of dominant skills, and all areas share a set of common skills.  When exploring different offshoring models, teams are most effective when they identify the distinctions in dominant skill set requirements, and divide responsibilities along those boundaries.  When you create an artificial (or arbitrary) boundary within one of the regions in the diagram, you create opportunities for misunderstanding.  With those misunderstandings, you can have people redundantly working on the same thing, or even worse, you can have tasks that don&#8217;t get accomplished.  You also introduce the possibility of discord within your team as people either proclaim &#8220;that&#8217;s <em>my</em> job&#8221; or &#8220;that&#8217;s <em>not</em> my job.&#8221;  You can split a team within the areas shown above (and we&#8217;ll talk about that in a future article), but it is harder to do successfully.</p>
<p>Low level outsourcing is an approach where the implementation team members who write the code and tests are offshore. The requirements work is done onshore (where salaries are expensive). Interpretation of the requirements is also done onshore. The design of the testing plan is done onshore, and the design of the solution is also done onshore.  The creation of tests and the implementation of the code is done offshore.</p>
<p>In the diagram above, testing of requirements happens on the left, and testing of the implementation happens implicitly on the right.  If you haven&#8217;t been reading Tyner Blain for a couple years, that may not make much sense.  Testing of requirements and implementation are different, and you need to do both.</p>
<h2>Testing: Isolation of Variables Reduces Costs</h2>
<p>Testing is something that can be approached from a few different perspectives, and the word &#8220;testing&#8221; means different things to different people.  In this process flow, we are focusing on two main areas of testing &#8211; testing the requirements and testing the implementation.  When you test the requirements, you are asking the question &#8220;does this solution do what the product manager intended?&#8221;  When you test the implementation, you are asking the question &#8220;does my solution behave as designer intended?&#8221;  This is a nuanced difference, and non-technical people may say &#8220;what is the difference?&#8221;  The designer intends <em>exactly the same thing</em> that the product manager intends.</p>
<p>If you think back to your high school science class, you&#8217;ll remember the concept of &#8220;control of experiments.&#8221;  This is the field of practical application of logic to scientific experimentation.  By taking a logically rigorous approach to designing a science experiment, you can isolate variables, and test each of them independently.  This prevents you from drawing false conclusions from your data.  The same process leads you to test both the requirements and the implementation.  If you&#8217;ve ever submitted a bug and had the implementation team close it out with the statement &#8220;working as designed&#8221;, you  already know the benefit of testing both.  Just because something is designed to do X does not mean it is not <em>supposed</em> to do Y.  By introducing a designer between the product manager and the testing, you introduce the possibility that <a title="people are the source of bugs" href="http://tynerblain.com/blog/2008/01/14/you-are-creating-bugs/">the designer is the source of the bug</a> &#8211; by misinterpreting the requirements.</p>
<p>It is possible to &#8220;test&#8221; the design and then test the implementation &#8211; this will isolate the design from the implementation.  Unfortunately, the only way to &#8220;test&#8221; a design (without also testing the implementation) is conceptually, with a thought experiment.  And that&#8217;s exactly what the designer does as part of designing.  No one else is really going to understand the design well enough to do that.  And if the designer is doing the thought-testing, there is no way to isolate if the designer misinterpreted the requirements in the first place.  That same misinterpretation will influence his testing in the same way that it influenced his design (See <a title="the sources of bugs in software" href="http://tynerblain.com/blog/2006/01/22/where-bugs-come-from/">error source E3 in <em>Where Bugs Come From</em></a> for more details).  This is critical to designing, but it does not work for testing a design.</p>
<p>It is possible to test just the requirements.  You create tests based solely on the documented requirements.  You run those tests against the implemented solution.  When the test passes, every step in the process worked.  These are known as <a title="blackbox testing vs whitebox testing" href="http://tynerblain.com/blog/2006/01/12/foundation-series-black-box-and-white-box-software-testing/">black-box tests</a>, because you can run the tests without any insight into how the software is written (it is a &#8220;black box&#8221;).  The problem comes when a test fails &#8211; you know something is wrong, but you have to do (expensive) research to figure out the source of the problem.  It could be that the implementation failed to do what was designed.  Or it could be that the software design failed to meet the objectives of the requirements.  There is a way to reduce the cost of this analysis &#8211; by testing both the requirements and the implementation.</p>
<p>You can easily test the implementation.  An implementation test, commonly known as a <a title="intro to black-box testing and white-box testing" href="http://tynerblain.com/blog/2006/01/12/foundation-series-black-box-and-white-box-software-testing/">white-box test</a>, and usually implemented as <a title="intro to unit testing" href="http://tynerblain.com/blog/2006/01/19/foundation-series-unit-testing-software/">a unit-test</a>, inspects the effectiveness of a particular implementation at doing what the designer intended.  When you combine implementation testing with requirements testing, you isolate the designer variable.  If a requirements test fails but the implementation tests pass, the problem is with the design (or with the design of the test).  When both requirements and implementation tests fail, you know that <em>at least</em> the implementation is wrong.</p>
<p>In the diagram above, the testing on the left side represents testing of requirements.  The right side of the diagram implicitly includes testing of the implementation as part of implementing.  You need to ingrain your implementation testing into your development philosophy.  Would you deliver code without compiling it?  Why, as a developer, would you consider delivering it without testing it?  Compilation is not just a build step, it is also an implicit test of compilability.  You should also include the implicit test of &#8220;does what I intended it to do.&#8221;</p>
<p>Combining the discipline of <a title="continuous integration explained" href="http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/">continuous integration</a> with <a title="test driven development" href="http://tynerblain.com/blog/2006/09/12/insight-into-tdd/">test driven development</a> is the most effective way to accomplish this.  Note: remember this part, as it is a critical component to making low-level offshore development work.  Without this, you may as well give up &#8211; you certainly aren&#8217;t going to be more cost-effective.</p>
<h2>Communication Across Time And Space</h2>
<p>The key to making offshoring effective, as with any development process, is to make the communication work.  For communication that happens between people in the same location (or at least roughly the same time zone), the problems and solutions are no different than when you have an insourcing model.  What&#8217;s different is the communication that happens between members of the onshore team and the offshore team.  This communication is not just remote (technology helps us solve these problems with instant messaging, phone calls, and other real-time (or near-real-time) techniques), but also phase-shifted in time.  When you have team members working while other team members are sleeping, you slow down the collaborative process.  You introduce a near-crippling latency into the communication channel.</p>
<p>Imagine the following expensive question and answer session:</p>
<ul>
<li>Person A asks person B a question.</li>
<li>12 hours later, person B responds with a request for a clarification.</li>
<li>12 hours later, Person A clarifies the question.</li>
<li>12 hours later, Person B responds with an answer.</li>
<li>12 hours later, Person A acknowledges the answer.</li>
</ul>
<p>When this communication channel happens between an onshore person and an offshore person, it takes <strong>48 hours</strong> instead of 48 minutes.  The more this happens, the more expensive it is to outsource.  The key to making low-level outsourcing work cost effectively is to minimize the impact of this communication latency, while realizing the benefits of lower salaries in the offshore location.</p>
<h2>Communications On Which To Focus</h2>
<p>The &#8220;happy path&#8221; communication channels (shown with blue arrows in the diagram) are the transfer from &#8220;test design&#8221; to test, and from &#8220;implementation design&#8221; to implementation.  You have to communicate the designs in such a way as to minimize misinterpretation of the design.  <em>Never prevent needed communication</em>.  Your goal is NOT to stop communication, but to preempt it by eliminating the need.  The only thing worse than taking too long because you have a lot of communication is failing to communicate enough.  Your goal is NOT to prevent communication, but to minimize the need for it.</p>
<p>The &#8220;trust but verify&#8221; communication involves making sure that the implementation meets the design.  In (requirements) testing, it means reviewing that the tests exhaustively cover everything identified in the test design.  It also means reviewing that each test (implementation) actually (effectively) tests what it is designed to test.  As team members demonstrate their capabilities, they require less oversight &#8211; which is true of any mentoring relationship.  In implementation, it means verifying that the code does what the design requires.  You could read the code and make a determination, but that is a manual inspection of the code, and manual inspections have been shown to be at best 80% effective as a testing method.  What you need to do is create a unit test suite, run it continuously, and only allow developers to check-in their code (to the trunk) when the entire suite passes.  Then all you have to do is review the test suite to assure that it will test the design effectively.  It wouldn&#8217;t hurt to also run the test suite locally (onshore) as a verification, but fundamentally, you are trusting that your developers will follow this continuous integration process.</p>
<p>You are using testing and test design as a mechanism to validate effective communication.  You can think of it as <a title="active listening" href="http://tynerblain.com/blog/2007/03/15/ten-active-listening-skills/">a form of active listening</a>.  When you (or more appropriately, your design document) says &#8220;X&#8221;, you can review the test design to confirm that your listener designed tests that assure &#8220;X&#8221; will happen.  Do not just rely on informal communication and acknowledgement.  Cross-cultural communication introduces a lot of <a title="misinterpreting cultural cues" href="http://tynerblain.com/blog/2005/12/11/when-%E2%80%98no%E2%80%99-means-%E2%80%98yes%E2%80%99/">complexity and misinterpretation</a>.  People who do not share a common language or culture also tend to <a title="symbols and communication" href="http://tynerblain.com/blog/2006/02/12/symbolism-and-communication/">interpret symbols very differently</a>, and will rarely have the same connotations for given interpretable words.</p>
<p>Definition of tests and validation of testing is important beyond the immediate communication of design.  There are also the feedback loops that come from the &#8220;unhappy path&#8221; when something goes wrong (and a bug is introduced).  Each of these &#8220;where was the bug introduced, and how do we fix it?&#8221; cycles is also affected by the latency of cross-shore communication.  Good testing reduces the number of these otherwise unwarranted communication cycles.</p>
<p>Developing good design docs is also critical to the success of this communication.  The definition of &#8220;good&#8221; for a design doc is so dependent on the exact circumstances that it is impractical to try and define what that is (at least within this article).  A design doc needs to be <a title="writing for the reader" href="http://tynerblain.com/blog/2006/10/04/writing-for-the-purpose-of-reading/">written with the reader in mind</a>, not the author.  Beyond that, we won&#8217;t try and make any statements of truth.</p>
<h2>Conclusion</h2>
<p>The strategy to successful utilization of offshore resources for development and test implementation work starts with communication.  The strategy also ends with communication.</p>
<ul>
<li>Create artifacts (good design docs) that minimize the clarification cycle across the onshore-offshore time boundary.</li>
<li>Review implementation tests as an active-listening mechanism to confirm that communication of design intent was effective.</li>
<li>Practice continuous integration (both as an offshore developer and as an onshore designer or development manager) to assure that your solution stays true to the design and the requirements.</li>
</ul>
<p>And, as always, have great people &#8211; because people trump process.</p>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+Making+Offshore+Development+Work+http://bit.ly/6VC1t+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2008/05/05/offshore-development/&amp;t=Making+Offshore+Development+Work" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2008/05/05/offshore-development/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>You Are Creating Bugs In Your Software</title>
		<link>http://tynerblain.com/blog/2008/01/14/you-are-creating-bugs/</link>
		<comments>http://tynerblain.com/blog/2008/01/14/you-are-creating-bugs/#comments</comments>
		<pubDate>Tue, 15 Jan 2008 03:19:16 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Business Analysis]]></category>
		<category><![CDATA[Product Management]]></category>
		<category><![CDATA[Requirements]]></category>
		<category><![CDATA[Requirements gathering]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[UX]]></category>
		<category><![CDATA[good requirements techniques]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[reducing bugs]]></category>
		<category><![CDATA[requirements prevent bugs]]></category>
		<category><![CDATA[sdlc]]></category>
		<category><![CDATA[software development lifecycle]]></category>
		<category><![CDATA[source of bugs]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2008/01/14/you-are-creating-bugs/</guid>
		<description><![CDATA[
topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2008%2F01%2F14%2Fyou-are-creating-bugs%2F", "style": "big", "title": "You Are Creating Bugs In Your Software" });

No matter how good your quality process is, you are introducing bugs.  This article reviews the places where bugs are introduced in the software development process (from stakeholders to users), and reviews ways to address those bugs.

One way to identify the [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2008%252F01%252F14%252Fyou-are-creating-bugs%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22You%20Are%20Creating%20Bugs%20In%20Your%20Software%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2008%2F01%2F14%2Fyou-are-creating-bugs%2F", "style": "big", "title": "You Are Creating Bugs In Your Software" });</script></div>
<p><img title="bug killer" alt="bug killer" src="http://www.smugmug.com/photos/243520519-L.jpg" /></p>
<p>No matter how good your quality process is, you are introducing bugs.  This article reviews the places where bugs are introduced in the software development process (from stakeholders to users), and reviews ways to address those bugs.</p>
<p><span id="more-623"></span></p>
<p>One way to identify the sources of bugs is by listening to how people tell you about the bugs.</p>
<ol>
<li>&#8220;That is not what I want&#8221;</li>
<li>&#8220;That is not what I said&#8221;</li>
<li>&#8220;That is not what I meant&#8221;</li>
<li>&#8220;That is not how it is supposed to work&#8221;</li>
<li>&#8220;That is not what they meant&#8221;</li>
<li>&#8220;That is not what I want it to do&#8221;</li>
</ol>
<p>Visually, you can think of the development process (regardless of methodology) like the following flow</p>
<p><img alt="where bugs enter the process" title="where bugs enter the process" src="http://sehlhorst.smugmug.com/photos/45965627-L.png" /></p>
<p>Each of the six sources of bugs is labeled in the above flow.  The article, <cite><a title="Where bugs come from" href="http://tynerblain.com/blog/2006/01/22/where-bugs-come-from/">Where Bugs Come From</a></cite>, goes into a detailed explanation of each source of bugs.  This article looks at what you can do to improve the ability of your process to reduce these bugs.  I have been a stakeholder, a product manager, a business analyst, a developer and a tester.  And I&#8217;ve been guilty of all of these offenses at one time or another.  When I say <em>you</em>, I also mean <em>me</em>.  So chill.</p>
<h2>&#8220;That is not what I want&#8221;</h2>
<p>Stakeholders introduce bugs into the process by being unable to define what they want.  Some agile methodology proponents argue that as a stakeholder, you <em>can&#8217;t</em> know what you want until you have something you<em> don&#8217;t want</em> in front of you.  In other words, those agilists are giving up on trying to prevent these errors &#8211; they claim it is futile.</p>
<p>You can change your mind.  The team could be dealing with &#8220;That is not what I want <em>now</em>&#8221; &#8211; and change is something that can not be prevented &#8211; although the impact of change can be mitigated.  <a title="11 iterative development models" href="http://tynerblain.com/blog/2007/03/09/agile-software-development-methods/">Iterative development</a> and course-correction through getting immediate feedback is one way to do that.  <a title="iterative specification and prototypes" href="http://tynerblain.com/blog/2006/02/21/software-requirements-specification-iteration-and-prototyping/">Prototyping</a> is another method of course correction.  Prototypes can also be used to<a title="implicit requirements" href="http://tynerblain.com/blog/2006/11/17/gathering-implicit-requirements/"> elicit <em>implicit</em> requirements</a>.</p>
<p>But that still avoids trying to directly address the issue of <em>you </em>not effectively describing what you actually want.  There are ways to improve your team&#8217;s engagement with you, so that you actually say what you want.  First, an emphasis on <a title="writing valuable requirements" href="http://tynerblain.com/blog/2006/05/30/writing-valuable-requirements/"><em>valuable</em> requirements</a> drives critical thinking about <em>why</em> you need a particular capability or feature.  One approach to achieve valuable requirements is to <a title="The reason why" href="http://tynerblain.com/blog/2006/02/21/the-reason-why/">question their justification</a>.</p>
<p>The key to making this work is to make sure you <a title="getting approval for your requirements" href="http://tynerblain.com/blog/2007/01/09/requirements-approval/">are approving your requirements</a>.  And watch out for the <a title="approval anti-patterns" href="http://tynerblain.com/blog/2007/01/09/requirements-approval/"><em>anti-patterns</em></a> in the article.</p>
<h2>&#8220;That is not what I said&#8221;</h2>
<p>Business analysts, product managers, and requirements analysts introduce bugs into the process through misunderstanding the stakeholders.  Using the techniques above to stay on top of changes in stakeholder needs is not enough.  Even when you effectively engage your stakeholders so that they are <em>self-aware</em> and can articulate exactly <a title="another use for why" href="http://tynerblain.com/2006/10/24/another-use-for-why/">what they need and why</a>, you still have a problem.</p>
<p>You can improve <a title="Ten active listening skills" href="http://tynerblain.com/blog/2007/03/15/ten-active-listening-skills/">how you listen</a>, and you can improve how you document what you heard.  Make sure that you write <a title="complete requirements" href="http://tynerblain.com/blog/2006/06/08/writing-complete-requirements/">complete</a>, <a title="consistent requirements" href="http://tynerblain.com/blog/2006/06/09/big-ten-rules-writing-consistent-requirements/">consistent</a> and <a title="unambiguous requirements" href="http://tynerblain.com/blog/2006/06/12/writing-unambiguous-requirements/">unambiguous </a>requirements.  While you&#8217;re at it &#8211; make sure you are <a title="correct requirements" href="http://tynerblain.com/blog/2006/10/30/writing-correct-requirements/">writing your requirements correctly</a>.</p>
<h2>&#8220;That is not what I meant&#8221;</h2>
<p>Developers can misinterpret requirements.  While there are situations where a requirement is adequately expressed, but the developer is not capable of understanding, that is not the norm.  Developers are smart.  The onus is on the person writing requirements to make sure that they are <a title="writing for the purpose of reading" href="http://tynerblain.com/blog/2006/10/04/writing-for-the-purpose-of-reading/">written for the audience</a>.  So, even though the source of these bugs appears to be the developers, it is actually your documentation.  If your documents need to <a title="Active listening and cultural cues" href="http://tynerblain.com/blog/2005/12/11/when-%E2%80%98no%E2%80%99-means-%E2%80%98yes%E2%80%99/">span cultural chasms</a>, then that&#8217;s your reality.</p>
<p>Make sure you write your requirements <a title="ambiguous requirements" href="http://tynerblain.com/blog/2006/06/12/writing-unambiguous-requirements/">unambiguously</a>, so that they are not misinterpreted.  Make sure that they are feasible<a title="attainable requirements" href="http://tynerblain.com/blog/2006/06/07/writing-attainable-requirements/"> requirements</a>, and that they do not <a title="don't specify design in your requirements" href="http://tynerblain.com/blog/2006/06/02/writing-design-free-requirements/">specify design</a>.  The <a title="concise requirements" href="http://tynerblain.com/blog/2006/05/31/writing-concise-requirements/">requirements also need to be concise</a> without being overly terse.</p>
<h2>&#8220;That is not how it is supposed to work&#8221;"</h2>
<p>Developers should test what they create.  Given an understanding of what you believe the code is supposed to do, you should test that it actually does it.  This is the stereotypical bug &#8211; we asked for X, and it doesn&#8217;t work.  <a title="continuous integration" href="http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/">Continuous integration</a> is the most effective technique for addressing bugs that are introduced at this point in the process.</p>
<p>In more complex situations, you can apply <a title="test smarter not harder part 1" href="http://tynerblain.com/blog/2007/12/25/test-smarter-not-harder-1/">more</a> <a title="test smarter not harder part 2" href="http://tynerblain.com/blog/2007/12/27/test-smarter-not-harder-2/">advanced</a> <a title="test smarter not harder part 3" href="http://tynerblain.com/blog/2008/01/02/test-smarter-not-harder-3/">techniques</a> to assure that your testing is complete.</p>
<h2>&#8220;That is not what they meant&#8221;</h2>
<p>The testing team can also misinterpret requirements.  This is a source of <em>false positive</em> bugs &#8211; even when the developers properly interpret the requirements, a bug may be lodged against their code when there is no bug.  That&#8217;s why we have the ability to mark issues as &#8220;not a bug&#8221; when closing them.  Apply the same rules for well-written requirements and you will also address this issue.  Further, make sure that your requirements can be <a title="testable requirements" href="http://tynerblain.com/blog/2005/11/30/how-to-deal-with-untestable-requirements-rewrite-them/">measurable</a>, or <a title="verifiable requirements" href="http://tynerblain.com/blog/2006/06/13/writing-verifiable-requirements/">verifiable</a>.  We recently wrote more about <a title="testing your requirements" href="http://tynerblain.com/blog/2008/01/09/testing-your-requirements/">why you should make requirements testable</a>.</p>
<h2>&#8220;That is not what I want it to do&#8221;</h2>
<p>User education is the key here.  Users should be encouraged to provide feedback about your product.  You don&#8217;t want to discourage feedback, you want to minimize the number of false positives.  False positives come from users misinterpreting how the application is behaving &#8211; a sign of poor design.  False positives also come from users not understanding what the application can (or should) do.</p>
<p>You can address design issues by focusing on <a title="designing for users" href="http://tynerblain.com/blog/2005/12/01/user-centric-design-yields-not-so-obvious-features/">design with the user in mind</a>.  And you can educate the users through a combination of training and with a novel approach to documentation.  Document the product in terms of <a title="goal driven documentation" href="http://tynerblain.com/blog/2006/10/09/goal-driven-documentation/">what users are trying to accomplish</a>, in the context of <a title="use case driven documentation" href="http://tynerblain.com/blog/2006/10/10/use-case-driven-documentation/">how they are trying to do it</a>.</p>
<ol />
<h2>Conclusion</h2>
<p>There are a lot of people involved in the software development lifecycle.  As people, we introduce bugs.  As informed software professionals, we also know how to address many of them.</p>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+You+Are+Creating+Bugs+In+Your+Software+http://bit.ly/Cu2L2+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2008/01/14/you-are-creating-bugs/&amp;t=You+Are+Creating+Bugs+In+Your+Software" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2008/01/14/you-are-creating-bugs/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Why You Should Test Your Requirements</title>
		<link>http://tynerblain.com/blog/2008/01/09/testing-your-requirements/</link>
		<comments>http://tynerblain.com/blog/2008/01/09/testing-your-requirements/#comments</comments>
		<pubDate>Thu, 10 Jan 2008 03:46:53 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Business Analysis]]></category>
		<category><![CDATA[Product Management]]></category>
		<category><![CDATA[Requirements]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[requirement test]]></category>
		<category><![CDATA[requirements testing]]></category>
		<category><![CDATA[requirements tests]]></category>
		<category><![CDATA[software quality]]></category>
		<category><![CDATA[testing of requirements]]></category>
		<category><![CDATA[testing requirements]]></category>
		<category><![CDATA[testing your requirements]]></category>
		<category><![CDATA[tests of requirements]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2008/01/09/testing-your-requirements/</guid>
		<description><![CDATA[
topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2008%2F01%2F09%2Ftesting-your-requirements%2F", "style": "big", "title": "Why You Should Test Your Requirements" });

We&#8217;ve written before about several characteristics of well written requirements, and one of those characteristics is testability.  Ahamad has written an list of 10 tests of requirements, with an emphasis on assessing the testability of the requirements. The testability of the requirement [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2008%252F01%252F09%252Ftesting-your-requirements%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Why%20You%20Should%20Test%20Your%20Requirements%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2008%2F01%2F09%2Ftesting-your-requirements%2F", "style": "big", "title": "Why You Should Test Your Requirements" });</script></div>
<p><img title="checklist" alt="checklist" src="http://www.smugmug.com/photos/241652946-L.jpg" /></p>
<p>We&#8217;ve written before about several <a title="writing good requirements" href="http://tynerblain.com/blog/2006/05/25/writing-good-requirements-the-big-ten-rules/">characteristics of well written requirements</a>, and one of those characteristics is <em>testability</em>.  Ahamad has written an <a title="tests of requirements" href="http://testingsoftware.blogspot.com/2007/09/requirements-testing.html">list</a> of 10 tests <em>of</em> requirements, with an emphasis on assessing the testability of the requirements. The testability of the requirement determines if the resultant product can be tested to determine if it meets the requirement.<br />
<span id="more-621"></span></p>
<h2>Measurable Requirements</h2>
<p>Before you can write a test <em>of</em> the software, <em>based on</em> the requirements, you have to <a title="writing testable requirements" href="http://tynerblain.com/blog/2005/11/30/how-to-deal-with-untestable-requirements-rewrite-them/">make the requirement testable</a>.  Why?</p>
<blockquote><p>Writing requirements without acceptance criteria introduces risk into our project. The last thing we want is to enter into a nitpicking discussion about what we have and have not delivered. We would much rather spend that time discussing what we can deliver next.</p>
<p><cite><a title="writing verifiable requirements" href="http://tynerblain.com/blog/2006/06/13/writing-verifiable-requirements/">Writing Verifiable Requirements</a></cite></p></blockquote>
<p>Ahamad points out another benefit of (and tactic for) engaging with stakeholders to define acceptance criteria.</p>
<blockquote><p>To find the quality measure we ask: &#8220;under what circumstances would the system fail to meet this requirement?&#8221; The stakeholders review the context of the system and decide that they would consider it a failure if&#8230;An attempt to define the quality measure for a requirement helps to rationalise fuzzy requirements.</p>
<p><cite><a title="requirements testing" href="http://testingsoftware.blogspot.com/2007/09/requirements-testing.html">Requirements Testing, Ahamad</a></cite></p></blockquote>
<p>By defining the test, you force the critical thinking required to define good requirements &#8211; requirements that are both verifiable.  You also explore the justification of the requirement, creating an opportunity to apply the critical thinking needed to map the requirement to the goals that it supports.</p>
<h2>Requirements Tests</h2>
<p>Ahamad starts his list of requirements tests as a method of inspecting the requirements to assure that they are verifiable.  His list goes on to address some other issues commonly faced with writing requirements well.  It is a good approach to thinking about requirements &#8211; and it is a good idea to think about how you would inspect requirements.</p>
<p>While we don&#8217;t think his list represents a comprehensive checklist for assessing the quality of the requirements, it is a great way to think about how you would inspect a requirements document.  It will inspire a future article about how to inspect a requirements document.</p>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+Why+You+Should+Test+Your+Requirements+http://bit.ly/XHgou+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2008/01/09/testing-your-requirements/&amp;t=Why+You+Should+Test+Your+Requirements" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2008/01/09/testing-your-requirements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test Smarter, Not Harder &#8211; Part 3</title>
		<link>http://tynerblain.com/blog/2008/01/02/test-smarter-not-harder-3/</link>
		<comments>http://tynerblain.com/blog/2008/01/02/test-smarter-not-harder-3/#comments</comments>
		<pubDate>Thu, 03 Jan 2008 04:00:06 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[combinatorics]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[nwise testing]]></category>
		<category><![CDATA[pair wise testing]]></category>
		<category><![CDATA[pairwise testing]]></category>
		<category><![CDATA[test coverage]]></category>
		<category><![CDATA[test smarter]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2008/01/02/test-smarter-not-harder-3/</guid>
		<description><![CDATA[
topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2008%2F01%2F02%2Ftest-smarter-not-harder-3%2F", "style": "big", "title": "Test Smarter, Not Harder - Part 3" });

This series is a reprint of an article by Scott Sehlhorst, written for developer.* in March 2006.  A recent article on dailytech about &#8220;new&#8221; methods for software testing points to some very interesting research by the NIST (the National Institute of [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2008%252F01%252F02%252Ftest-smarter-not-harder-3%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Test%20Smarter%2C%20Not%20Harder%20-%20Part%203%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2008%2F01%2F02%2Ftest-smarter-not-harder-3%2F", "style": "big", "title": "Test Smarter, Not Harder - Part 3" });</script></div>
<p><img alt="interconnected controls" title="interconnected controls" src="http://sehlhorst.smugmug.com/photos/235044808-L.jpg" /></p>
<p>This series is a reprint of an article by Scott Sehlhorst, written for developer.* in March 2006.  A recent article on <a title="dailytech article" href="http://www.dailytech.com/New+Method+Tests+for+Software+Bugs+Quickly+Cheaply/article10078.htm">dailytech</a> about &#8220;new&#8221; methods for software testing points to some <a title="nist page" href="http://csrc.nist.gov/groups/SNS/acts/index.html">very interesting research</a> by the NIST (the National Institute of Standards and Technology) Information Technology Lab. We&#8217;ve split the original article into three articles to be more consistent in length with other Tyner Blain articles.</p>
<p>This is part 3 of a 3 part series.</p>
<p><span id="more-617"></span></p>
<h2>Article Overview</h2>
<ul>
<li>Part 1 of this article explores <a title="test smarter not harder part 1" href="http://tynerblain.com/blog/2007/12/25/test-smarter-not-harder-1/">the problem of getting good testing coverage</a> of complex software.</li>
<li>Part 2 of this article discusses <a title="test smarter not harder part 2" href="http://tynerblain.com/blog/2007/12/27/test-smarter-not-harder-2/">solution approaches</a> (including those identified in the NIST research).</li>
<li>Part 3 of this article explores an approach to improving on the &#8220;best&#8221; solution identified in part 2.</li>
</ul>
<h2>How to make it even better</h2>
<p>When we don&#8217;t know anything, or don&#8217;t apply any knowledge about our application to our testing strategy, we end up with far too many tests. By applying knowledge of the application to our test design we can greatly reduce the size of our test suite. Tests that incorporate knowledge of the application being tested are known as whitebox tests.</p>
<h2>Map out the control dependencies</h2>
<p>In our previous examples, we applied no knowledge of the interactions of controls (or the interactions within the program of having made selections in the controls. If we consider a visual map of the controls and their possible relationships, it would look like the following diagram.</p>
<p><img title="diagram unknown" alt="diagram unknown" src="http://sehlhorst.smugmug.com/photos/235040094-L.jpg" /></p>
<p>There is a possibly-relevant connection between the selections in every pair of controls. We have designed our testing around the lack of knowledge that is clearly visible in the diagram.</p>
<p>It is likely that we can rule out some of the dependencies, but possibly not all of them. Our approach should be conservative &#8211; only remove those dependencies that we know don&#8217;t exist. This knowledge comes from an understanding of the underlying application. Once we remove these links the diagram will look like this:</p>
<p><img title="diagram understood" alt="diagram understood" src="http://sehlhorst.smugmug.com/photos/235040158-L.jpg" /></p>
<p>This clarified mapping allows us to reduce the size of our test suite dramatically, because we&#8217;ve identified the independence of many controls. In an ideal case, the result will be two or more completely disconnected graphs, and we can build a set of tests for our suite around each separate graph. As the diagram above shows, we do not have two completely independent graphs. We can take a testing approach as shown in the following diagram:</p>
<p><img title="subdivided diagram" alt="subdivided diagram" src="http://sehlhorst.smugmug.com/photos/235040161-L.jpg" /></p>
<p>We&#8217;ve grouped all of the controls on the left in a blue box &#8211; these controls will be used with the N-wise generation tool to create a set of tests. The grouping of controls on the right will also be used to generate a set of tests.</p>
<p>In this example, we reduce the number of tests required by a significant  amount when order matters.</p>
<p><img title="seven" alt="seven" src="http://sehlhorst.smugmug.com/photos/235040105-L.jpg" /></p>
<p>Also note that we increase the number of tests required when order doesn’t matter, if we have any overlapping controls (if the graphs can&#8217;t be separated). When the graphs can be separated, this reduces the amount of testing even if order is irrelevant.</p>
<p>The key to separating the graphs is to make sure that all controls only connect to other controls within their region (including the overlapping region).</p>
<h2>Eliminate equivalent values from the inputs</h2>
<p>When we know how the code is implemented, or have insights into the requirements, we can further reduce the scope of testing by eliminating equivalent values.</p>
<p>Consider the following example requirements for an application:</p>
<p><img title="reqs" alt="reqs" src="http://sehlhorst.smugmug.com/photos/235040118-L.jpg" /></p>
<p>And two variables that we are evaluating in our testing &#8211; imagine that they are controls in a user interface (or values imported from an external system).</p>
<p><img title="all values" alt="all values" src="http://sehlhorst.smugmug.com/photos/235040130-L.jpg" /></p>
<p>Which we can collapse for testing purposes into:</p>
<p><img title="collapsed values" alt="collapsed values" src="http://sehlhorst.smugmug.com/photos/235040137-L.jpg" /></p>
<p>This consolidation of <em>equivalent</em> values reduces the number of tests we need to run. For our simple pairwise test, we reduce the number from 18 to 12. When there are more controls involved, and when we are doing N-wise testing with N=3, the impact is much more significant.</p>
<h2>Conclusion</h2>
<p>We can test very complex software without doing exhaustive testing.</p>
<p>Random sampling is a common technique, but falls short of high quality goals &#8211; very good quality requires very high quantities of tests.</p>
<p>Pairwise testing allows us to test very complex software with a small number of tests, and reasonable (on the order of 90%) code coverage. This also falls short of high-quality goals, but is very effective for lower expectations.</p>
<p>N-wise testing with N=3 provides high quality capable test suites, but at the expense of larger suites. When the order of inputs into the software matters, N-wise approaches become limited in the number of variables they can support (fewer than 10), due to limitations of test-generation tools available today.</p>
<p>We can apply knowledge of the underlying software and requirements to improve our testing strategy. None of the previous techniques require knowledge of the application, and thus rely on brute force to assure coverage. This approach results in <em>conceptually</em> redundant tests in the suite. By mapping out the grid of interdependency between inputs and subdividing the testing into multiple areas we reduce the number of tests in our suite. By removing redundant or equivalent values from the test suite we also reduce the number of tests required to achieve high quality.</p>
<h2>Article Overview</h2>
<ul>
<li>Part 1 of this article explores <a title="test smarter not harder part 1" href="http://tynerblain.com/blog/2007/12/25/test-smarter-not-harder-1/">the problem of getting good testing coverage</a> of complex software.</li>
<li>Part 2 of this article discusses <a title="test smarter not harder part 2" href="http://tynerblain.com/blog/2007/12/27/test-smarter-not-harder-2/">solution approaches</a> (including those identified in the NIST research).</li>
<li>Part 3 of this article explores an approach to improving on the &#8220;best&#8221; solution identified in part 2.</li>
</ul>
<p>One of the interesting points, not addressed by this article, and not</p>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+Test+Smarter%2C+Not+Harder+%E2%80%93+Part+3+http://bit.ly/XIzVr+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2008/01/02/test-smarter-not-harder-3/&amp;t=Test+Smarter%2C+Not+Harder+%E2%80%93+Part+3" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2008/01/02/test-smarter-not-harder-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test Smarter, Not Harder &#8211; Part 2</title>
		<link>http://tynerblain.com/blog/2007/12/27/test-smarter-not-harder-2/</link>
		<comments>http://tynerblain.com/blog/2007/12/27/test-smarter-not-harder-2/#comments</comments>
		<pubDate>Fri, 28 Dec 2007 04:00:03 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[combinatorics]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[n-wise]]></category>
		<category><![CDATA[nwise testing]]></category>
		<category><![CDATA[pair wise]]></category>
		<category><![CDATA[pairwise testing]]></category>
		<category><![CDATA[sampling]]></category>
		<category><![CDATA[statistical testing]]></category>
		<category><![CDATA[test coverage]]></category>
		<category><![CDATA[test smarter]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2007/12/27/test-smarter-not-harder-2/</guid>
		<description><![CDATA[
topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2007%2F12%2F27%2Ftest-smarter-not-harder-2%2F", "style": "big", "title": "Test Smarter, Not Harder - Part 2" });

This series is a reprint of an article by Scott Sehlhorst, written for developer.* in March 2006.  A recent article on dailytech about &#8220;new&#8221; methods for software testing points to some very interesting research by the NIST (the National Institute of [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2007%252F12%252F27%252Ftest-smarter-not-harder-2%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Test%20Smarter%2C%20Not%20Harder%20-%20Part%202%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2007%2F12%2F27%2Ftest-smarter-not-harder-2%2F", "style": "big", "title": "Test Smarter, Not Harder - Part 2" });</script></div>
<p><img alt="interconnected controls" title="interconnected controls" src="http://sehlhorst.smugmug.com/photos/235044808-L.jpg" /></p>
<p>This series is a reprint of an article by Scott Sehlhorst, written for developer.* in March 2006.  A recent article on <a title="dailytech article" href="http://www.dailytech.com/New+Method+Tests+for+Software+Bugs+Quickly+Cheaply/article10078.htm">dailytech</a> about &#8220;new&#8221; methods for software testing points to some <a title="nist page" href="http://csrc.nist.gov/groups/SNS/acts/index.html">very interesting research</a> by the NIST (the National Institute of Standards and Technology) Information Technology Lab. We&#8217;ve split the original article into three articles to be more consistent in length with other Tyner Blain articles.</p>
<p>This is part 2 of a 3 part series.<br />
<span id="more-616"></span></p>
<h2>Article Overview</h2>
<ul>
<li>Part 1 of this article explores <a title="test smarter not harder part 1" href="http://tynerblain.com/blog/2007/12/25/test-smarter-not-harder-1/">the problem of getting good testing coverage</a> of complex software.</li>
<li>Part 2 of this article discusses solution approaches (including those identified in the NIST research).</li>
<li>Part 3 of this article explores <a title="improving test automation" href="http://tynerblain.com/blog/2008/01/02/test-smarter-not-harder-3/">an approach to improving on the &#8220;best&#8221; solution</a> identified in part 2.</li>
</ul>
<h2>Solving the problem</h2>
<p>There are a lot of applications that have millions or billons of combinations of inputs. They have automated testing. They have solutions to this problem. We just finished discussing how impractical it is to test exhaustively, so how do companies test their complex software?</p>
<h2>Random sampling</h2>
<p>Early on in the software testing world, someone realized that by randomly checking different combinations of inputs, they would eventually find the bugs. Imagine software that has one million possible combinations of inputs (half as complex as our previous example). Each random sample would give us 0.000001% coverage of all possible user sessions. If we run 1000 tests, we would still only have 0.001% coverage of the application.</p>
<p>Thankfully, statistics can help us make statements about our quality levels. But we can’t use “coverage” as our key measurement of quality. We have to think about things a little bit differently. What we want to do is express a level of confidence about a level of quality. We need to determine the sample size, or number of tests, that we need to run to make a statistical statement about the quality of the application.</p>
<p>First we define a quality goal: we want to assure that our software is 99% bug free. That means that up to 1% of the user sessions would exhibit a bug. To be 100% confident that this statement is true, we would need to test at least 99% of the possible user sessions, or over 990,000 tests.</p>
<p>By adding a level of confidence to our analysis, we can use sampling (selecting a subset of the whole, and extrapolating those results as being characteristic of the whole) to describe the quality of our software. We will leverage the mathematical work that has been developed to determine how to run polls.</p>
<p>We define our goal to be that we have 99% confidence that the software is 99%  bug free. The 99% <em>level of </em>confidence means that if we ran our sample repeatedly, 99% of the time, the results would be within the margin of error. Since our goal is 99% bug free code, we will test for 100% passing of tests, with a 1% margin of error.</p>
<p>How many samples do we need, if there are one million combinations, to identify the level of quality with a 99% confidence, and a 1% margin of error? The math for this is readily available, and calculators for determining sample size are online and free. Using this polling approach, we find that the number of samples we require to determine the quality level with a 1% error and 99% confidence is 16,369.</p>
<p>If we test 16,369 user sessions and find 100% success, we have established a 99% confidence that our quality is at least at a 99% level. We only have 99% quality, because we have found 100% quality in our tests, with a 1% margin of error.</p>
<p>This approach scales for very large numbers of combinations. Consider the following table, where our goal is to establish 99% confidence in a 99% quality level. Each row in the following table represents an increasingly complex software application. Complexity is defined as the number of unique combinations of possible inputs).</p>
<p><img alt="confidence stats" title="confidence stats" src="http://sehlhorst.smugmug.com/photos/235040147-L.jpg" /></p>
<p>We can see that the very few additional tests have to be run to achieve the same level of quality for increasingly complex software. When we have a modest quality goal, such as 99/99 (99% confidence in 99% quality), this approach is very effective.</p>
<p>Where this approach doesn&#8217;t scale well is with increasing levels of quality. Consider the quest for &#8220;five nines&#8221; (99.999% bug free code). With each increase in the desired level of quality, the number of tests we have to run grows. It quickly becomes an almost exhaustive test suite.</p>
<p>Each row in the following table represents an increasingly stringent quality requirement, with the complexity of the software staying constant at one million possible input combinations.</p>
<p><img alt="confidence stats 2" title="confidence stats 2" src="http://sehlhorst.smugmug.com/photos/235040152-L.jpg" /></p>
<p>The random sampling approach does not provide a benefit over exhaustive  testing when our quality goals are high.</p>
<h2>Pairwise testing of input variables</h2>
<p>Studies have shown that bugs in software tend to be the results of the  combination of variables, not individual variables.</p>
<p>Consider a very simple laptop configuration page, having three selectable controls: CPU, Memory, and Storage. Each control has three possible values as shown in the table below.</p>
<p><img alt="pairwise1" title="pairwise1" src="http://sehlhorst.smugmug.com/photos/235040230-L.jpg" /></p>
<p>We successfully pass tests of each of the different values available in the CPU control. However, we discover that the software test fails if the user selects a CPU value of &#8220;Consumer&#8221; <em>and</em> selects a Storage value of &#8220;Huge.&#8221;  This highlights an unknown dependency between the CPI and Storage controls.</p>
<p>Pair-wise testing is designed to get coverage of every possible combination of two variables, without testing every possible combination of all the variables. For this example, there are 27 unique combinations of all of the selections. The following table shows the first 9 combinations. An additional 9 combinations are needed for each of the other CPU selections.</p>
<p><img alt="pairwise 2" title="pairwise 2" src="http://sehlhorst.smugmug.com/photos/235040240-L.jpg" /></p>
<p>Exhaustive pair-wise testing will make sure that every unique combination of any two variables will be covered. The next table shows the combinations for this example.</p>
<p><img alt="pairwise 3" title="pairwise 3" src="http://sehlhorst.smugmug.com/photos/235040062-L.jpg" /></p>
<p>With just 9 tests, we are able to exhaustively cover every unique pair of CPU and Memory, CPU and Storage, and Memory and Storage. Pair-wise testing allows us to get full coverage of the combinations of every two variables, with a minimal number of tests.</p>
<p>Pair-wise testing not only gives us full coverage of every pair of values, it also gives us (redundant) coverage of every single value for each control.</p>
<p>If we look back at our previous examples of laptop-configuration, we can calculate the numbers of tests required to get full pair-wise coverage. For the entry level laptop configurator, there are 32,256 possible unique combinations of inputs. We can test every unique combination of two variables with 31 tests. For the high-end laptop configurator, there are 2,322,432 unique combinations of inputs. We can test every unique combination of two variables with 36 tests.</p>
<h2>N-wise testing</h2>
<p>The concept of pair-wise testing can be extended to N-wise testing &#8211; looking  at every combination of N possible inputs.</p>
<p>The following table shows how many tests are required to get full coverage of each N-wise combination of inputs for both the low-end and high-end laptops configurators.</p>
<p><img alt="nwise 1" title="nwise 1" src="http://sehlhorst.smugmug.com/photos/235040174-L.jpg" /></p>
<p>This is a much more manageable situation. Using N=3, we get 179 tests versus 2.3 million tests for exhaustive coverage! Existing studies have consistently shown that N=3 creates on the order of 90% code coverage with test suites, although the number will vary from application to application. We will use N=3, based on practical experience that N=4 tests rarely uncover bugs that were missed with N=3.</p>
<p>This approach only works when users are forced to enter values in a proscribed sequence, and in cases where the sequence of entry is irrelevant. This set of tests won&#8217;t give us representative coverage of what the users will do when they are allowed to make selections in arbitrary but relevant order.</p>
<h2>Order relevance and statistical testing</h2>
<p>There&#8217;s been an assumption implicit in all of our calculations so far – that the order of selection in the controls is irrelevant. The available N-wise test calculation tools do not incorporate order of selection in their permutations &#8211; explicitly, they assume a fixed order of operations. When we test an API we have control over the order of processing – there are a fixed number of arguments, in a fixed order. N-wise testing People, however, do not always interact with the controls in a fixed order. And web service architectures may not be able to depend upon a predetermined sequence of events.</p>
<p>With 5 controls in an interface, we have 5! (factorial &#8211; <a href="http://mathworld.wolfram.com/Factorial.html">see definition</a>) or 120 possible sequences in which selections can be made by a person. Although the user interface may incorporate dynamic filtering that prevents some subsets of out-of-sequence selection, N-wise testing is blackbox testing, and will not have access to that information.</p>
<p>For an interface with M possible controls, each script created by an N-wise test generator will have to be tested in M! sequences to get exhaustive coverage. If the controls are split across multiple screens, then we can reduce the number of sequences. For example, if there are 5 controls on the first screen, and five controls on the next screen, instead of considering 10! (3.6 million sequences), we can consider all first-screen-sequences in combination with all second-screen sequences (5! * 5! = 120 * 120 = 14,400 script sequences).</p>
<p>In our example laptop configurators, there are 11 and 13 controls (all on the same page) for the low-end and high-end laptops respectively. This would imply 11! and 13! possible sequences (40 million and 6 billion).</p>
<p>We do not need to do exhaustive coverage of the sequencing permutations. An N-wise test is specifically analyzing the interdependence of any combination of N controls. As a lower-bound, we would only need N! sequences for each generated script. So our 179-script suite for the high-end laptop (with N=3) would need 3! (6) * 179 = 1,074 scripts to cover the product.</p>
<p>Here&#8217;s the table for the lower-bound of scripts required to account for  different values of N for both laptop-configurators.</p>
<p><img alt="order dependence data" title="order dependence data" src="http://sehlhorst.smugmug.com/photos/235040178-L.jpg" /></p>
<p>This is a lower bound, because it assumes a perfect efficiency in combining unique sequences of each group of N controls. Existing N-wise testing tools do not (to the author&#8217;s knowledge) take order of operations into account. For N=2, this is trivial &#8211; just duplicate the set of tests, in the exact reverse order.</p>
<p>We can take order of operations into account by treating the sequence as an additional input. We use the mathematical formula &#8220;X choose Y&#8221; which tells us the number of different combinations of Y values from a set of X values. The formula for calculating &#8220;X choose Y&#8221; is X!/(Y!*(X-Y)!) where X is the number of inputs and Y is the dimension of the desired N-wise test.</p>
<p>Here&#8217;s the table of the number of combinations for each N, for both the low-end and high-end laptop configuration screens we&#8217;ve been discussing.</p>
<p><img alt="x choose y 1" title="x choose y 1" src="http://sehlhorst.smugmug.com/photos/235040190-L.jpg" /></p>
<p>Here are the values, generally, for varying numbers of inputs.</p>
<p><a title="larger 1" href="http://sehlhorst.smugmug.com/photos/235040211-O.jpg"><img alt="exploded results" title="exploded results" src="http://sehlhorst.smugmug.com/photos/235040196-L.jpg" /></a> (<a title="larger 2" href="http://sehlhorst.smugmug.com/photos/235040211-O.jpg">click for larger version</a>)</p>
<p>We would then calculate the N-wise testing using a value of N+1 as an input to the test-generation tool, and include the number of unique sequences as if it were a control input.</p>
<p>Unfortunately, we don&#8217;t have a solver capable of handling single dimensions larger than 52. This limits our ability to create a test suite for N=3 to a maximum of 7 controls.</p>
<p>To show the impact of sequencing on the test suite, consider an interface with 7 controls, each having 5 possible values. N=3 would require 236 tests if order is irrelevant. We then include sequence of selection as a parameter (by adding an 8<sup>th</sup> control with 35 possible values, and testing for N=4), In this case, N=3 (with sequencing) requires 8,442 scripts. Our theoretical lower bound would be 236 * 35 = 8260.</p>
<h2>Article Overview</h2>
<ul>
<li>Part 1 of this article explores <a title="test smarter not harder part 1" href="http://tynerblain.com/blog/2007/12/25/test-smarter-not-harder-1/">the problem of getting good testing coverage</a> of complex software.</li>
<li>Part 2 of this article discusses solution approaches (including those identified in the NIST research).</li>
<li>Part 3 of this article explores an approach to improving on the &#8220;best&#8221; solution identified in part 2.</li>
</ul>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+Test+Smarter%2C+Not+Harder+%E2%80%93+Part+2+http://bit.ly/CgMZp+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2007/12/27/test-smarter-not-harder-2/&amp;t=Test+Smarter%2C+Not+Harder+%E2%80%93+Part+2" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2007/12/27/test-smarter-not-harder-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test Smarter, Not Harder &#8211; Part 1</title>
		<link>http://tynerblain.com/blog/2007/12/25/test-smarter-not-harder-1/</link>
		<comments>http://tynerblain.com/blog/2007/12/25/test-smarter-not-harder-1/#comments</comments>
		<pubDate>Wed, 26 Dec 2007 04:00:05 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[test smarter]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2007/12/25/test-smarter-not-harder-1/</guid>
		<description><![CDATA[
topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2007%2F12%2F25%2Ftest-smarter-not-harder-1%2F", "style": "big", "title": "Test Smarter, Not Harder - Part 1" });

This series is a reprint of an article by Scott Sehlhorst, written for developer.* in March 2006.  A recent article on dailytech about &#8220;new&#8221; methods for software testing points to some very interesting research by the NIST (the National Institute of [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2007%252F12%252F25%252Ftest-smarter-not-harder-1%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Test%20Smarter%2C%20Not%20Harder%20-%20Part%201%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2007%2F12%2F25%2Ftest-smarter-not-harder-1%2F", "style": "big", "title": "Test Smarter, Not Harder - Part 1" });</script></div>
<p><img title="interconnected controls" alt="interconnected controls" src="http://sehlhorst.smugmug.com/photos/235044808-L.jpg" /></p>
<p>This series is a reprint of an article by Scott Sehlhorst, written for developer.* in March 2006.  A recent article on <a title="dailytech article" href="http://www.dailytech.com/New+Method+Tests+for+Software+Bugs+Quickly+Cheaply/article10078.htm">dailytech</a> about &#8220;new&#8221; methods for software testing points to some <a title="nist page" href="http://csrc.nist.gov/groups/SNS/acts/index.html">very interesting research</a> by the NIST (the National Institute of Standards and Technology) Information Technology Lab.  We&#8217;ve split the original article into three articles to be more consistent in length with other Tyner Blain articles.</p>
<p>This is part 1 of a 3 part series.</p>
<p><span id="more-615"></span></p>
<h2>Article Overview</h2>
<ul>
<li>Part 1 of this article explores the problem of getting good testing coverage of complex software.</li>
<li><a title="test automation approaches" href="http://tynerblain.com/blog/2007/12/27/test-smarter-not-harder-2/">Part 2 of this article discusses solution approaches (including those identified in the NIST research)</a>.</li>
<li><a title="test automation improvements" href="http://tynerblain.com/blog/2008/01/02/test-smarter-not-harder-3/">Part 3 of this article explores an approach to improving on the &#8220;best&#8221; solution identified in part 2</a>.</li>
</ul>
<h2>Introduction</h2>
<p>In this article we focus on a method to minimize the cost of quality. Regardless of the method you use for calculating the cost of poor quality, minimizing the cost of assuring good quality is relevant to you. We will discuss techniques for minimizing the cost of creating and maintaining an automated regression testing suite for a software application.</p>
<p>Automated testing changed the software development process as much as the assembly line changed the manufacturing industry. We are assuming in this article that we already have automated testing as a part of our development process.</p>
<p>We open with a discussion of the problem. We will then discuss approaches to automated testing that are progressively better at minimizing costs. We hope you enjoy the article and would love to hear back from you with feedback and contributions.</p>
<h2>The problems</h2>
<p>Here is the sound bite version of the problems this article is designed to  address</p>
<ul>
<li>We aren&#8217;t meeting our quality goals.</li>
<li>We have a development team, regularly releasing new versions of our  software.</li>
<li>We have a suite of automated tests we run on our software.</li>
<li>Our automated test suite may be large, but out product is complex. There&#8217;s no way to test every possible scenario. Bugs are still getting released to the field.</li>
</ul>
<h2>Not solving the problems</h2>
<p>Two solutions that we have to consider are to test nothing, and to test everything. We would consider testing nothing if we can&#8217;t afford to test the software. When people don&#8217;t appreciate the complexities of testing or the limitations of automated testing, they are inclined to want to test everything. Testing everything is much easier to said than done.</p>
<h2>We can&#8217;t afford to test it</h2>
<p>I was able to attend a training session with Kent Beck a few years ago. I was also honored to be able to enjoy a large steak and some cold beer with him that night after the training. When asked how he responds to people who complain about the cost of quality, Kent told us he has a very simple answer, &#8220;If testing costs more than not testing then don&#8217;t do it.&#8221; I agree.</p>
<p>There are few situations where the cost of quality exceeded the cost of poor quality. These are situations where the needed infrastructure, test-development time, and maintenance costs outweighed the expected cost of having a bug. The expected cost is the likelihood (as a percentage) of the bug manifesting in the field, multiplied by the cost of dealing with the bug.</p>
<p>The techniques described in this article are designed to reduce the cost of quality, to make it even less likely that not testing is the best answer.</p>
<h2>Just test everything – it&#8217;s automated</h2>
<p>We&#8217;ve all been on at least one project or team where our manager has said</p>
<p>&#8220;I demand full testing coverage of the software. Our policy is zero  tolerance. We won&#8217;t have bad quality on my watch.&#8221;</p>
<p>What we struggle with here is the lack of appreciation for what it means to  have full coverage or any other <em>guarantee</em> of a particular defect  rate.</p>
<p>There are no absolutes in a sufficiently complex system – but that’s ok. There are statistics, confidence levels, and risk-management plans. As engineers and software developers, our brains are wired to deal with the <em>expected,  likely, </em>and <em>probable</em> futures. We have to help our less-technical  brethren understand these concepts &#8211; or at least put them in perspective.</p>
<p>We may get asked &#8220;Why can&#8217;t we just test every combination of inputs to make sure we get the right outputs? We have an automated test suite &#8211; just fill it up and run it!&#8221; And we need to resist the urge to respond by saying &#8220;Monkeys with typewriters will have completed the works of Shakespeare before we finish a single run of our test suite!&#8221;</p>
<h2>Complexity leads to futility</h2>
<p>Consider a web page for customizing a laptop purchase. Take a look at Dell&#8217;s  <em>customize it</em> page for an entry level laptop, if you&#8217;ve never configured a  laptop online before.</p>
<p>The web page presents eleven questions to the user that have from two to seven responses each. Specifically, each decision the user has to make presents (2,2,2,2,2,3,2,2,3,4,7) choices. This is a simple <em>configuration</em> problem. The number of possible laptop configurations that could be requested by the user is the product of all of the choices. In this very simple page, there are 32,256 possibilities. The page for customizing Dell&#8217;s high end laptop at the time of this writing has a not-dissimilar set of controls with more choices in each control &#8211; (3,3,3,2,4,2,4,2,2,3,7,4,4). The user of this page can request any of 2,322,432 different laptop configurations! If Dell were to add one more control presenting five different choices, there would be over ten million possible combinations!</p>
<p>Creating a test suite that tries all two million combinations for their high end laptop could be automated, but even if every test took one tenth of second to run, the suite would take over 64 hours to run! And Dell changes their product offering in less time than that.</p>
<p>If we use a server farm to distribute the test suite across ten machines we could run it in about 6 hours. Ignoring the fact that we would be running this type of test for each customization page Dell has, 6 hours is not unreasonable.</p>
<p>Validating the two million results is where the really big problem is waiting for us. We can&#8217;t rely on people to manually validate all of the outputs &#8211; it is just too expensive. We could write another program, which inspects those outputs and evaluates them using a rules-based system (&#8220;If the user selects 1GB of RAM, then the configuration must include 1GB of RAM&#8221; and &#8220;The price for the final system must be adjusted by the price-impact of 1GB of RAM relative to the base system price for this model.&#8221;)</p>
<p>There are some good rules-based validation tools out there, but they are either custom software, or so general as to require a large investment to make them applicable to a particular customer. With a rules-based inspection system, we have the cost of maintaining the rules.</p>
<p>The validation rules are going to have to be updated regularly, as Dell changes the way they position, configure, and price their laptops regularly.</p>
<p>Since we aren&#8217;t Dell, we don&#8217;t have the scale (tens of billions of dollars of revenue) to justify this level of investment. The bottom line for us is that we can&#8217;t afford to exhaustively test every combination.</p>
<h2>Article Overview</h2>
<ul>
<li>Part 1 of this article explores the problem of getting good testing coverage of complex software.</li>
<li>Part 2 of this article discusses solution approaches (including those identified in the NIST research).</li>
<li>Part 3 of this article explores an approach to improving on the &#8220;best&#8221; solution identified in part 2.</li>
</ul>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+Test+Smarter%2C+Not+Harder+%E2%80%93+Part+1+http://bit.ly/PVyCK+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2007/12/25/test-smarter-not-harder-1/&amp;t=Test+Smarter%2C+Not+Harder+%E2%80%93+Part+1" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2007/12/25/test-smarter-not-harder-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>APR: Prototype Update</title>
		<link>http://tynerblain.com/blog/2007/05/02/apr-prototype-update-2/</link>
		<comments>http://tynerblain.com/blog/2007/05/02/apr-prototype-update-2/#comments</comments>
		<pubDate>Thu, 03 May 2007 01:53:24 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Agile Project: Ratings]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[agile case study]]></category>
		<category><![CDATA[agile project]]></category>
		<category><![CDATA[agile requirements management]]></category>
		<category><![CDATA[agile software development]]></category>
		<category><![CDATA[managing data]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2007/05/02/apr-prototype-update-2/</guid>
		<description><![CDATA[
topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2007%2F05%2F02%2Fapr-prototype-update-2%2F", "style": "big", "title": "APR: Prototype Update" });

Just a quick update on the prototype for our agile project.  We&#8217;ve dramatically improved test coverage, implemented authentication-restriction for some functionality, and refactored a litte of the code.  Read on for the latest stats on coverage and testing.

Code and Test Metrics
While code-coverage metrics might [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2007%252F05%252F02%252Fapr-prototype-update-2%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22APR%3A%20Prototype%20Update%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2007%2F05%2F02%2Fapr-prototype-update-2%2F", "style": "big", "title": "APR: Prototype Update" });</script></div>
<p><img alt="under the hood" title="under the hood" src="http://sehlhorst.smugmug.com/photos/148366828-M.jpg" /></p>
<p>Just a quick update on the prototype for our <a title="Agile Project Experiment" href="http://tynerblain.com/blog/2007/04/17/agile-software-development-experiment/">agile project</a>.  We&#8217;ve dramatically improved test coverage, implemented authentication-restriction for some functionality, and refactored a litte of the code.  Read on for the latest stats on coverage and testing.</p>
<p><span id="more-485"></span></p>
<h2>Code and Test Metrics</h2>
<p>While code-coverage metrics might be more useful, we don&#8217;t know how to calculate them yet.  Here&#8217;s the same data we used in our <a title="Agile Project Prototype Update" href="http://tynerblain.com/blog/2007/05/01/apr-prototype-update-1/">previous update</a>.</p>
<blockquote><p><code>+----------------------+-------+-------+---------+---------+-----+-------+<br />
| Name                 | Lines |   LOC | Classes | Methods | M/C | LOC/M |<br />
+----------------------+-------+-------+---------+---------+-----+-------+<br />
| Controllers          |   140 |    86 |       3 |      16 |   5 |     3 |<br />
| Helpers              |     7 |     6 |       0 |       0 |   0 |     0 |<br />
| Models               |    77 |    56 |       2 |       9 |   4 |     4 |<br />
| Libraries            |   233 |   145 |       3 |      30 |  10 |     2 |<br />
| Components           |     0 |     0 |       0 |       0 |   0 |     0 |<br />
| Model specs          |   169 |   134 |       0 |       0 |   0 |     0 |<br />
| View specs           |    86 |    62 |       0 |       0 |   0 |     0 |<br />
| Controller specs     |    74 |    54 |       0 |       0 |   0 |     0 |<br />
| Helper specs         |    86 |    62 |       0 |       0 |   0 |     0 |<br />
+----------------------+-------+-------+---------+---------+-----+-------+<br />
| Total                |   872 |   605 |       8 |      55 |   6 |     9 |<br />
+----------------------+-------+-------+---------+---------+-----+-------+<br />
Code LOC: 293     Test LOC: 312     Code to Test Ratio: 1:1.1</code></p></blockquote>
<p>Two interesting things to note:</p>
<ul>
<li>Our test-to-code ratio is now greater than 1.  It should be even higher.</li>
<li>We now have independent testing of the model, controllers, and views.  What this means is that we can isolate specific behaviors and test them independently of other parts of the code.</li>
</ul>
<h2>More RSpec Tests</h2>
<p>Here is the list of tests that we have written and that have been implemented.</p>
<blockquote><p><code><br />
<strong>Testing the controllers</strong><br />
When anonymous users interact with articles<br />
- listing the articles should be successful<br />
- showing an article should be successful<br />
- editing an article should redirect to login<br />
- creating a new article should redirect to login</code></p>
<p>When authenticated users interact with articles<br />
- listing the articles should be successful<br />
- showing an article should be successful<br />
- editing an article should be successful<br />
- creating an article should be successful</p>
<p><strong>Testing the User Model</strong></p>
<p>A user with articles<br />
- must be able to find all her articles TBD<br />
Multiple users<br />
- must not have the same login ID<br />
- must not have the same email address</p>
<p>A user, in general,<br />
- must have a login ID<br />
- must have an email address<br />
- must have an email address with a valid format<br />
- must have a password<br />
- must have a long password</p>
<p><strong>Testing the Article Model</strong><br />
An article<br />
- must have a title<br />
- must have a URL<br />
- must not duplicate an existing article TBD<br />
- must be associated with the user that created it TBD</p>
<p><strong>Testing the Rendering (presentation) of Articles</strong></p>
<p>/article/list<br />
- should include the list of articles<br />
- should include the individual article titles</p></blockquote>
<h2>Refactoring</h2>
<p>One of the mantras of Rails developers is &#8220;DRY&#8221; &#8211; Don&#8217;t Repeat Yourself.  And it applies to not writing the same code over and over again.  With testing of the rendering (the user interface) of articles in place, I was able to refactor the implementation code to get improved re-use.  The process went as follows:</p>
<ol>
<li>Write code the first time.</li>
<li>Write tests, confirm their accuracy.</li>
<li>Rewrite the rendering code with re-use in mind (because we will list articles in many different ways &#8211; most recent, highest rated, etc).</li>
<li>Notice that the tests are failing.</li>
<li>Fix the new code until the tests pass.</li>
</ol>
<p>Step 6 was a quick visual inspection / sanity-check that the UI was behaving as the tests assured &#8211; and it was.</p>
<h2>Summary</h2>
<p>At this stage, the prototype can</p>
<ul>
<li>Create/Edit users</li>
<li>Create, Edit, Update, “Delete” articles</li>
<li>Enforce the need to login to create an article</li>
</ul>
<p>The next things to work on (where work = code + test) are</p>
<ul>
<li>Associate the article with the user who created it</li>
<li>Create/Edit ratings (of articles, by users)</li>
<li>Associate the rating with the user who created it</li>
<li>Associate the rating with the article to which it applies</li>
<li>Calculate the article “score” based on ratings</li>
<li>Add a couple presentations (latest articles, highest scoring articles)</li>
<li>Add a little styling/layout effort</li>
<li>Deploy the prototype.</li>
</ul>
<p>Still planning on getting a prototype version deployed before our second anniversary as a company (Cinco de Mayo).  Most of today was spent learning how to test the different elements of the code with RSpec.  Tomorrow will have more implementation accomplishments.<br />
Anything missing?</p>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+APR%3A+Prototype+Update+http://bit.ly/3VlIAI+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2007/05/02/apr-prototype-update-2/&amp;t=APR%3A+Prototype+Update" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2007/05/02/apr-prototype-update-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>APR: Infrastructure Setup</title>
		<link>http://tynerblain.com/blog/2007/04/30/apr-infrastructure/</link>
		<comments>http://tynerblain.com/blog/2007/04/30/apr-infrastructure/#comments</comments>
		<pubDate>Tue, 01 May 2007 02:38:27 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Agile Project: Ratings]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[agile case study]]></category>
		<category><![CDATA[agile project]]></category>
		<category><![CDATA[agile requirements management]]></category>
		<category><![CDATA[agile software development]]></category>
		<category><![CDATA[managing data]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2007/04/30/apr-infrastructure/</guid>
		<description><![CDATA[
topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2007%2F04%2F30%2Fapr-infrastructure%2F", "style": "big", "title": "APR: Infrastructure Setup" });

This morning I finished up the infrastructure setup for our project.  A bunch of under the hood work.  Definitely required some propeller-head skills.  The goal of this work is to get us to a working prototype as soon as possible.  There are [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2007%252F04%252F30%252Fapr-infrastructure%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22APR%3A%20Infrastructure%20Setup%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2007%2F04%2F30%2Fapr-infrastructure%2F", "style": "big", "title": "APR: Infrastructure Setup" });</script></div>
<p><img alt="under the hood" title="under the hood" src="http://sehlhorst.smugmug.com/photos/148366828-M.jpg" /></p>
<p>This morning I finished up the infrastructure setup for our project.  A bunch of <em>under the hood</em> work.  Definitely required some propeller-head skills.  The goal of this work is to get us to a working prototype as soon as possible.  There are a couple links to some good agile testing articles, and the rest of this one is a quick list of what we did on Friday and today.</p>
<p><span id="more-483"></span></p>
<h2>Pre-Project Setup Stuff</h2>
<p>Most of what we have to do to kick off this project really doesn&#8217;t fall under the project time line (like setting up source control), because it is a one-time setup.  But we still had to do it, so it is still here.  And it could easily apply to your dev team if you aren&#8217;t using subversion, or rails, etc.</p>
<p>Here&#8217;s what we have working now:</p>
<ul>
<li>Subversion (svn) source code repository set up on our server</li>
<li>RSA-encrypted bash shell access for simpler scc operations</li>
<li>svn and TortoiseSVN set up for local development, project started, some simple code checked in.  Dev-process operational</li>
<li>Aptana/RadRails IDE set up and working (not integrated to svn, but workable)</li>
<li>Apache, MySQL, Mongrel, Ruby, Rails, RSpec set up for local dev</li>
</ul>
<p>Most of it is standard developer stuff, but RSpec is pretty interesting as an approach for supporting <a title="Test Driven Development Insights" href="http://tynerblain.com/blog/2006/09/12/insight-into-tdd/">test driven development</a>.  RSpec proponents describe it as <em>behavior</em> driven development (BDD), but coming at this from a product management perspective, it is a form of <a title="Writing Testable Requirements" href="http://tynerblain.com/blog/2006/06/13/writing-verifiable-requirements/">requirements </a>verification that differs semantically from stereotypical developer <a title="Intro to Unit Testing" href="http://tynerblain.com/blog/2006/01/19/foundation-series-unit-testing-software/">unit testing</a>.  Will share some examples later, when there&#8217;s something working.  For now rest assured that test development is concurrent with (or preceding) code development, as part of our <a title="Continuous Integration Intro" href="http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/">continuous integration</a> <a title="Key Continuous Integration Practices" href="http://tynerblain.com/blog/2006/05/09/ten-essential-practices-of-continuous-integration/">approach</a> &#8211; another key component of <a title="Agile Project" href="http://tynerblain.com/blog/2007/04/17/agile-software-development-experiment/">our agile project</a>.</p>
<p>To set expectations, I expect to have at least one working version of the first release prototyped and available this week for feedback from a select group of alpha-users.  The only barriers are learning ruby and rails and rspec, learning capistrano (rails deployment tech), resolving any unanticipated issues with the server setup.  Writing the code and tests is the easy part.</p>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+APR%3A+Infrastructure+Setup+http://bit.ly/1TV6VF+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2007/04/30/apr-infrastructure/&amp;t=APR%3A+Infrastructure+Setup" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2007/04/30/apr-infrastructure/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Is Agile Bad For Software Development?</title>
		<link>http://tynerblain.com/blog/2007/04/16/is-agile-bad-for-software/</link>
		<comments>http://tynerblain.com/blog/2007/04/16/is-agile-bad-for-software/#comments</comments>
		<pubDate>Tue, 17 Apr 2007 03:00:26 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Product Management]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[agile development]]></category>
		<category><![CDATA[agile process]]></category>
		<category><![CDATA[agile software development]]></category>
		<category><![CDATA[big up front requirements]]></category>
		<category><![CDATA[bufr]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[waterfall]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2007/04/16/is-agile-bad-for-software/</guid>
		<description><![CDATA[Last week, Ivan Chalif, a product manager / blogger, tapped into a thread criticising product managers for not adopting and espousing agile, or at least rapid-release techniques. In this article we look at Ivan's comments and one of the articles that he referenced. We also share our own perspective and an alternative analysis of what may have happened.]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2007%252F04%252F16%252Fis-agile-bad-for-software%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Is%20Agile%20Bad%20For%20Software%20Development%3F%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2007%2F04%2F16%2Fis-agile-bad-for-software%2F", "style": "big", "title": "Is Agile Bad For Software Development?" });</script></div>
<p><img title="broken software" alt="broken software" src="http://sehlhorst.smugmug.com/photos/144418619-M.jpg" /></p>
<p>Last week, Ivan Chalif, a product manager / blogger, tapped into a thread criticising product managers for not adopting and espousing agile, or at least rapid-release techniques.  In this article we look at Ivan&#8217;s comments and one of the articles that he referenced.  We also share our own perspective and an alternative analysis of what may have happened.</p>
<p><span id="more-462"></span></p>
<h2>Short Release Cycles are Bad</h2>
<p>At the end of <a title="agile is fine, but not for me" href="http://www.theproductologist.com/index.php/2007/04/10/fast-release-cycles/">his article</a>, Ivan references <a title="problems with agile" href="http://blogs.techrepublic.com.com/programming-and-development/?p=51">a well presented position</a> on why short release cycles are bad that was published by Justin James on TechRepublic last June.</p>
<p>Ivan&#8217;s article basically says that agile approaches are fine for non-mission critical software.  Justin&#8217;s article includes criticism of software he has used, and implies that the problems are due to the development methodologies used.</p>
<p>In a nutshell, they are both saying that short release cycles are bad because they result in bad software being released.  Ivan qualifies his perspective by saying that for some applications, like &#8220;consumer web applications&#8221; that&#8217;s ok &#8211; because being bad doesn&#8217;t hurt as much.</p>
<p>Our perspective is a little bit different &#8211; short release cycles are the best thing ever.  Immature or incomplete releases are bad.  We define incomplete as meaning &#8220;not all of the <em>must be</em> requirements have been satisfied.&#8221;  We define immature as meaning &#8220;quality, usability, and performance are not where they need to be for the audience.&#8221;</p>
<p><strong>Ignorance is No Excuse</strong></p>
<p>On the point of requirements, we&#8217;ll add that failure to implement an undiscovered / undocumented must-be requirement still qualifies as incompleteness. A product manager&#8217;s failure to document a critical requirement <em>may</em> absolve the implementation team from addressing and testing it &#8211; but the &#8220;entire team&#8221; is still on the hook for it.</p>
<p>In short, we don&#8217;t think agile approaches need to be forced to live in the &#8220;software that isn&#8217;t important to users&#8221; box. Agile techniques and approaches can be used on any project. Any project can succeed or fail, and any process can succeed or fail on a particular project. What is more important is the team. And unfortunately, the environment &#8211; people trump process, but politics trumps people. If your organization can not or will not support an iterative development cycle, your project will fail if you use an agile process.</p>
<p>Mission critical and non-mission critical software have <em>mandatory</em> requirements that must be satisfied.  <em>Must-be</em> requirements, by definition, <em>must</em> be satisfied. A build of the software that does not satisfy those requirements is one that is incomplete, and should not be released for production use.</p>
<p>Note that we specified &#8220;production use.&#8221;</p>
<h2>Anti-Agile Argument</h2>
<p>We&#8217;ll take a point-counterpoint approach to one of the arguments raised by Justin. Our position is that his criticism, while anecdotally valid, should not be a criticism of the process, but of its poor execution.</p>
<blockquote><p>Here is an example of what I mean: today, I made hotel reservations with a Hyatt hotel on their Web site.[...]Except there is one huge flaw: it does not use HTTPS! So not only is my credit card number being sent in plain text (along with my first and last name), but it is going to be stored in my browser’s auto-fill system in plain text!</p>
<p><cite>Justin James</cite></p></blockquote>
<p>Is that a problem?  Absolutely.  Is secure transmission of user financial data a <em>must-be</em> requirement? Unquestionably. I explained to my mom that her credit card number is safer on the Amazon form than it is on the receipt at a restaurant. The whole ecommerce world is dependant on that assumption. The team that implemented the website Justin was using screwed up big time. But how did they screw up?</p>
<p>The team that built this Hyatt website screwed up in one of four ways:</p>
<ol>
<li>They did not identify the security requirement.</li>
<li>They did not write code to satisfy the security requirement.</li>
<li>The code they wrote did not satisfy the security requirement.</li>
<li>They wrote code that broke a previously working solution to the security requirement.</li>
</ol>
<p>This clearly can be blamed on the &#8220;entire team&#8221; but can not be clearly blamed on agile software development.</p>
<h2>Is Agile To Blame?</h2>
<p>Let&#8217;s look at each of the possible explanations from above in more detail&#8230;</p>
<p><strong>They did not identify the security requirement</strong></p>
<p>The first possibility &#8211; failure to identify the requirement, is a risk with every development process.  Identification of the critical requirements is a matter of product manager competence (or product champion, or whoever on the team is gathering the requirements).  More rigorous requirements gathering will identify more requirements.  You don&#8217;t neccessarily have to have a big up-front requirements (BUFR) exercise before writing the first line of code.  You do have to have &#8220;enough&#8221; requirements gathering.  A BUFR process does not assure <a title="Writing Incomplete Requirements" href="http://tynerblain.com/blog/2007/03/27/writing-incomplete-requirements/">a complete set of requirements</a> any more than an incremental process prevents it.</p>
<p>All teams will reach a point when they decide they have &#8220;enough&#8221; to risk developing against an incomplete spec.  A product manager has to develop a sufficient breadth of understanding to make an informed decision about when &#8220;enough&#8221; is enough.  That&#8217;s why we encourage <a title="Starting Agile Use Cases" href="http://tynerblain.com/blog/2007/03/28/how-to-start-use-cases/">defining the space with use case names</a> and <a title="Agile Development of Use Cases" href="http://tynerblain.com/blog/2007/04/02/agile-development-of-use-cases/">brief descriptions of use cases</a>.  Understanding the domain is the goal of this exercise, and it is not the same as defining all of the requirements up front.</p>
<p>This team failed to get an understanding of the domain, and overlooked something as obvious as the need for customers to have secure transmission of their credit card numbers.  That is a failing of the product manager, not an agile approach.  Note: we dismiss any process that says &#8220;don&#8217;t develop an understanding of the domain&#8221; as a bad one, agile or otherwise.</p>
<p><strong>They did not write code to satisfy the security requirement.</strong></p>
<p>Was the requirement mis-prioritized as being less than critically important?  If so, blame the product manager again.</p>
<p>What if the requirement was defined, identified as a <em>must-be</em> requirement, and still wasn&#8217;t implemented? Who&#8217;s fault is it then? Did the team have poor execution, or did they follow a process that says &#8220;define the requirements, but don&#8217;t address them if you don&#8217;t feel like it?&#8221;</p>
<p>I&#8217;m not aware of an agile process that says you should release the software to production without implementing a solution to a known critical requirement. Definitely can&#8217;t blame this on agile. You could potentially blame it on an executive or project manager who said &#8220;release on date X, I don&#8217;t care if it&#8217;s done!&#8221; In which case, Justin just had bad timing, because any agile process would put this at the top of the list for the next release. If not, it isn&#8217;t agile.</p>
<p><strong>The code they wrote did not satisfy the security requirement.</strong></p>
<p>OK, now we&#8217;re looking at a team that 1) identified the requirement, and 2) attempted to implement it in their release, but 3) failed to test it (or released with a known but uncommunicated bug). I say uncommunicated because Justin didn&#8217;t get the message, even if someone on the team tried to send it.</p>
<p>Lack of testing and failure to communicate are not characteristics of agile processes. Just because you&#8217;re delivering code rapidly, managing <a title="How to Use Timeboxes" href="http://tynerblain.com/blog/2006/04/12/how-to-use-timeboxes-for-scheduling-software-delivery/">the amount of work to be delivered in a timebox</a>, does not mean that quality is ignored. That is certainly a choice that any foolish team (or irresponsible team) can make. But it is not unique to agile development, or even characteristic of agile development.</p>
<p>The agile projects that we&#8217;ve seen tend to have better quality than <a title="Waterfall Process" href="http://tynerblain.com/blog/2006/01/03/foundation-series-software-process-waterfall-process-versus-incremental-process/">waterfall projects</a>. Not because they are agile, but because the developers who are following an agile process have tended to (this is anecdotal data) have a greater appreciation for the benefits of continuous integration and quality in general. They live by the test cases. If it isn&#8217;t tested, it hasn&#8217;t been completed. And if it fails the tests, it hasn&#8217;t been completed.</p>
<p>There is a greater possibility that a waterfall project will <em>allow</em> developers to write code for months on end without creating tests &#8211; with the expectation that it will get tested in the end. We&#8217;ve worked with a client who&#8217;s timeline for a release of a key set of features included 3 months for development and one week for testing. When we asked &#8220;Where&#8217;s the time allocated to fix the code when you discover that it is broken?&#8221; we got the strangest looks. As an aside, in the year after we helped that team implement <a title="Continuous Integration Explained" href="http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/">a continuous integration process</a>, they&#8217;ve reduced their outstanding bug list by almost 80% and the team lead expects it to be cut in half again in the next month. They&#8217;re making great progress just by adding one agile technique (<a title="Continuous Integration Tips" href="http://tynerblain.com/blog/2006/05/09/ten-essential-practices-of-continuous-integration/">continuous integration</a>). The team has to create, review, and pass tests before they check code into the trunk for the current release cycle.</p>
<p>Absolutely not a failing of agile software development &#8211; this would be a failing of the team to deliver quality product.</p>
<p><strong>They wrote code that broke a previously working solution to the security requirement.</strong></p>
<p>This is another variation of the previous situation. 1) They identified, scheduled, implemented and tested the functionality. 2) The later broke it, but didn&#8217;t retest it. If they discovered that they broke it, and didn&#8217;t fix it, that falls in the previous bucket. More likely, they didn&#8217;t discover that they broke it.</p>
<p>Regression testing is an important element of continuous integration, and from a cost perspective, the primary reason to automate testing as much as possible. Technically, as much as practical &#8211; if it is cheaper to test manually, test manually. As the code base builds, so does the test suite. And a simple addition to the check-in policy is all that is needed.</p>
<p>Without regression testing: If it doesn&#8217;t work, don&#8217;t check it in (and therefore don&#8217;t release it).<br />
With regression testing: Also, if it breaks something else, don&#8217;t check it in without fixing the other thing (and therefore don&#8217;t release it).</p>
<p>The team we worked with before was working on a mammoth code base with over 100 developer-years and hundreds of thousands of lines of code. They had such a huge backlog of outstanding bugs because 1) there were another 5 to 10 developer-years of new functionality being added to the code every year, and 2) they had no practical way to discover or prevent regression bugs. The developers rarely checked in code that didn&#8217;t work, but regularly introduced errors or unearthed latent errors in the existing code. And effort spent fixing those errors (after they were discovered) introduced more errors. It was a vicious and never-ending cycle.  [Ed: <a title="Case Study on Test Automation" href="http://tynerblain.com/blog/2006/01/22/software-testing-series-a-case-study/">Here's the case study we published on integrating testing automation.</a>]</p>
<p>When they adopted the continuous integration philosophy, they included regression testing as part of their required process for release &#8211; no existing tests could be broken. And they&#8217;ve been able to start dedicating time to addressing old bugs &#8211; some of them years old with confidence. They&#8217;ve also been able to refactor the existing code so that it reduced the cost of ongoing work, allowing them to accelerate the improvement of their quality levels. It is a great story.</p>
<p>Failure to regression test is not a characteristic of an agile process.</p>
<h2>Conclusion</h2>
<p>There&#8217;s no disputing Justin&#8217;s bad experience.  We believe that a poorly delivered product is a result of poor team execution, not poor process decisions.</p>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+Is+Agile+Bad+For+Software+Development...+http://bit.ly/6mquu+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2007/04/16/is-agile-bad-for-software/&amp;t=Is+Agile+Bad+For+Software+Development..." title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2007/04/16/is-agile-bad-for-software/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>The Difference Between Use Cases and Test Cases</title>
		<link>http://tynerblain.com/blog/2007/04/12/use-case-vs-test-case/</link>
		<comments>http://tynerblain.com/blog/2007/04/12/use-case-vs-test-case/#comments</comments>
		<pubDate>Fri, 13 Apr 2007 03:00:05 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Business Analysis]]></category>
		<category><![CDATA[Requirements]]></category>
		<category><![CDATA[Requirements Models]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Use Cases]]></category>
		<category><![CDATA[blackbox test]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[system test]]></category>
		<category><![CDATA[test case]]></category>
		<category><![CDATA[use case scenario]]></category>
		<category><![CDATA[what is the difference between a use case and a test ca]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2007/04/12/use-case-vs-test-case/</guid>
		<description><![CDATA[People who are new to software, requirements, or testing often ask "What's the difference between a use case and a test case?"  This article answers that question, by building on earlier articles about use cases and use case scenarios.  At the soundbite level, each use case has one or more scenarios, and each use case scenario would lead to the creation of one or more test cases.]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2007%252F04%252F12%252Fuse-case-vs-test-case%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22The%20Difference%20Between%20Use%20Cases%20and%20Test%20Cases%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2007%2F04%2F12%2Fuse-case-vs-test-case%2F", "style": "big", "title": "The Difference Between Use Cases and Test Cases" });</script></div>
<p><img title="praying mantis" alt="praying mantis" src="http://sehlhorst.smugmug.com/photos/140019109-M.jpg" /></p>
<p>People who are new to software, requirements, or testing often ask &#8220;<em>What&#8217;s the difference between a use case and a test case?</em>&#8221;  This article answers that question, by building on earlier articles about <a title="Example Use Case" href="http://tynerblain.com/blog/2007/04/09/sample-use-case-example/">use cases</a> and <a title="Use Case Scenarios" href="http://tynerblain.com/blog/2007/04/10/what-are-use-case-scenarios/">use case scenarios</a>.  At the soundbite level, each use case has one or more scenarios, and each use case scenario would lead to the creation of one or more test cases.</p>
<p><span id="more-452"></span></p>
<p><strong>Definition of a Use Case</strong></p>
<p><img title="flow chart of a use case" alt="flow chart of a use case" src="http://sehlhorst.smugmug.com/photos/142803347-M.jpg" /></p>
<p>Use cases tell the story of how someone interacts with a software system to achieve a goal.  A good use case will describe the interactions that lead to <em>either </em>achieving <em>or </em>abandoning the goal.  The use case will describe multiple paths that the user can follow within the use case.</p>
<p><strong>Definition of a Use Case Scenario</strong></p>
<p><img title="diagram of a use case" alt="diagram of a use case" src="http://sehlhorst.smugmug.com/photos/142803787-M.png" /> <img title="diagram of a use case scenario" alt="diagram of a use case scenario" src="http://sehlhorst.smugmug.com/photos/142803767-M.png" /></p>
<p>A use case is made up of one or more <a title="What Are Use Case Scenarios" href="http://tynerblain.com/blog/2007/04/10/what-are-use-case-scenarios/">use case scenarios</a>.  Each path that can be followed within the use case is a use case scenario.  Any given example of following a use case also follows a single scenario.  Multiple executions of the use case can use the same or different scenarios.</p>
<p><strong>Definition of a Test Case</strong></p>
<p>There are many different kinds of testing, and they can be described in different ways.  They can be done by different people to achieve different objectives.  They can be manual or automated.  Testing is a very large field, and this article is not trying to define all of the ways that people can test software.</p>
<p>When someone asks the question &#8220;<em>What&#8217;s the difference between a use case and a test case?</em>&#8221; they are generally referring to system tests, &#8220;end to end&#8221; tests, or <a title="Blackbox and Whitebox testing" href="http://tynerblain.com/blog/2006/01/12/foundation-series-black-box-and-white-box-software-testing/">blackbox tests</a>.  They are probably not thinking about unit tests or integration tests.</p>
<p>Check out this explanation of <a title="Functional Testing explained" href="http://tynerblain.com/blog/2006/05/17/foundation-series-functional-testing-of-software/">the difference between unit tests and system tests</a>.  Or this article for an <a title="Continuous Integration Introduction" href="http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/">introduction to <em>Continuous Integration</em></a> &#8211; an approach to test automation and software development, or this article on <a title="Ten Essential Continuous Integration Practices" href="http://tynerblain.com/blog/2006/05/09/ten-essential-practices-of-continuous-integration/">the essential practices of continuous integration</a>.<br />
<strong>System Test Cases</strong></p>
<p>Many system tests are designed to simulate how a user interacts with the system, to make sure that the system responds appropriately.  If you&#8217;ve defined your requirements by using <a title="Why Create Goal Driven Use Cases?" href="http://tynerblain.com/blog/2006/06/28/the-use-case-for-creating-goal-driven-use-cases/">goal driven use cases</a>, you can use the use cases as a framework for defining these test cases.</p>
<p>These system tests should be created to test a single situation.  When using the approach of use cases and use case scenarios to describe requirements, a system test should test a single use case scenario.</p>
<p>In <a title="A use case example" href="http://tynerblain.com/blog/2007/04/09/sample-use-case-example/">an example use case</a> we recently wrote, one alternate flow &#8220;3A1&#8243; involves the user entering shipping and billing information that is unique to the order they are placing.  You would define at least one use case scenario that involves these steps.  Assume that the scenario you have defined follows alternate flow &#8220;3A1&#8243; but otherwise follows the normal flow.</p>
<p><img title="use case scenario selected" alt="use case scenario selected" src="http://sehlhorst.smugmug.com/photos/142803767-M.png" /></p>
<p>You could create two system tests that are designed to validate that the requirements of the use case are met.  The first system test would involve a user that has an account but elects to use different information for <em>this</em> order.  This is a realistic scenario &#8211; perhaps someone is ordering a gift to be delivered to their cousin who lives at a different address.</p>
<p>You could also define a system test that involves a user without a pre-existing account.</p>
<p>Both test cases follow the use case, and both test cases follow the use case scenario.  But the test cases test different things (from a business / requirements perspective).  They may be testing exactly the same code, but from a system test perspective, you neither know nor care because a system test is <a title="More details on blackbox testing" href="http://tynerblain.com/blog/2006/01/13/software-testing-series-black-box-vs-white-box-testing/">a blackbox test</a>.</p>
<p><strong>Summary</strong></p>
<p>A use case represents the interactions (or observed behaviors) associated with achieving or abandoning a goal.  A use case scenario represents one of the possible paths through a use case.  A test case represents one set of inputs that exercises a single use case scenario.</p>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+The+Difference+Between+Use+Cases+and+Test+Cases+http://bit.ly/AyjE7+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2007/04/12/use-case-vs-test-case/&amp;t=The+Difference+Between+Use+Cases+and+Test+Cases" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2007/04/12/use-case-vs-test-case/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crossing The Desert With Bad Project Planning</title>
		<link>http://tynerblain.com/blog/2007/01/04/crossing-the-desert/</link>
		<comments>http://tynerblain.com/blog/2007/01/04/crossing-the-desert/#comments</comments>
		<pubDate>Fri, 05 Jan 2007 04:00:23 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Communication]]></category>
		<category><![CDATA[Process Improvement]]></category>
		<category><![CDATA[Project Management]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[CMMI]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[effort allocation]]></category>
		<category><![CDATA[estimation]]></category>
		<category><![CDATA[incremental delivery]]></category>
		<category><![CDATA[iterative development]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[pm]]></category>
		<category><![CDATA[scheduling]]></category>
		<category><![CDATA[scope creep]]></category>
		<category><![CDATA[testable requirements]]></category>
		<category><![CDATA[timeboxing]]></category>
		<category><![CDATA[use cases]]></category>
		<category><![CDATA[verifiable requirements]]></category>
		<category><![CDATA[writing requirements]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2007/01/04/crossing-the-desert/</guid>
		<description><![CDATA[Johanna Rothman recently wrote an article with a poignant introduction: "A project team focuses on an interim milestone, works like the devil to meet that milestone. They meet the milestone, look up, and realize they're not at the end of the project--they still have to finish the darn thing. They're living the Crossing the Desert syndrome."  Fixing it isn't enough - how do we prevent it from happening?]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2007%252F01%252F04%252Fcrossing-the-desert%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Crossing%20The%20Desert%20With%20Bad%20Project%20Planning%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2007%2F01%2F04%2Fcrossing-the-desert%2F", "style": "big", "title": "Crossing The Desert With Bad Project Planning" });</script></div>
<p><img src="http://sehlhorst.smugmug.com/photos/120885944-M.jpg" /></p>
<p>Johanna Rothman recently wrote an <a title="crossing the desert syndrome" href="http://www.jrothman.com/weblog/2007/01/crossing-desert-syndrome.html">article</a> with a poignant introduction: &#8220;A project team focuses on an interim milestone, works like the devil to meet that milestone. They meet the milestone, look up, and realize they&#8217;re not at the end of the project&#8211;they still have to finish the darn thing. They&#8217;re living the Crossing the Desert syndrome.&#8221;  Fixing it isn&#8217;t enough &#8211; how do we prevent it from happening?</p>
<p><strong>Unrealistic Scheduling</strong></p>
<p>Johanna points out that when a team has to put in overtime (what we might call <em>heroic efforts</em>) to achieve an interim milestone in a project, the remaining project schedule is suspect.  Johanna reccommends revisiting the remaining schedule, and we agree.</p>
<p><strong>Recovery</strong></p>
<p><img src="http://sehlhorst.smugmug.com/photos/120886637-M.jpg" /></p>
<p>Johanna also highlights the way to recover &#8211; give the people on the project a break.  Have them move back to 40 hour weeks if they were working overtime.  Force them to take the weekends off if they weren&#8217;t already.  In short, restore a rational schedule.  If people worked through vacations or holidays, require them to take the time off.</p>
<p>Its been said that it takes <a title="article on recovery times" href="http://www.alternet.org/story/16611/">two weeks of down time</a> to recover from work-burnout.  Extending the desert analogy that Johanna credits to Jack Nevison of Oak Associates, we&#8217;ve reached the oasis in the middle of the desert, and we need to stay there long enough to rest and rehydrate.</p>
<p><img src="http://sehlhorst.smugmug.com/photos/120886639-M.jpg" /></p>
<p>Unfortunately, we&#8217;re still in the middle of the desert, and the rush to reach the oasis presumably had merit.  If a project schedule is so intense that we have created the need for recovery in the middle of the project, the likelihood of having two weeks to recover is low.  Whatever drove us to push to reach the oasis is still driving us, so resting for too long will only make it worse.  And we&#8217;re still in the middle of the desert.  We need to focus on prevention.</p>
<p><strong>Prevention</strong></p>
<p><img title="irrigation to prevent desert" alt="irrigation to prevent desert" src="http://sehlhorst.smugmug.com/photos/120890165-M.jpg" /></p>
<p>We can&#8217;t always prevent the impetus to work long hours on a project.  We can manage our execution in a way that reduces the chances of feeling like we&#8217;re crossing a desert.</p>
<ul>
<li><strong>Improved estimation of tasks</strong>.  Entire books are written about this topic, we won&#8217;t try and summarize ways to do this in a single blog post.</li>
<li><strong>Realistic effort allocation</strong>.  When scheduling how many hours a day a developer can be &#8220;on task&#8221;, our experience has been that 5 to 6 hours is the maximum (when working full time or a little more).  For requirements work, this might even be a little bit aggressive.</li>
<li><strong>Writing <a title="Writing Verifiable Requirements" href="http://tynerblain.com/blog/2006/06/13/writing-verifiable-requirements/">verifiable</a> requirements</strong>.  We need requirements that specify (or at least allow us to identify) when we&#8217;re done.  <a title="Scope Creep and Relationships" href="http://tynerblain.com/blog/2006/03/13/managing-scope-creep-is-not-a-zero-sum-game/">Scope creep</a> isn&#8217;t always implementing more features, it can be <em>over-implementing</em> features.  With test-driven development (TDD) processes, the tests are written first (they fail), and the developer writes code until the tests pass.  Once the tests pass, the code is done.  Doing this requires us to <a title="Dealing with Untestable Requirements" href="http://tynerblain.com/blog/2005/11/30/how-to-deal-with-untestable-requirements-rewrite-them/">write testable requirements</a>.  Practically speaking, this may only be realistic when using a <a title="Foundation Series on Continuous Integration" href="http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/">continuous integration</a> approach to code development.</li>
<li><strong>Managing smaller work chunks</strong>.  <a title="original timeboxing article" href="http://tynerblain.com/blog/2006/04/12/how-to-use-timeboxes-for-scheduling-software-delivery/">Timeboxing</a> (<a title="extended timeboxing article at productmarketing.com" href="http://www.productmarketing.com/productmarketing/magazine/4/5/0610ss.asp">more details</a>) is very effective for controlling the size of iterations.  Iterations are important not only for the <a title="Benefits of incremental delivery" href="http://tynerblain.com/blog/2006/04/18/two-big-benefits-of-incremental-delivery/">feedback cycle</a>, but because they reduce the size of the &#8220;desert patches.&#8221;</li>
<li><strong>Feedback into the estimation cycle</strong>.  Timeboxes become even more effective when we <a title="Scrum technique applied to business analysis" href="http://tynerblain.com/blog/2006/09/29/burndown/">keep track of our estimation</a> accuracy, and refine those estimates on the fly to help in replanning future releases.  This is a key step in the maturation of a process or company from a <a title="Foundation Series on CMMI" href="http://tynerblain.com/blog/2006/03/10/foundation-series-cmmi-levels-explained/">CMMI perspective</a>.</li>
<li><strong>Better communication of release content</strong>.  Planning releases <a title="Communicating a Release Schedule with Use Cases" href="http://tynerblain.com/blog/2006/07/19/communicating-a-release-schedule-with-use-cases/">based on use cases</a> / <a title="Incremental Delivery and Use Case Versions" href="http://tynerblain.com/blog/2006/12/12/incremental-delivery-and-use-cases/">use case versions</a> is a great way to target communication for external (to the team) stakeholders.  It can also be really effective for helping people avoid the desert-crossing syndrome.  Essentially you&#8217;re providing a map (&#8220;The next watering hole is just over that sand dune&#8221;) that helps keep efforts in context.  One reason the desert image is so powerful is that we imagine being lost in a sea of sand &#8211; the hopelessness is a function of both the reality and the perception.  Better communication helps address perceptions, while other elements help with the reality.</li>
</ul>
<p><strong>Conclusion</strong></p>
<p>Overworking the team is bad.  Burning them out in the middle of the project is worse.  Prevention is the solution, through iterative development, better communication, and improved estimation/planning skills.</p>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+Crossing+The+Desert+With+Bad+Project+Planning+http://bit.ly/4bFpx+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2007/01/04/crossing-the-desert/&amp;t=Crossing+The+Desert+With+Bad+Project+Planning" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2007/01/04/crossing-the-desert/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rinse, Lather, Repeat &#8211; 10 Reasons to Repeat Tests</title>
		<link>http://tynerblain.com/blog/2006/10/02/ten-reasons-to-repeat-tests/</link>
		<comments>http://tynerblain.com/blog/2006/10/02/ten-reasons-to-repeat-tests/#comments</comments>
		<pubDate>Tue, 03 Oct 2006 04:38:32 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[repeating tests]]></category>
		<category><![CDATA[software quality]]></category>
		<category><![CDATA[Test Automation]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2006/10/02/ten-reasons-to-repeat-tests/</guid>
		<description><![CDATA[Why run a test more than once? If it passed the first time, we don't need to run it again - or do we? James Bach provides ten good reasons to run the same test more than once.]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2006%252F10%252F02%252Ften-reasons-to-repeat-tests%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Rinse%2C%20Lather%2C%20Repeat%20-%2010%20Reasons%20to%20Repeat%20Tests%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2006%2F10%2F02%2Ften-reasons-to-repeat-tests%2F", "style": "big", "title": "Rinse, Lather, Repeat - 10 Reasons to Repeat Tests" });</script></div>
<p><img alt="shampoo" title="shampoo" src="http://sehlhorst.smugmug.com/photos/99631307-M-0.jpg" /></p>
<p>Why run a test more than once?  If it passed the first time, we don&#8217;t need to run it again &#8211; or do we?  James Bach provides ten good reasons to run the same test more than once.</p>
<p><strong>Common Sense</strong></p>
<p>Common sense dictates that we don&#8217;t need to run the same test twice &#8211; once we&#8217;ve run a test, we know the results &#8211; and we therefore don&#8217;t need to run it again.</p>
<blockquote><p>The definition of insanity is doing the same thing over and over again and inspecting different results.</p>
<p><cite>Benjamin Franklin</cite></p></blockquote>
<p>James Bach writes <a title="Reasons to repeat a test" href="http://www.satisfice.com/repeatable.shtml">a great article</a> that points out that we can never do <em>exactly</em> the same thng every time, so running the same test again is not insane.  He presents the following ten reasons to run the same test more than once.  The commentary here is ours &#8211; check out his original post for more details, and other good writing on the topic.</p>
<ol>
<li><strong>Recharge </strong>- By changing the code that is being tested, we recharge a test making it valuable again.</li>
<li><strong>Intermittence </strong>- Some bugs repeat as a function of otherwise uncontrolled variables.</li>
<li><strong>Retry </strong>- Sometimes we don&#8217;t run a test correctly, or can&#8217;t be certain that we ran it correctly.</li>
<li><strong>Mutation </strong>- By creating a test that is a variation on an existing test, we are repeating that subset of the test that is unchanged, but in a different context, established by the mutated version of the test.</li>
<li><strong>Benchmark </strong>- Performance measurement is most easily understood by establishing a baseline performance with a set of tests &#8211; then repeating those tests as the code is modified (or the platform it runs on is modified).</li>
<li><strong>Inexpensive </strong>- As long as there is some value to a test, and the cost of running it is low &#8211; what does it hurt?</li>
<li><strong>Importance </strong>- &#8220;This will never happen again&#8221; &#8211; best prevented with a regression test.</li>
<li><strong>Enough</strong> &#8211; James uses virus scanning as an example &#8211; honestly, this one doesn&#8217;t click for us.  If you understand it, please add a comment.</li>
<li><strong>Mandated</strong> &#8211; The man always puttin&#8217; me down, makin&#8217; me run the same test over and over again.</li>
<li><strong>Indifference / Avoidance</strong> &#8211; What if your goal isn&#8217;t to find bugs, but to avoid them?  What better way than to run the same test over again?</li>
</ol>
<p><strong>Sightings in the Real World</strong><br />
<a title="Foundation Series on continuous integration" href="http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/">Continuous integration</a> is an approach to testing/development that explicitly calls for the repeated running of tests as part of software development.  In James&#8217; framework, continuous integrations uses <em>recharge, intermittence</em>, and <em>mutation</em> as the drivers for repeating tests.</p>
<p>Combining unit tests and functional tests is an effective way to approach <a title="Foundation Series on Functional Testing" href="http://tynerblain.com/blog/2006/05/17/foundation-series-functional-testing-of-software/">system testing</a>.  This takes advantage of <em>mutation</em> to provide effective coverage.</p>
<p>By contrast, <a title="Pairwise Testing" href="http://tynerblain.com/blog/2006/03/18/software-testing-series-pairwise-testing/">pairwise testing</a> is designed to achieve <em>enough</em> without repeating any tests.</p>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+Rinse%2C+Lather%2C+Repeat+%E2%80%93+10+Reasons+to+Repeat+Tests+http://bit.ly/4Cfaeh+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2006/10/02/ten-reasons-to-repeat-tests/&amp;t=Rinse%2C+Lather%2C+Repeat+%E2%80%93+10+Reasons+to+Repeat+Tests" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/10/02/ten-reasons-to-repeat-tests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Insight Into Test Driven Development</title>
		<link>http://tynerblain.com/blog/2006/09/12/insight-into-tdd/</link>
		<comments>http://tynerblain.com/blog/2006/09/12/insight-into-tdd/#comments</comments>
		<pubDate>Wed, 13 Sep 2006 04:55:20 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Process Improvement]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Software requirements specification]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[james kovacs]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[requirements specification]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[test driven development]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2006/09/12/insight-into-tdd/</guid>
		<description><![CDATA[James Kovacs shares a great insight on software testing and the software testing process.  His epiphany about test driven development makes it obvious to all of us why this technique is so powerful.]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2006%252F09%252F12%252Finsight-into-tdd%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Insight%20Into%20Test%20Driven%20Development%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2006%2F09%2F12%2Finsight-into-tdd%2F", "style": "big", "title": "Insight Into Test Driven Development" });</script></div>
<p><img title="lightbulb" alt="lightbulb" src="http://sehlhorst.smugmug.com/photos/52406790-M.jpg" /></p>
<p>James Kovacs shares a great insight on software testing and the software testing process.  His epiphany about test driven development makes it obvious to all of us why this technique is so powerful.</p>
<p><strong>TDD</strong></p>
<p>Test driven development is an approach to software development where you write the tests first, and the code second.  This sounds ludicrous at first, but it really does work.  Here&#8217;s James&#8217; epiphany on the subject (emphasis added).</p>
<blockquote><p>I didn&#8217;t understand why TDD practitioner were so zealous about writing the tests first. Why did it matter? I thought it was to ensure that some project manager doesn&#8217;t try to shave some time off the project by cutting the unit tests. Then I started doing some reading about TDD, poking around, asking questions, and trying it out myself. <strong>I discovered the real reason for writing tests first is that TDD isn&#8217;t about testing code, it&#8217;s about designing code.</strong></p>
<p><cite><a title="TDD Article" href="http://www.jameskovacs.com/blog/ATaleOfTwoEpiphaniesTDDAndMocking.aspx">A Tale of Two Epiphanies: TDD and Mocking, James Kovacs</a></cite></p></blockquote>
<p>These tests are <a title="Foundation series on unit testing" href="http://tynerblain.com/blog/2006/01/19/foundation-series-unit-testing-software/">unit tests</a>, and they are <a title="Blackbox vs whitebox tests" href="http://tynerblain.com/blog/2006/01/13/software-testing-series-black-box-vs-white-box-testing/">black-box tests</a> (or at least <em>should be</em> black-box tests &#8211; read <a title="james' article" href="http://www.jameskovacs.com/blog/ATaleOfTwoEpiphaniesTDDAndMocking.aspx">James&#8217; article</a>).</p>
<p><strong>Works Great With Structured Requirements</strong></p>
<p>Not only is this a great way to approach design, but it is a great way to coordinate software development with <a title="Foundation series on structured requirements" href="http://tynerblain.com/blog/2006/01/04/foundation-series-structured-requirements/">structured requirements</a>.  A well-written requirement describes a need <a title="Writing Design-Free Requirements" href="http://tynerblain.com/blog/2006/06/02/writing-design-free-requirements/">without specifying design</a>.  This description then works like a black-box contract.  The implementer then must do <em>something</em> that meets the specification given.  As James points out, TDD is very effective at creating <a title="Foundation series on blackbox testing and whitebox testing" href="http://tynerblain.com/blog/2006/01/12/foundation-series-black-box-and-white-box-software-testing/">black-box tests</a>.</p>
<p>This makes sense, when you consider the outside-in approach that comes from starting with requirements.  This outside in approach leads to API decisions (for a program or module or method).  The API has to support all of the required possible inputs and outputs.  Once an API is written, tests can be written.</p>
<p><strong>Best Applied As Part Of Continuous Integration For Larger Teams</strong></p>
<p>All of the tests will fail (because the code hasn&#8217;t been written).  Then the implementer will write code until the tests pass.  Using a <a title="Foundation series on continuous integration" href="http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/">continuous integration approach</a> is a very effective way for entire teams to do this simultaneously on larger projects.</p>
<p><strong>Faster Processes</strong></p>
<p>We can also validate the design for completeness prior to creating the implementation.  We can compare the generated APIs (and their rationalizations) with the software specification (or application requirements, or FRS&#8230; see <a title="Variations of Requirements Documents" href="http://tynerblain.com/blog/2006/08/24/alphabet-soup/">alphabet soup article</a>).  This allows us to address some refactoring needs before the code has been implemented &#8211; saving time and money.</p>
<p><strong>Conclusion</strong></p>
<p>Use TDD as an outside-in approach that assures that the delivered software will meet the objectives of the requirements specification.  It also saves time and money by supporting validation in advance of implementation.</p>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+Insight+Into+Test+Driven+Development+http://bit.ly/ZI8gI+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2006/09/12/insight-into-tdd/&amp;t=Insight+Into+Test+Driven+Development" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/09/12/insight-into-tdd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>John Henry, Manual Tester</title>
		<link>http://tynerblain.com/blog/2006/08/17/manual-tester/</link>
		<comments>http://tynerblain.com/blog/2006/08/17/manual-tester/#comments</comments>
		<pubDate>Fri, 18 Aug 2006 02:13:44 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[automated testing]]></category>
		<category><![CDATA[black box testing]]></category>
		<category><![CDATA[blackbox testing]]></category>
		<category><![CDATA[functional testing]]></category>
		<category><![CDATA[gray box testing]]></category>
		<category><![CDATA[graybox testing]]></category>
		<category><![CDATA[grey box testing]]></category>
		<category><![CDATA[greybox testing]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[manual testing]]></category>
		<category><![CDATA[white box testing]]></category>
		<category><![CDATA[whitebox testing]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2006/08/17/manual-tester/</guid>
		<description><![CDATA[There's a piece of North American folklore about John Henry, who was a manual laborer during the expansion of the railroads in our country.  His job was being replaced by steam-driven heavy equipment, as the railroad industry applied technology to become more efficient.  The same dynamics are happening today with manual testers.  We need to make sure that manual testers avoid John Henry's fate - read on to see why.]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2006%252F08%252F17%252Fmanual-tester%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22John%20Henry%2C%20Manual%20Tester%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2006%2F08%2F17%2Fmanual-tester%2F", "style": "big", "title": "John Henry, Manual Tester" });</script></div>
<p><img title="John Henry" alt="John Henry" src="http://sehlhorst.smugmug.com/photos/88878575-M.jpg" /></p>
<p>There&#8217;s a piece of North American folklore about <a title="John Henry" href="http://en.wikipedia.org/wiki/John_Henry_%28folklore%29">John Henry</a>, who was a manual laborer during the expansion of the railroads in our country.  His job was being replaced by steam-driven heavy equipment, as the railroad industry applied technology to become more efficient.  The same dynamics are happening today with manual testers.  We need to make sure that manual testers avoid John Henry&#8217;s fate &#8211; read on to see why.</p>
<p><strong>Manual and Automated Testing</strong></p>
<p>Software can not be tested efficiently with only manual testing.  And it can not be tested completely with only automated testing.  James Bach writes <a title="James Bach's article" href="http://www.satisfice.com/blog/archives/58">an insightful article</a> about how he worked his way to enlightenment over several years, and how he has incorporated this perspective into his training classes.</p>
<blockquote><p>My understanding of cognitive skills of testing and my understanding of test automation are linked, so it was some years before I came to understand what I now propose as the first rule of test automation:</p>
<p><strong>Test Automation Rule #1: </strong><em>A good manual test cannot be automated.</em></p></blockquote>
<p>James goes on to explain that if a test can be automated, it is not a <em>good </em>manual test.</p>
<p>We&#8217;ve discussed repeatedly the benefits of automated testing, one example is <a title="Problems with Manual Testing " href="http://tynerblain.com/blog/2006/03/01/the-code-freeze-is-killing-the-dinosaurs/"><em>The Code Freeze is Killing the Dinosaurs</em></a>.  We&#8217;ve also stressed the importance of doing <a title="Foundation Series on Functional Testing" href="http://tynerblain.com/blog/2006/05/17/foundation-series-functional-testing-of-software/"><em>functional testing</em></a> where we discuss the dynamics and tradeoffs of using manual and automated approaches to test software.</p>
<p>Generally, we&#8217;ve approached the problem from the perspective of <a title="Foundation Series on Blackbox testing and Whitebox testing" href="http://tynerblain.com/blog/2006/01/12/foundation-series-black-box-and-white-box-software-testing/">blackbox versus whitebox testing</a> (<a title="Software Testing Series on Black box tests and White box tests" href="http://tynerblain.com/blog/2006/01/13/software-testing-series-black-box-vs-white-box-testing/">and more details</a>), and thought about our development process from the perspective of <a title="Foundation Series on Continuous Integration" href="http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/">continuous integration</a> as a means to deliver more efficiently.</p>
<p>We&#8217;ve not thought about it from James&#8217; perspective before.  Even with our <a title="Detailed article on testing 'smarter'" href="http://tynerblain.com/blog/2006/05/29/test-smarter-not-harder-a-detailed-article/">improved approaches to automated testing</a>, we are still no different than the inventor of the steam-hammer in Henry&#8217;s fable.</p>
<p><strong>Enlightenment </strong></p>
<p>James puts things in perspective:</p>
<blockquote><p>Rather than banishing human qualities, another approach to process improvement is to harness them. I train testers to take control of their mental models and devise powerful questions to probe the technology in front of them. This is a process of self-programming. In this way of working, test automation is seen as an extension of the human mind, not a substitute.</p></blockquote>
<p>He highlights a very interesting point &#8211; we are missing a key benefit of having manual testers &#8211; the ability to gather feedback on intangibles, heuristics, usability, affordances, and other elements that we might classify as <em>design bugs</em>.</p>
<p>We talk about <a title="Writing software that doesn't suck" href="http://tynerblain.com/blog/2005/12/14/getting-past-the-%e2%80%99suck-threshold%e2%80%99/">the importance of usable software</a>, and different approaches to <a title="Having the right number of features" href="http://tynerblain.com/blog/2006/04/14/goldilocks-and-the-three-products/">creating great software</a>.  But we&#8217;ve never really talked about how to test for software <em>greatness</em>.</p>
<p><strong>A Broken Model</strong></p>
<p>In the 1970&#8217;s, when the American automotive manufacturers were getting their clocks cleaned by the newly exporting Japanese companies like Honda, Datsun (now Nissan), and Toyota, a lot of people thought they understood the problem.  Many more people pretended there wasn&#8217;t a problem, until the US government <a title="1980 Cato Institute analysis" href="http://www.cato.org/pubs/pas/PA00Aes.html">bailed out Chrysler</a>.</p>
<p>The experts decided that the main problem was that quality was not &#8220;Job One&#8221;, that American manufacturers ignored <a title="Lean Manufacturing" href="http://www.poppendieck.com/lean.htm">the advice of W. Edwards Demming</a>, and the Japanese did not.  Toyota&#8217;s lean manufacturing philosophy is credited with much of the success.</p>
<p>It is true that the oil crisis of the time gave the Japanese companies an opportunity to penetrate the US market with smaller, more efficient cars.  But that crisis ended (about the time that the American companies killed the muscle car and began building more efficient cars).  But the Japanese cars didn&#8217;t go away.  Once gas prices dropped, they lost a differentiating element &#8211; but they maintained two others.  Cost and Quality.</p>
<p><strong>Target of Opportunity Enables Strategic Advantage</strong></p>
<p>Cost matters.  But it matters tactically, as in &#8220;I can afford $X right now &#8211; what are my choices?&#8221;  Quality creates Loyalty. And loyalty is strategic.  The Japanese manufacturers gain and continue to gain success after success and award after award in the automotive industry.  Why?  Because they have good quality.</p>
<p><strong>Automated and Manual Testing</strong></p>
<p>As an engineer, I know that we can specify tolerances, inspect components, and test assemblies to make sure that products are &#8220;within specification.&#8221;  And all of this testing can be automated &#8211; just like automated software testing.  But passing these tests doesn&#8217;t make a product good, it merely indicates that the product is &#8220;within specification.&#8221;  Did the Japanese manufacturers have tighter tolerances?  Yes.  But did they have better designs?  Yes.  And those better designs were about more than miles-per-gallon and horsepower and torque.</p>
<p>They were about qualitative items that many engineers struggle to absorb.  &#8220;Feels Good&#8221; and &#8220;The controls are where I expect them to be&#8221; and &#8220;Makes sense&#8221; and &#8220;I like it.&#8221;  Software developers often struggle with the same issues.</p>
<p>And this is where manual testing matters.  Getting qualitative feedback on your product designs is the only way to improve qualitative elements of those designs.  The American manufacturers showed their disdain and hubris in allowing their customers to provide that feedback.  The Japanese companies got feedback <em>before</em> they sold their products.</p>
<p>We can use manual testing to provide us with the kinds of feedback that can&#8217;t be automated.  Things like &#8220;This UI is confusing&#8221; and &#8220;Why won&#8217;t it let me&#8230;?&#8221;</p>
<p><strong>Summary</strong></p>
<p>Don&#8217;t give up on manual testing as we strive to achieve software product success.  Automate everything we can, and use people to test what we can&#8217;t.  We need to make sure that we don&#8217;t lose the ability (or make sure that we find the ability) to test manually, for qualitative insight into our products.  We can&#8217;t let the testers burst their hearts like poor John Henry, trying to manually perform an automatable test.<br />
Thanks again, James, for starting us down this path!</p>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+John+Henry%2C+Manual+Tester+http://bit.ly/1494pz+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2006/08/17/manual-tester/&amp;t=John+Henry%2C+Manual+Tester" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/08/17/manual-tester/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Quality and Requirements &#8211; You Got Chocolate In My Peanut Butter</title>
		<link>http://tynerblain.com/blog/2006/08/07/quality-and-requirements/</link>
		<comments>http://tynerblain.com/blog/2006/08/07/quality-and-requirements/#comments</comments>
		<pubDate>Tue, 08 Aug 2006 05:21:36 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Requirements]]></category>
		<category><![CDATA[Requirements gathering]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[quality and requirements]]></category>
		<category><![CDATA[quality requirements]]></category>
		<category><![CDATA[requirements and quality]]></category>
		<category><![CDATA[requirements elicitation]]></category>
		<category><![CDATA[requirements errors]]></category>
		<category><![CDATA[requirements quality]]></category>
		<category><![CDATA[writing good requirements]]></category>
		<category><![CDATA[writing quality requirements]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2006/08/07/quality-and-requirements/</guid>
		<description><![CDATA[Quality writers are writing about requirements. Requirements writers are writing about quality. Just like the Reese's Peanut Butter Cup - Two Great Tastes that Taste Great Together. You can't have one without the other.]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2006%252F08%252F07%252Fquality-and-requirements%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Quality%20and%20Requirements%20-%20You%20Got%20Chocolate%20In%20My%20Peanut%20Butter%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2006%2F08%2F07%2Fquality-and-requirements%2F", "style": "big", "title": "Quality and Requirements - You Got Chocolate In My Peanut Butter" });</script></div>
<p><img title="Reeses Cup" alt="Reeses Cup" src="http://sehlhorst.smugmug.com/photos/86725596-M.jpg" /></p>
<p><em>Quality</em> writers are writing about requirements.  <em>Requirements </em>writers are writing about quality.  Just like the Reese&#8217;s Peanut Butter Cup &#8211; <em>Two Great Tastes that Taste Great Together</em>.  You can&#8217;t have one without the other.</p>
<p><strong>Quality</strong></p>
<p>The <a title="BA Blog" href="http://www.b2ttraining.com/page/business-analyst-blog"><em>Business Analyst Blog</em></a> writes about <a title="Better requirements speed up testing" href="http://www.b2ttraining.com/page/business-analyst-blog/archives/49/how-do-we-speed-up-software-testing-write-better-requirements">speeding up testing</a>:</p>
<blockquote><p>Everyone has suggestions about how to improve your testing—implement a testing process or methodology, utilize IEEE standards, work towards CMMI compliance, etc. No one mentions that improving requirements will improve testing! [...] Why does it take so long? I would argue that one of the main reasons is that poor (or missing) requirements slow down the process as much as any other issue.</p></blockquote>
<p>Well said.  If we&#8217;re testing for the wrong things, we&#8217;re wasting time and resources.</p>
<p><strong>Requirements</strong></p>
<p><a title="Software Quality Blog" href="http://software-quality.blogspot.com/"><em>The Software Quality Blog</em></a> writes about <a title="Requirements best practices" href="http://software-quality.blogspot.com/2006/08/most-useful-requirements-processes.html">requirements best practices</a>:</p>
<blockquote><p>No process is more fundamental than the process of defining and managing business and technical requirements. It&#8217;s no surprise that studies cite inaccurate, incomplete, and mismanaged requirements as the <strong>primary reason for project failure</strong>.</p></blockquote>
<p>Well said again.  The Standish Group estimated that <a title="Why Invest in Requirements?" href="http://tynerblain.com/blog/2005/12/28/why-we-should-invest-in-requirements-management/">40% to 60% of defects were due to errors in requirements</a>, not code.</p>
<p><strong>Convergence</strong></p>
<p>In <a title="Where Bugs Come From" href="http://tynerblain.com/blog/2006/01/22/where-bugs-come-from/"><em>Where Bugs Come From</em></a>, we showed that having the requirements errors happen throughout the process, not just at the beginning of the process.  Numbers 3 and 4 of the following list are the painful and visible impacts of the problems both of our authors above are addressing.  And those errors are introduced in numbers 1 and 2:</p>
<p><strong>Requirements errors can happen</strong></p>
<ol>
<li><strong>When stakeholders incorrectly define their goals.</strong>  A focus on <a title="Definition of ROI" href="http://tynerblain.com/blog/2006/02/01/definition-of-roi-return-on-investment/">ROI</a> is the best way to assure that our stakeholders are focusing on the right part of the business.  <a title="Top Six Requirements Gathering Techniques" href="http://tynerblain.com/blog/2006/01/14/top-five-requirements-gathering-tips/">Elicitation techniques</a> help us to drive this process in a way that tends to focus on the right requirements.  The centerpiece of elicitation is <a title="How to Interview When Gathering Requirements" href="http://tynerblain.com/blog/2006/01/15/how-to-interview-when-gathering-requirements/">interviewing stakeholders</a> &#8211; both users and beneficiaries of the system.</li>
<li><strong>When product managers / business analysts incorrectly document stakeholder goals</strong>.  Writing good requirements is an absolutely masterable skill.  Check out these <a title="Big Ten Rules of Writing Good Requirements" href="http://tynerblain.com/blog/2006/05/25/writing-good-requirements-the-big-ten-rules/">top ten tips for writing good requirements</a>.</li>
<li><strong>When developers write unit tests of the wrong implementation</strong>.  Even with a great <a title="Foundation Series on Continuous Integration" href="http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/">continuous integration strategy</a>, all we end up doing is efficiently testing the wrong stuff.</li>
<li><strong>When test teams assure that the wrong requirements have been implemented</strong>.  We waste time testing requirements that aren&#8217;t really requirements.  And we waste time tracking down <em>false positive</em> defects.</li>
</ol>
<p><strong>Conclusion</strong></p>
<p>When we&#8217;re selling the value of requirements engineering, use this argument to explain the benefits (or impacts) of good (or bad) requirements.  When we&#8217;re responsible for implementation (dev and test) on a project, remember <em>why</em> we care about requirements.  It isn&#8217;t enough to <a title="Writing Verifiable Requirements" href="http://tynerblain.com/blog/2006/06/13/writing-verifiable-requirements/"><em>verify</em> that requirements are implementable</a>.  We have a vested interest in validating that the requirements are also <em><a title="Writing Complete Requirements" href="http://tynerblain.com/blog/2006/06/08/writing-complete-requirements/">complete</a> </em>and <a title="Writing Valuable Requirements" href="http://tynerblain.com/blog/2006/05/30/writing-valuable-requirements/"><em>valuable</em></a>.</p>
<p><strong>Sidebar</strong></p>
<p>[disclaimer: I am a bit of a dork.]  I cracked myself up today when I typed &#8220;errors of omision&#8221;.</p>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+Quality+and+Requirements+%E2%80%93+You+Got+Chocolate+In+My+Peanut+Butter+http://bit.ly/3CiJx+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2006/08/07/quality-and-requirements/&amp;t=Quality+and+Requirements+%E2%80%93+You+Got+Chocolate+In+My+Peanut+Butter" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/08/07/quality-and-requirements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing Verifiable Requirements</title>
		<link>http://tynerblain.com/blog/2006/06/13/writing-verifiable-requirements/</link>
		<comments>http://tynerblain.com/blog/2006/06/13/writing-verifiable-requirements/#comments</comments>
		<pubDate>Wed, 14 Jun 2006 03:32:58 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Product Management]]></category>
		<category><![CDATA[Requirements]]></category>
		<category><![CDATA[Software requirements specification]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Writing]]></category>
		<category><![CDATA[business requirements documentation]]></category>
		<category><![CDATA[good requirements]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[product requirements]]></category>
		<category><![CDATA[requirements documentation]]></category>
		<category><![CDATA[requirements verification]]></category>
		<category><![CDATA[software requirements]]></category>
		<category><![CDATA[verifiable requirements]]></category>
		<category><![CDATA[writing business requirements]]></category>
		<category><![CDATA[writing requirements]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2006/06/13/writing-verifiable-requirements/</guid>
		<description><![CDATA[One of the ten big rules of writing a good MRD is writing verifiable requirements.  Verification is both a function of having a precise goal, and having the ability to affordably measure the requirement.  A precise goal is a verifiable requirement if we can clearly answer "yes" or "no" when asked if the requirement has been implemented.  We also face the practical realities of being able to measure the results profitably.]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2006%252F06%252F13%252Fwriting-verifiable-requirements%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Writing%20Verifiable%20Requirements%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2006%2F06%2F13%2Fwriting-verifiable-requirements%2F", "style": "big", "title": "Writing Verifiable Requirements" });</script></div>
<p><img alt="big ten logo" title="big ten logo" src="http://sehlhorst.smugmug.com/photos/128628654-M.png" /></p>
<p>One of the ten big rules of writing a good MRD is writing verifiable requirements.  Verification is both a function of having a precise goal, and having the ability to affordably measure the requirement.  A precise goal is a verifiable requirement if we can clearly answer &#8220;yes&#8221; or &#8220;no&#8221; when asked if the requirement has been implemented.  We also face the practical realities of being able to measure the results profitably.</p>
<h2>The Big Rule of Writing Verifiable Requirements</h2>
<p><strong><br />
</strong></p>
<p>From our previous article, <a title="The Big Ten Rules of Writing MRDs" href="http://tynerblain.com/blog/2006/05/25/writing-good-requirements-the-big-ten-rules/"><em>Writing  Good Requirements &#8211; Big Ten Rules</em></a>:</p>
<blockquote><p>We use a process that starts with market requirements, and <a title="From MRD to PRD" href="http://tynerblain.com/blog/2006/01/24/from-mrd-to-prd-the-key-to-defining-a-spec/">then  decomposes them</a> into software requirement specifications. the market  requirements must be written in a way that we can verify that the associated  requirements specification will meet the market need.</p></blockquote>
<h2>Verifiable</h2>
<p>We wrote previously that <a title="How to Deal With Untestable Requirements" href="http://tynerblain.com/blog/2005/11/30/how-to-deal-with-untestable-requirements-rewrite-them/">if a requirement can&#8217;t be tested, it should be rewritten</a>.  Roger Cauvin has recently reposted on <a title="Why Testable Requirements" href="http://cauvin.blogspot.com/2006/06/why-testable-requirements.html">testable requirements</a>.  Perhaps in anticipation of this article? :).</p>
<p>In the world of test driven design (TDD), the philosophy is to write the test first, and then write the code.  We use a <a title="Foundation Series on Continuous Integration" href="http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/">continuous integration approach</a> to check in code regularly and run all of the tests as we go.  When the test for a particular requirement passes, the code is done for that requirement.</p>
<p>We also get a big benefit in validating that we have delivered the right functionality to the customer.  When we agree on the language of the requirement, we are also agreeing on the language of its verifiability.</p>
<h2>Affordably Verifiable</h2>
<p><strong> </strong></p>
<p>With this <em>big rule</em>, we are assuming that we have already eliminated impractical or <a title="Writing Attainable Requirements" href="http://tynerblain.com/blog/2006/06/07/writing-attainable-requirements/">unattainable requirements</a>.</p>
<p>Some tests are very expensive, or nigh on impossible.  Roger alludes to this as <em>testable in principle</em>.  Requirements should be testable in practice whenever possible.  If a requirement can not be tested (&#8220;Must last 10 years&#8221;) in the delivery timeframe, we need to at least define a specific acceptance criteria &#8211; (&#8220;95% confidence in a cycle life of 10,000 cycles per procedure XYZ.doc&#8221;).  This is the approach that Underwriter Labs uses for awarding UL certification to electrical appliances for safety.</p>
<p>Semantically, we can argue that this proxy criteria is in fact the requirement.  It is the criteria by which acceptance is determined.</p>
<p>If the test is possible, but impossibly expensive, we shouldn&#8217;t run the test.  If we can not agree on a practical proxy criteria, we are left with two choices.  We can choose to not implement the requirement.  Or we can choose to agree that the requirement is delivered <em>when we say it is</em>.  Neither is a particularly good option, but the former is better than the latter, when it comes to maintaining a positive relationship with our customer.</p>
<p>Writing requirements without acceptance criteria introduces risk into our project.  The last thing we want is to enter into a nitpicking discussion about what we have and have not delivered.  We would much rather spend that time discussing what we can deliver next.</p>
<h2>Conclusion</h2>
<p>Write requirements that can be verified given the constraints of the project.  Common constraints are time, money, equipment and expertise.  Use language that makes the verification process explicit.  The process of determining verifiability also dramatically helps <a title="Writing Unambiguous Requirements" href="http://tynerblain.com/blog/2006/06/12/writing-unambiguous-requirements/">eliminate ambiguity in our requirements</a>.</p>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+Writing+Verifiable+Requirements+http://bit.ly/2HPaX+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2006/06/13/writing-verifiable-requirements/&amp;t=Writing+Verifiable+Requirements" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/06/13/writing-verifiable-requirements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test Smarter, Not Harder &#8211; A Detailed Article</title>
		<link>http://tynerblain.com/blog/2006/05/29/test-smarter-not-harder-a-detailed-article/</link>
		<comments>http://tynerblain.com/blog/2006/05/29/test-smarter-not-harder-a-detailed-article/#comments</comments>
		<pubDate>Tue, 30 May 2006 03:18:32 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[blackbox testing]]></category>
		<category><![CDATA[functional testing]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[measuring quality levels]]></category>
		<category><![CDATA[n-wise]]></category>
		<category><![CDATA[n-wise testing]]></category>
		<category><![CDATA[pairwise]]></category>
		<category><![CDATA[pairwise testing]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[whitebox testing]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2006/05/29/test-smarter-not-harder-a-detailed-article/</guid>
		<description><![CDATA[A detailed (15-page) article by Scott Sehlhorst showing how to incorporate test automation for complex software has been published at developer.*.  This article shows the math, benefits, and weaknesses of traditional approaches to automating functional tests.  The article also proposes improvements to the process, rethinking the problem to provide innovative solutions.  This post discusses the background for the article and provides an overview, as well as links to related content.]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftynerblain.com%252Fblog%252F2006%252F05%252F29%252Ftest-smarter-not-harder-a-detailed-article%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Test%20Smarter%2C%20Not%20Harder%20-%20A%20Detailed%20Article%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2006%2F05%2F29%2Ftest-smarter-not-harder-a-detailed-article%2F", "style": "big", "title": "Test Smarter, Not Harder - A Detailed Article" });</script></div>
<p><img title="Scott Sehlhorst" alt="Scott Sehlhorst" src="http://sehlhorst.smugmug.com/photos/63490537-S.jpg" /></p>
<p><a title="Developer - dot - star" href="http://www.developerdotstar.com/">developer.*</a> has just published a 15-page article, <a title="Test Smarter Not Harder" href="http://www.developerdotstar.com/mag/articles/test_smarter_not_harder.html"><strong><em>Test Smarter, Not Harder</em> by Scott Sehlhorst</strong></a> on test automation.  We present the background for that article here (why you should read it) as well as a summary of what is covered in the article.  Check it out at developer.*, and thanks to Dan Read, both for starting developer.* (which is a GREAT site) and for publishing the article.  Skip to the end of this post to see how you can help.</p>
<p><strong>Automated Testing Must Be a Core Competence</strong></p>
<p>Automated testing has become a critical component of software product success.  Processes like <a title="Ten Essential Practices of Continuous Integration" href="http://tynerblain.com/blog/2006/05/09/ten-essential-practices-of-continuous-integration/">continuous integration</a> require test automation to be effective.  <a title="Foundation Series on Unit Testing" href="http://tynerblain.com/blog/2006/01/19/foundation-series-unit-testing-software/">Unit testing</a> requires automated testing to be effective as a rapid-development tool.  <a title="Software Testing Series on Blackbox and Whitebox testing" href="http://tynerblain.com/blog/2006/01/13/software-testing-series-black-box-vs-white-box-testing/">Whitebox testing</a> is almost always done with automation.  More and more <a title="Foundation Series on Blackbox and Whitebox Testing" href="http://tynerblain.com/blog/2006/01/12/foundation-series-black-box-and-white-box-software-testing/">blackbox testing</a> is being done with automation.  A team without a good approach to automated testing is working at a severe disadvantage, and is arguably <a title="The Code Freeze is Killing the Dinosaurs" href="http://tynerblain.com/blog/2006/03/01/the-code-freeze-is-killing-the-dinosaurs/">doomed to extinction</a>.</p>
<p><a title="Foundation Series on Functional Tests" href="http://tynerblain.com/blog/2006/05/17/foundation-series-functional-testing-of-software/">Functional Testing (or system testing)</a> is where a team can achieve process differentiation with automation.  80% of teams rely on manual functional testing today.  These teams argue that automating functional tests is too expensive.  The reasons most cited are complexity and rapid change in the underlying product.</p>
<p><strong>Testing Complex Software</strong></p>
<p>Complex software presents very challenging problems for test automation.  First &#8211; how do we deal with the extreme complexity of many of today&#8217;s software applications?  Billions or trillions of combinations (scripts) of user actions can be made.  And software that works with one combination may be buggy in hundreds of others.</p>
<p>We can&#8217;t realistically test all of the combinations.  Even if we did have the hardware needed to run them we would not be able to validate the results of all of those tests.  So we can&#8217;t achieve exhaustive test coverage.</p>
<p>Without exhaustive test coverage, how do we know when we&#8217;ve tested <em>enough</em>?</p>
<p><strong>Test Smarter Not Harder</strong></p>
<p><a title="Test Smartert, Not Harder" href="http://www.developerdotstar.com/mag/articles/test_smarter_not_harder.html">The article</a> starts with an analysis of the complexity of modern software and a brief discussion of the organizational realities and typical responses.  Then the article explores common approaches and techniques in place today:</p>
<ul>
<li>Random Sampling</li>
<li>Pairwise Testing</li>
<li>N-wise Testing</li>
</ul>
<p>The article explores the math, benefits, and limitations of each approach.  While N-wise testing is the most effective approach in common use today, it has a limitation &#8211; it assumes that the user&#8217;s actions (input variables) happen in a prescribed sequence or are irrelevant.  In most complex software this assumption is invalid.  The article presents a technique for incorporating order-dependence into the statistical approaches for developing test coverage.</p>
<p>The article also demonstrates techniques for simplifying the testing representation using whitebox testing techniques to redefine the problem space, and then applying blackbox testing (statistical) approaches to execution of the resultant test parameters.</p>
<p>By combining the statistical techniques explained in the article with a <a title="Communicate Relevant Quality Metrics" href="http://tynerblain.com/blog/2006/04/27/communicate-relevant-quality-metrics/">communication plan for sharing the appropriate quality metrics</a> with stakeholders, we can deliver higher quality software, <a title="Measuring the Cost of Quality" href="http://tynerblain.com/blog/2006/02/22/software-testing-series-measuring-the-cost-of-quality/">at a lower cost</a>, and with improved organizational support and visibility.</p>
<p><strong>Why developer.*?</strong></p>
<p>While many Tyner Blain readers are interested in test automation, most of our readers would not want to go into this much depth.  The audience at developer.* has a more technical focus, and their site is a more natural place for <a title="Test Smarter, Not Harder" href="http://www.developerdotstar.com/mag/articles/test_smarter_not_harder.html">this article</a>.  Personally, I am honored to be included as an article author there &#8211; and all of you who want more technical depth than we go into at Tyner Blain should really check out <a title="Developer dot star Homepage" href="http://www.developerdotstar.com">the stuff Dan Read has put together</a>.  They&#8217;ve also just published their first indie-publisher &#8216;<a title="Software Conflict 2.0" href="http://www.developerdotstar.com/books/software_conflict_glass.html">real book</a>&#8216;, which you can get via their site.  My copy is on the way as I type.</p>
<p><strong>How can you help?</strong></p>
<p>This is a great opportunity for PR for Tyner Blain &#8211; please share the article with your associates because we want our community to grow.  Also, it would be great if you &#8216;digg&#8217; the article at <a title="Article entry at digg.com" href="http://digg.com/programming/Test_Smarter,_Not_Harder">digg</a> (just follow the link, and &#8216;digg it&#8217;), <a title="del.icio.us home page" href="http://del.icio.us/">del.icio.us</a>, <a title="Blink homepage" href="http://www.blinklist.com/">blink</a>, or any other networking site.  In addition to being good content, I hope to make this an experiment in viral marketing.  Lets see if we can collectively reach the tipping point that brings this article, and the Tyner Blain community to the next group of people.</p>
<p>[<strong>update</strong>: the <a title="Article link" href="http://www.developerdotstar.com/mag/articles/test_smarter_not_harder.html">article </a>just made the front page at digg and has <a title="Article at Digg" href="http://digg.com/programming/Test_Smarter,_Not_Harder">374 diggs and 32 brutal comments</a> :).  Welcome to all <strong>digg</strong>ers, mobile, agile, or hostile!]</p>

<p align="left"><a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/home/?status=By+@sehlhorst:+Test+Smarter%2C+Not+Harder+%E2%80%93+A+Detailed+Article+http://bit.ly/FZUm9+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big1.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://tynerblain.com/blog/2006/05/29/test-smarter-not-harder-a-detailed-article/&amp;t=Test+Smarter%2C+Not+Harder+%E2%80%93+A+Detailed+Article" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/tt-facebook-big4.png" alt="Post to Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/05/29/test-smarter-not-harder-a-detailed-article/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
