<?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; Test Automation</title>
	<atom:link href="http://tynerblain.com/blog/category/software-development/testing/test-automation/feed/" rel="self" type="application/rss+xml" />
	<link>http://tynerblain.com/blog</link>
	<description>Software product success.</description>
	<lastBuildDate>Wed, 08 Feb 2012 16:38:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<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 [...]]]></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>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+You+Are+Creating+Bugs+In+Your+Software+http%3A%2F%2Fbit.ly%2FgPAN3T+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2008/01/14/you-are-creating-bugs/feed/</wfw:commentRss>
		<slash:comments>12</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>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+Test+Smarter%2C+Not+Harder+%E2%80%93+Part+3+http%3A%2F%2Fbit.ly%2FdEami5+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></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>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+Test+Smarter%2C+Not+Harder+%E2%80%93+Part+2+http%3A%2F%2Fbit.ly%2FfA83nG+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></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>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+Test+Smarter%2C+Not+Harder+%E2%80%93+Part+1+http%3A%2F%2Fbit.ly%2FfhYkN4+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></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>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>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+Is+Agile+Bad+For+Software+Development%3F+http%3A%2F%2Fbit.ly%2FhfXV4o+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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%3F" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></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>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>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+Insight+Into+Test+Driven+Development+http%3A%2F%2Fbit.ly%2FdIr61C+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></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&#8242;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>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+John+Henry%2C+Manual+Tester+http%3A%2F%2Fbit.ly%2FfHFx93+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/08/17/manual-tester/feed/</wfw:commentRss>
		<slash:comments>4</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>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+Test+Smarter%2C+Not+Harder+%E2%80%93+A+Detailed+Article+http%3A%2F%2Fbit.ly%2Fh322Xe+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></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>
		<item>
		<title>Foundation Series: Functional Testing of Software</title>
		<link>http://tynerblain.com/blog/2006/05/17/foundation-series-functional-testing-of-software/</link>
		<comments>http://tynerblain.com/blog/2006/05/17/foundation-series-functional-testing-of-software/#comments</comments>
		<pubDate>Thu, 18 May 2006 03:55:35 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Foundation series]]></category>
		<category><![CDATA[Process Improvement]]></category>
		<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[blackbox tests]]></category>
		<category><![CDATA[functional testing]]></category>
		<category><![CDATA[functional tests]]></category>
		<category><![CDATA[graybox testing]]></category>
		<category><![CDATA[graybox tests]]></category>
		<category><![CDATA[keyword table testing]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[qtp]]></category>
		<category><![CDATA[software development process]]></category>
		<category><![CDATA[software process]]></category>
		<category><![CDATA[software product success]]></category>
		<category><![CDATA[software quality]]></category>
		<category><![CDATA[system testing]]></category>
		<category><![CDATA[testing automation]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[white box testing]]></category>
		<category><![CDATA[whitebox testing]]></category>
		<category><![CDATA[whitebox tests]]></category>
		<category><![CDATA[winrunner]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2006/05/17/foundation-series-functional-testing-of-software/</guid>
		<description><![CDATA[Functional Testing, also referred to as System Testing of software is the practice of testing the completed software to confirm that it meets the requirements defined for the software.  A functional test is typically a test of user interactions, but can also involve communication with external systems.  We contrast functional testing with unit testing.  We also show how functional testing provides different benefits than unit testing.]]></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%252F17%252Ffoundation-series-functional-testing-of-software%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Foundation%20Series%3A%20Functional%20Testing%20of%20Software%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2006%2F05%2F17%2Ffoundation-series-functional-testing-of-software%2F", "style": "big", "title": "Foundation Series: Functional Testing of Software" });</script></div>
<p><img alt="Functional testing class" title="Functional testing class" src="http://sehlhorst.smugmug.com/photos/50445724-M.jpg" /></p>
<p>Functional Testing, also referred to as <em>System Testing</em> of software is  the practice of testing the completed software to confirm that it meets the  requirements defined for the software.  A functional test is typically a test of  user interactions, but can also involve communication with external systems.  We  contrast functional testing with <a title="Foundation series on unit testing of software" href="http://tynerblain.com/blog/2006/01/19/foundation-series-unit-testing-software/">unit testing</a>.  We also show how functional  testing provides different benefits than unit testing.</p>
<p>This is a relatively long post for a <em>Foundation Series</em> post, so sit back with some coffee and relax.  This primer will be worth it if its a new topic.  If you know this stuff already, check out the links to other articles that go into more depth on points we make.</p>
<p><strong>An Application is a Series of Flows</strong></p>
<p>We can think of an application from the perspective of a user, as a series of  interactions, or flows through the user interface.</p>
<p><img alt="Application flow" title="Application flow" src="http://sehlhorst.smugmug.com/photos/70145401-M.png" /></p>
<p>People are not usually forced to follow a fixed set of instructions, or a  predefined sequence of actions in an application.  They can interact with  controls in a random order, skip controls entirely, or otherwise do stuff that  developers don&#8217;t expect.</p>
<p><strong>Unit Tests are Whitebox Tests</strong></p>
<p>Unit testing, as we detailed in our telephone example, provides targeted test  coverage of specific areas of the code inside the application.  Unit tests are  written by developers, to allow them to test that the implementation that they  created is behaving as they intended.  Unit tests don&#8217;t implicitly provide the  start-to-finish coverage that functional tests usually provide.  Unit tests are  <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/">whitebox tests </a>that assure that a specific behavior intended by the developer is  happening.  A weakness of using unit tests alone is that they will not <a title="Where bugs come from" href="http://tynerblain.com/blog/2006/01/22/where-bugs-come-from/">identify  when the developer <em>misinterpreted</em> the requirements</a>.</p>
<p><img alt="unit testing" title="unit testing" src="http://sehlhorst.smugmug.com/photos/70145383-M.png" /></p>
<p><strong>Functional Tests are Blackbox Tests</strong></p>
<p>A functional test, however, is designed without insight into how the  implementation works.  It is <a title="Software testing series on Blackbox Testing and Whitebox Testing" href="http://tynerblain.com/blog/2006/01/13/software-testing-series-black-box-vs-white-box-testing/">a blackbox test</a>.  A functional test represents a  set of user interactions with the application.  The concept behind a functional  test is to validate something about the state of the application after a series  of events.  According to <a title="Aberro Software homepage" href="http://www.aberrosoftware.com/index.php">Aberro Software</a>, 80% of all functional tests are  performed manually.  That means that the most common functional test involves a  tester making selections in a series of controls, and then evaluating a  condition.  This evaluation is called an assertion.  The tester <em>asserts</em>  that the software is in a specific state (an output is created, a control is  filtered in a specific way, a control is enabled, a navigation option is  disabled, etc).</p>
<p><img alt="full functional testing" title="full functional testing" src="http://sehlhorst.smugmug.com/photos/70145408-M.png" /></p>
<p>Good <a title="Writing functional requirements unambiguously" href="http://tynerblain.com/blog/2006/02/14/writing-requirements-unambiguously/">functional requirements are written as concisely as possible</a>.  A <a title="Writing functional requirements to support use cases" href="http://tynerblain.com/blog/2006/02/10/writing-functional-requirements-to-support-use-cases/">requirement that supports a particular use case</a> might  state that the user specifies A, B, and C, and the application responds with D.   A functional test designed to validate that requirement will almost always mimic  this <em>most common</em> flow of events.  The <em>script</em> that the tester  follows will be to specify A, then B, then C.  The tester will then evaluate the  assertion that D is true.  If D is false, then the test has failed.</p>
<p>A functional test may not cover the entire set of likely user interactions,  but rather a subset of them.</p>
<p><img alt="Targeted functional testing" title="Targeted functional testing" src="http://sehlhorst.smugmug.com/photos/70145423-M.png" /></p>
<p>One problem with this approach is that it does not account for a user  specifying (A, B, X, C) or (A, C, B).  These variations in order of operations  <em>might</em> cause the underlying code to execute differently, and might  uncover a bug.  For a tester to get complete coverage of the requirement (A + B  + C => D), he would have to create multiple scripts.  This is expensive,  tedious, and often redundant.  But a tester has no way to know if the multiple  scripts are redundant, or required.</p>
<p><strong>Combining Unit Tests and Functional Tests</strong></p>
<p>When we combine both unit testing and functional testing approaches, we are  implementing what is called graybox testing (greybox testing).  This is also  referred to as <em>layered testing</em>.  Graybox testing provides two types of  feedback into the <a title="Software development process example" href="http://tynerblain.com/blog/2006/02/20/software-development-process-example/">software development process</a>.  The unit tests provide feedback  to the developer that her implementation is working as designed.  The functional  tests provide feedback to the tester that the application is working as  required.</p>
<p><img alt="Layered testing" title="Layered testing" src="http://sehlhorst.smugmug.com/photos/70145416-M.png" /></p>
<p>Graybox testing is the ideal approach for any software project, and is a key  component of any <a title="Foundation Series on Continuous Integration" href="http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/">continuous integration strategy</a>.  Continuous integration is a  process where the software is compiled and tested every day throughout the  release cycle &#8211; instead of waiting until the end of the cycle to test.  Read  this <a title="Ten Essential Elements of Continuous Integration" href="http://tynerblain.com/blog/2006/05/09/ten-essential-practices-of-continuous-integration/">plan for implementing continuous integration</a> if you want more details.</p>
<p><strong>Automating Functional Tests</strong></p>
<p>Automating unit testing is both straightforward, and relatively inexpensive.   Automating functional testing is more expensive to set up, and much more  expensive to maintain.  Each functional test represents a script of specific  actions.  A tester (with programming skills) can utilize software packages like  WinRunner to create scripts of actions followed by assertions.  This represents  an upfront cost of programming a script to match the application, in parallel  with the development of the application &#8211; and it requires a tester with  specialized skills to program the script.</p>
<p>The maintenance cost of automating functional tests is magnified in the early  development stages of any application, and throughout the life of any  application developed with an agile process.  Whenever an element of the user  interface is changed, every script that interacts with that element can be  broken (depending on the nature of the change).  These broken scripts have to be  manually updated to reflect these ongoing changes.  In periods of heavy  interface churn, the cost of maintaining the test suite can quickly become  overwhelming.</p>
<p>In the real world, apparently 80% of teams find that <a title="Measuring the Cost of Quality" href="http://tynerblain.com/blog/2006/02/22/software-testing-series-measuring-the-cost-of-quality/">this overwhelming cost  of automated testing </a>outweighs even the high cost of manual functional testing.</p>
<p><strong>Improved Automation of Functional Tests</strong></p>
<p>We can reduce the maintenance cost of keeping automated scripts current with  the user interface by abstracting the script-coding from the script-definition.   This is referred to as <em>keyword and table</em> scripting.  A set of objects  are coded by the tester and given keywords.  Each object represents an element  in the user interface.  Script behavior (sequence of interaction) is defined in  terms of these keywords.  Now, when a UI element is changed, the keyword-object  is updated and all of the scripts that reference it are repaired.</p>
<p>This, however, does not address issues where one control is refactored into  two controls, the adding or removing of controls, or changes in the desired flow  of interaction.  There is still a very large (albeit smaller) maintenance  burden.  And the applications that use this approach (such as QTP) can cost in  the tens of thousands of dollars.  Another reason to do functional testing  manually.</p>
<p><strong>Conclusion</strong></p>
<p>Functional testing is important to validating requirements.  It is an  important element of assuring a level of software quality.  And it is still  expensive with the best of today&#8217;s proven solutions.  Even with the high cost,  it is much cheaper than the risk of delivering a solution with poor quality.   Plan on having functional testing as a component of any process to achieve  software product success.</p>
<p>- &#8211; -</p>
<p>Check out the index of the <a title="Index of background topics in requirements and software" href="http://tynerblain.com/blog/foundation-series-index/"><em>Foundation  series</em> posts</a> which will be updated whenever new posts are added.</p>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+Foundation+Series%3A+Functional+Testing+of+Software+http%3A%2F%2Fbit.ly%2FgY87iS+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/17/foundation-series-functional-testing-of-software/&amp;t=Foundation+Series%3A+Functional+Testing+of+Software" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/05/17/foundation-series-functional-testing-of-software/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Ten Essential Practices of Continuous Integration</title>
		<link>http://tynerblain.com/blog/2006/05/09/ten-essential-practices-of-continuous-integration/</link>
		<comments>http://tynerblain.com/blog/2006/05/09/ten-essential-practices-of-continuous-integration/#comments</comments>
		<pubDate>Wed, 10 May 2006 04:01:14 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Lists]]></category>
		<category><![CDATA[Process Improvement]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[automated builds]]></category>
		<category><![CDATA[automated testing]]></category>
		<category><![CDATA[automated tests]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[regression testing]]></category>
		<category><![CDATA[timebox]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2006/05/09/ten-essential-practices-of-continuous-integration/</guid>
		<description><![CDATA[Martin Fowler has identified the key process elements of making Continuous Integration work. You could even argue that they are the elements that define Continuous Integration (done correctly).  We include his list and our thoughts below:]]></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%252F09%252Ften-essential-practices-of-continuous-integration%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Ten%20Essential%20Practices%20of%20Continuous%20Integration%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2006%2F05%2F09%2Ften-essential-practices-of-continuous-integration%2F", "style": "big", "title": "Ten Essential Practices of Continuous Integration" });</script></div>
<p><img alt="Rubber chicken" title="Rubber chicken" src="http://sehlhorst.smugmug.com/photos/68782482-M.jpg" /></p>
<p>Martin Fowler has identified <a title="Fowler's article" href="http://martinfowler.com/articles/continuousIntegration.html">the key process elements of making Continuous Integration work</a>.  You could even argue that they are the elements that <a title="Foundation Series on Continuous Integration" href="http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/">define Continuous Integration</a> (done correctly).  We include his list and our thoughts below:</p>
<ol>
<li><strong>Maintain a Single Source Repository</strong></li>
<li><strong>Automate the Build</strong></li>
<li><strong>Make Your Build Self-Testing</strong></li>
<li><strong>Everyone Commits Every Day</strong></li>
<li><strong>Every Commit Should Build the Mainline on an Integration Machine</strong></li>
<li><strong>Keep the Build Fast</strong></li>
<li><strong>Test in a Clone of the Production Environment</strong></li>
<li><strong>Make it Easy for Anyone to Get the Latest Executable</strong></li>
<li><strong>Everyone can see what&#8217;s happening</strong></li>
<li><strong>Automate Deployment</strong></li>
</ol>
<p>For background information, check out the <a title="Foundation Series on Continuous Integration" href="http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/"><em>Foundation Series on Continuous Integration</em></a> article.</p>
<p><strong>1. Maintain a Single Source Repository</strong></p>
<p>The smartest people I know use <a title="Subversion" href="http://subversion.tigris.org/">subversion </a>when they have been able to make the choice themselves.  Aside from being open source, it provides two key differentiated benefits relative to &#8220;everything else&#8221;.</p>
<ul>
<li>Atomic commits: The ability to check in everything or nothing, so you don&#8217;t risk breaking the build with a partial check-in.</li>
<li>Overall project versioning: Allows you to track changes in source file directory hierarchies, file renaming, etc.  Each version is of the entire project, not of a single file.</li>
</ul>
<p><strong>2. Automate the Build</strong></p>
<p>Fowler sums it up perfectly:</p>
<blockquote><p>&#8220;&#8230;anyone should be able to bring in a virgin machine, check the sources out of the repository, issue a single command, and have a running system on their machine&#8221;</p></blockquote>
<p><strong>3. Make Your Build Self-Testing</strong></p>
<p>Include <a title="Blackbox and Whitebox Testing" href="http://tynerblain.com/blog/2006/01/13/software-testing-series-black-box-vs-white-box-testing/">automated testing</a> as part of the build.</p>
<p><strong>4. Everyone Commits Every Day</strong></p>
<p>More frequently when possible.  This is the minimum.</p>
<p><strong>5. Every Commit Should Build the Mainline on an Integration Machine</strong></p>
<p>A seperate, dedicated machine does a daily (or more frequent) build and full test suite run autonomously.  The &#8220;build and test&#8221; model above relies on people to kick off the build when they commit.  A scheduled task on a seperate machine provides a safety net for human error (oversight).  Alternately, companies like <a title="Calavista " href="http://www.calavista.com">Calavista</a> can make this foolproof by automatically triggering an automated build as part of every commit.  With Calavista&#8217;s devEdge, if the developer &#8220;commits&#8221;, what really happens is that the automated build/test cycle is triggered with his new code, and it gets promoted only if all the tests pass.</p>
<p><strong>6. Keep the Build Fast</strong></p>
<p>Tests can take a long time, builds should only take ten minutes.  Fowler suggests a strategy of staged builds to address the 10-minute threshold.  Run <a title="Foundation Series on Unit Testing of Software" href="http://tynerblain.com/blog/2006/01/19/foundation-series-unit-testing-software/">unit tests</a> against the 10-minute build, and run the full suite in parallel or series.</p>
<p>Another option is to use statistical sampling of tests to get a &#8220;10 minute answer&#8221; while the full suite is kicked off in parallel.</p>
<p><strong>7. Test in a Clone of the Production Environment</strong></p>
<p>Eliminate even more variables.  Make sure the tests are running against a clone of the production environment.  Teams that are pushing the envelope today use virtual machines (VMs) to quickly create cloned production environments, install the software and run the tests.</p>
<p><strong>8. Make it Easy for Anyone to Get the Latest Executable</strong></p>
<p>Make sure everyone knows where the latest build can be found.  Probably a good idea to keep recent builds in the same place too, in case a problem sneaks through the process temporarily (like a memory leak or other obscure, not-yet-tested situation).</p>
<p><strong>9. Everyone can see what&#8217;s happening</strong></p>
<p>Visibility!  eMail the team when builds start/finish, including success/failure information.  Put a rubber chicken on the desk of the person currently running the build (don&#8217;t ask &#8211; just read Fowler&#8217;s post).  Ring a desk bell when the build passes.  Have fun with it.</p>
<p><strong>10. Automate Deployment</strong></p>
<p>Make deployment into production as easy as running the build.  Since tests are run against a production clone, and are already automated, this presents minor incremental effort.</p>
<p><strong>Conclusion</strong></p>
<p>Martin presents a great list.  In addition to the above, we would suggest</p>
<ul>
<li><strong>Generate test-results documents <em>per requirement</em>.</strong>  For each build, identify which requirements pass, fail, or are untested.  The most relevant information for communicating outside of the team is status of previous requirements (did our <em>regression tests</em> pass?) and current requirements (are we almost done with this <a title="Using Timeboxes to Schedule Software" href="http://tynerblain.com/blog/2006/04/12/how-to-use-timeboxes-for-scheduling-software-delivery/"><em>timebox</em></a>?).</li>
</ul>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+Ten+Essential+Practices+of+Continuous+Integration+http%3A%2F%2Fbit.ly%2FediZhS+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/09/ten-essential-practices-of-continuous-integration/&amp;t=Ten+Essential+Practices+of+Continuous+Integration" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/05/09/ten-essential-practices-of-continuous-integration/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Foundation Series: Continuous Integration</title>
		<link>http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/</link>
		<comments>http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/#comments</comments>
		<pubDate>Tue, 09 May 2006 04:55:40 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Foundation series]]></category>
		<category><![CDATA[Process Improvement]]></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 testing]]></category>
		<category><![CDATA[automated testing]]></category>
		<category><![CDATA[build automation]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[incremental delivery]]></category>
		<category><![CDATA[incremental process]]></category>
		<category><![CDATA[iterative delivery]]></category>
		<category><![CDATA[iterative process]]></category>
		<category><![CDATA[managing data]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/</guid>
		<description><![CDATA[Continuous Integration is the software development and quality process where all team members merge their code and verifies it frequently - at least daily. This verification project includes both an automated build process and automated testing. The main benefits of continuous integration come from risk-reduction and cost-reduction.]]></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%252F08%252Ffoundation-series-continuous-integration%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Foundation%20Series%3A%20Continuous%20Integration%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2006%2F05%2F08%2Ffoundation-series-continuous-integration%2F", "style": "big", "title": "Foundation Series: Continuous Integration" });</script></div>
<p><img title="Continuous Integration classroom" alt="Continuous Integration classroom" src="http://sehlhorst.smugmug.com/photos/50445724-M.jpg" /></p>
<h2>Continuous Integration</h2>
<p>Continuous Integration is the software development and quality process where all team members merge their code and verify it frequently &#8211; at least daily.  This verification project includes both an automated build process and automated testing.  The main benefits of continuous integration come from risk-reduction and cost-reduction.</p>
<p>Integration has to happen.  Making it continuous reduces its cost.  There are also efficiencies for developers who can write better code faster when they are writing it in the context of the latest (most up-to-date) version of the code.</p>
<p>Risk is reduced in two ways.  First, continuous integration causes fewer bugs to be created, thereby reducing risk.  Second, when bugs are created, they are identified at the earliest possible moment (same day as their creation).  This maximizes the time available to resolve them.  No surprises at the end of the release cycle.</p>
<h2>Merging Code</h2>
<p>When a single software developer is writing code, she writes her code, saving frequently, and archiving it.  But she is the only person working on the code.  Other than the developer, no one cares how often she checks it in, as long as she can deliver the software on the release date.</p>
<p>When multiple developers work together, they depend upon each other.  On any given day, different developers are writing different pieces of software &#8211; usually objects with today&#8217;s languages.  These objects talk to each other, depend upon each other, or at least co-exist with each other in the completed software.  This stuff is all &#8220;under the hood&#8221; for users, but imperative to understand when trying to manage a development process or team.</p>
<h2>Why Merging Matters</h2>
<p>After the developers go off into their offices and create their objects independently, some or all of the team members have to stop what they are doing, and integrate all of those objects back into a common code-base (aka &#8216;the software).  When a developer fixes a bug in one or more objects, those fixes need to be incorporated back into the common code-base.  With multiple developers, there are multiple elements that all have to be rolled back together again into the code.  Developers often refer to this as merging or promoting into the trunk, or tip, or main branch.</p>
<p>Each change has a set of predicted effects on the rest of the software.  These changes can be tested by the developer before integrating her code into the trunk.  Each change also has a set of unpredicted effects on the rest of the software.  And combinations of changes can &#8216;create&#8217; effects that did not occur with either change individually.  &#8216;Unpredicted effects&#8217; is fancy-talk for &#8216;bugs&#8217;.  The more changes we integrate into the trunk at a time, the more bugs we create.  And this is an accelerating effect &#8211; the complexity of integration increases faster than the number of changes being integrated.</p>
<h2>Increased Complexity Drives Higher Costs</h2>
<p>As we increase the frequency of integration, we decrease the quantity of changes per integration.  This decreases both the cost per integration and the total cost of integration.  It is much cheaper to integrate five changes 100 times than to integrate 100 changes five times.</p>
<p><img title="4 objects, 10 sources" alt="4 objects, 10 sources" src="http://sehlhorst.smugmug.com/photos/68586280-M.png" /></p>
<p><img title="10 objects, 30 sources" alt="10 objects, 30 sources" src="http://sehlhorst.smugmug.com/photos/68586308-M.png" /></p>
<p>Each object and each connection in these diagrams represent a potential source of error.  With 4 objects, we have 10 sources.  With 7 objects, we have 30 sources of error.  This represents an accelerating increase in the cost of integration.</p>
<p><img title="accelerating increase" alt="accelerating increase" src="http://sehlhorst.smugmug.com/photos/68586129-M.png" /></p>
<p>To minimize the costs, we need to minimize the number of objects being integrated.  We do that by minimizing the time between integrations.</p>
<h2>Overhead</h2>
<p>The main resistance to frequent merging is the <a title="Software Testing Series on Measuring the Cost of Quality" href="http://tynerblain.com/blog/2006/02/22/software-testing-series-measuring-the-cost-of-quality/">cost of testing</a>.  Testing involves building the merged code, <a title="Foundation series on unit testing" href="http://tynerblain.com/blog/2006/01/19/foundation-series-unit-testing-software/">running the tests</a>, and evaluating the results.  When the building and testing (the integrating) are automated, the cost of evaluating test results can be minimized.  When test-evaluation is also automated, we can bypass test-result evaluation except when the system notifies us that something is broken.</p>
<p>Continuous integration is only feasible when the overhead of integrating (merging and verifying) is trivialized through automation.</p>
<h2>Conclusion</h2>
<p>Agile processes depend upon continuous integration, but any software development process is improved with continuous integration.  This is one of the enablers of <a title="Two big benefits of incremental delivery" href="http://tynerblain.com/blog/2006/04/18/two-big-benefits-of-incremental-delivery/">iterative development processes.</a>  It reduces the cost of quality (or allows us to achieve higher quality levels at the same cost).  It also makes development more enjoyable because developers spend less time on fixing bugs and more time implementing solutions.</p>
<p>- &#8211; -</p>
<p>Check out the index of the <a title="Index of background topics in requirements and software" href="http://tynerblain.com/blog/foundation-series-index/"><em>Foundation  series</em> posts</a> for other introductory articles.</p>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+Foundation+Series%3A+Continuous+Integration+http%3A%2F%2Fbit.ly%2FgYo1C7+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/08/foundation-series-continuous-integration/&amp;t=Foundation+Series%3A+Continuous+Integration" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Market Segmentation or Senseless Mistake?</title>
		<link>http://tynerblain.com/blog/2006/04/25/market-segmentation-or-senseless-mistake/</link>
		<comments>http://tynerblain.com/blog/2006/04/25/market-segmentation-or-senseless-mistake/#comments</comments>
		<pubDate>Wed, 26 Apr 2006 04:52:12 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Marketing]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[.NET unit testing]]></category>
		<category><![CDATA[automated testing]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[market segmentation]]></category>
		<category><![CDATA[NUnit]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[Visual Studio Team System]]></category>
		<category><![CDATA[VS2005]]></category>
		<category><![CDATA[VSTS]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2006/04/25/market-segmentation-or-senseless-mistake/</guid>
		<description><![CDATA[A grass roots campaign has been started by Peter Provost to get Microsoft to include unit testing support included with all versions of Visual Studio 2005 (VS). Currently, Microsoft is only including it with Visual Studio Team System (VSTS) versions of VS. This looks to be a great example of a killer feature in a product providing so much surprise and delight that people are demanding that it be universally available. This is also a great example of market segmentation by Microsoft. The irony is that there is an open source alternative that makes the opportunity cost very low, and yet people are still clamoring. Let's 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%252F04%252F25%252Fmarket-segmentation-or-senseless-mistake%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Market%20Segmentation%20or%20Senseless%20Mistake%3F%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2006%2F04%2F25%2Fmarket-segmentation-or-senseless-mistake%2F", "style": "big", "title": "Market Segmentation or Senseless Mistake?" });</script></div>
<p><img alt="new coke" title="new coke" src="http://sehlhorst.smugmug.com/photos/66349016-M.jpg" /></p>
<p>A grass roots campaign has been <a style="border-bottom-style: groove" title="Petition" href="http://www.peterprovost.org/archive/2004/06/12/1379.aspx">started by Peter Provost</a> to get Microsoft to include unit testing support included with all versions of Visual Studio 2005 (VS).  Currently, Microsoft is only including it with Visual Studio Team System (VSTS) versions of Visual Studio.  This looks to be a great example of a killer feature in a product providing so much <a title="Surprise and Delight features - Kano prioritization" href="http://tynerblain.com/blog/2006/02/27/prioritizing-software-requirements-kano-take-two/">surprise and delight</a> that people are demanding that it be universally available.  This is also a great example of <strong>market segmentation</strong> by Microsoft.  The irony is that there is an open source alternative that makes the opportunity cost very low, and yet people are still clamoring.  Let&#8217;s see why.</p>
<p><strong>Background</strong></p>
<p>Visual Studio 2005 is a development environment for developing .NET applications.  Microsoft offers several versions of the software &#8211; 8 in the 2005 packaging.  Even for people familiar with the product, the market segmentation strategy can be pretty confusing.  To oversimplify, each version offers more capability than the less-expensive version below it.  Rob Caron provides the best explanation of the product definition strategy in <a title="Guide to Visual Studio products" href="http://blogs.msdn.com/robcaron/archive/2005/04/15/408426.aspx">his Hitchhiker&#8217;s guide to VSTS</a>.  He starts by explaining the Visual Studio 2003 packages, and then shows the evolution to the VS2005 appraoch, including the Team System versions.</p>
<p>Unit testing support is offered only in the four most expensive, most capable versions &#8211; the Team System versions.  The petitioners argue that unit testing is critical to all developers, and should be included in every version of the product.  Unit testing is a form of <a title="Black box and white box testing" href="http://tynerblain.com/blog/2006/01/13/software-testing-series-black-box-vs-white-box-testing/">whitebox testing</a> where developers create automated tests of their code.<br />
Microsoft is implementing a classic market segmentation strategy with this approach.</p>
<p><strong>Market Segments</strong></p>
<p>Markets are not homogenous &#8211; we don&#8217;t sell products to clones.  Everyone has a different set of criteria for purchasing software.  They make different tradeoffs in terms of price versus performance, or cost versus capability.  Imagine a market roughly divided into two populations &#8211; price sensitive people, and feature-driven people.</p>
<p><img alt="populations" title="populations" src="http://sehlhorst.smugmug.com/photos/66353253-M.png" /></p>
<p>The price-sensitive people like getting extra features, but will only pay marginally more for them.  The feature-driven population is willing to pay a higher premium for added capabilities.</p>
<p>If we treat our potential customers as a homogenous market, we will make one of three mistakes:</p>
<ol>
<li>Price the product so that everyone buys it.  If we set the price based on the price-sensitive population, we are leaving money on the table.  The feature-driven people would gladly pay more for the features.</li>
<li>Price the product so that only feature-driven people will buy it.  We lose out on sales to the price-sensitive population, who won&#8217;t pay for the extra capabilities.</li>
<li>Try and compromise.  Nobody wins.  We won&#8217;t get enough of the price-sensitive customers, and we&#8217;ll leave money on the table with the feature-driven customers.</li>
</ol>
<p><strong>The Good, The Better, and The Best</strong></p>
<p>One way to serve all of the customers is with multiple products.  As an example, imagine three versions of a washing machine.  They all basically do the same thing, wash clothes.  The manufacturers can put a stronger motor, fancier control panel, or better sound insulation on some <em>versions</em> of the same product, and sell them to different people for different prices.</p>
<p><img title="Good Better Best" alt="Good Better Best" src="http://sehlhorst.smugmug.com/photos/66353249-M.png" /></p>
<p>Most of the engineering costs apply to all three versions of the same product.  The same is even more applicable to software.  An easy way to do it would be to write the &#8220;best&#8221; software, and then disable some features to create the &#8220;better&#8221; and &#8220;good&#8221; versions.  Many small software companies do this today, offering free and paid versions of their software.  The free versions usually are missing features of the paid versions.</p>
<p>Microsoft has presumably identified several user profiles, and tailored a specific version of the software for each profile.  Each version has different capabilities, and a different price.</p>
<p><strong>Product Differentiation<br />
</strong></p>
<p>Unit testing support, within the Visual Studio development environment, is absolutely a valuable capability.  The growing response to the petition proves it.  This is a great example of a surprise and delight feature (<a title="Using Kano to prioritize requirements" href="http://tynerblain.com/blog/2006/02/27/prioritizing-software-requirements-kano-take-two/">in Kano terms</a>).  In fact, some users find it to be so compelling that they want all users to get it &#8220;for free&#8221; as part of purchasing <em>any</em> version of Visual Studio.</p>
<p>This is one way that Microsoft is providing differentiation of the Team System versions of Visual Studio.  There are other tools that may provide even more compelling reasons to get the Team System version.</p>
<p><strong>Opportunity Cost</strong></p>
<p>The odd thing is that <a title="NUnit" href="http://sourceforge.net/projects/nunit/">NUnit</a> is an open-source unit testing tool that can be <a title="NUnit Add-in" href="http://sourceforge.net/projects/nunitaddin/">plugged-in</a> to <em>all</em> versions of Visual Studio.  This means that there is a free tool for doing exactly what the petition is asking Microsoft to do.  The cost of using NUnit is the time spent setting it up &#8211; I would imagine a few hours to figure it out and create an install document for the rest of the team.  This is a surprisingly low-cost alternative.  And it may even be the better alternative, as NUnit has a very active community, and there are many areas to find free support and help.  The <a title="Definition of opportunity cost" href="http://tynerblain.com/blog/2006/02/24/definition-of-opportunity-cost/"><em>opportunity-cost</em></a> logic applies to this situation (but in reverse).  There is a low-cost alternative, so why spend the money on the extra features?</p>
<p>The other capabilities available in Team System provide much better differentiation, as they don&#8217;t have low-cost alternatives like NUnit.</p>
<p><strong>Conclusion</strong></p>
<p>This is a great example of using market segmentation to sell more software for more profit.  Feature-driven people who want unit testing will pay more for it.  People who  are more price sensitive will still buy the versions without unit testing <em>baked in</em>, and will hopefully know about NUnit and <em>bolt it on</em>.</p>
<p>Good job Microsoft marketing.</p>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+Market+Segmentation+or+Senseless+Mistake%3F+http%3A%2F%2Fbit.ly%2FeItQoD+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/04/25/market-segmentation-or-senseless-mistake/&amp;t=Market+Segmentation+or+Senseless+Mistake%3F" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/04/25/market-segmentation-or-senseless-mistake/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learn to Fly with Software Process Automation</title>
		<link>http://tynerblain.com/blog/2006/04/04/learn-to-fly-with-software-process-automation/</link>
		<comments>http://tynerblain.com/blog/2006/04/04/learn-to-fly-with-software-process-automation/#comments</comments>
		<pubDate>Wed, 05 Apr 2006 04:49:18 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Process Improvement]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[blackbox test automation]]></category>
		<category><![CDATA[blackbox testing]]></category>
		<category><![CDATA[build automation]]></category>
		<category><![CDATA[cmm]]></category>
		<category><![CDATA[CMMI]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[process automation]]></category>
		<category><![CDATA[software development process]]></category>
		<category><![CDATA[whitebox test automation]]></category>
		<category><![CDATA[whitebox testing]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2006/04/04/learn-to-fly-with-software-process-automation/</guid>
		<description><![CDATA[We can reach the next step in our software process evolution by automating much of our process.  Flying squirrels evolved a technique* to quickly move from one tree to another without all the tedious climbing and dangerous running.  Software teams that automate their processes achieve similar benefits.  Automation allows us to increase efficiency while improving quality.  And we spend less time on tedious and mundane tasks. ]]></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%252F04%252F04%252Flearn-to-fly-with-software-process-automation%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Learn%20to%20Fly%20with%20Software%20Process%20Automation%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2006%2F04%2F04%2Flearn-to-fly-with-software-process-automation%2F", "style": "big", "title": "Learn to Fly with Software Process Automation" });</script></div>
<p><img alt="flying squirrel" title="flying squirrel" src="http://sehlhorst.smugmug.com/photos/63013027-M.jpg" /></p>
<p>We can reach the next step in our <a title="The code freeze is killing the dinosaur" href="http://tynerblain.com/blog/2006/03/01/the-code-freeze-is-killing-the-dinosaurs/">software process evolution</a> by automating much of our process.  Flying squirrels evolved a technique* to quickly move from one tree to another without all the tedious climbing and dangerous running.  Software teams that automate their processes achieve similar benefits.  Automation allows us to increase efficiency while improving quality.  And we spend less time on tedious and mundane tasks.</p>
<p><strong>Benefits of process automation</strong></p>
<p>Tim Kitchens has <a title="Automating Software Development Processes" href="http://www.developerdotstar.com/mag/articles/automate_software_process.html">a great article at developer.*</a> where he highlights the benefits of process automation.  Here are our thoughts on the benefits he lists:</p>
<ul>
<li><strong>Repeatability</strong>.  The first step in debugging software is the isolation of variables.  A repeatable build process eliminates <em>many</em> variables, and likely many hours of wasted effort.</li>
<li><strong>Reliability</strong>.  A repeatable process eliminates the possibility of us introducing errors into our software by messing up a step in the build.</li>
<li><strong>Efficiency</strong>.  An automated task is faster than a manual task.</li>
<li><strong>Testing</strong>.  Reductions in overhead of building and testing allow us to test more frequently.</li>
<li><strong>Versioning</strong>.  The scripts that drive our build process are essentially self-documenting process documents.  And tracking versions of the scripts provides us with precise records of the process used for prior builds.  This documentation, and re-use of it can reduce the cost of <a title="Introduction to CMMI" href="http://tynerblain.com/blog/2006/03/10/foundation-series-cmmi-levels-explained/">running our projects at any CMMI level</a>.</li>
<li><strong>Leverage</strong>.   We get much more efficient use of our experts&#8217; time &#8211; they spend less effort on <em>turn-the-crank</em> processes and more effort on writing great software.</li>
</ul>
<p><strong>What and when should we automate?</strong></p>
<p>The short answer is <em>automate everything, unless there&#8217;s not enough <a title="Definition of ROI" href="http://tynerblain.com/blog/2006/02/01/definition-of-roi-return-on-investment/">ROI</a></em>.  We have to examine each process that we use to make a final decision &#8211; some automation will not make sense due to uncommon situations.  Also, if we&#8217;re nearing the end of an existing project, there is less time to enjoy the benefits of automation, so we may not be able to justify the costs.  We may be under pressure to deliver ROI in a <a title="Definition of payback period" href="http://tynerblain.com/blog/2006/03/19/definition-of-payback-period/">short payback period</a>.  We would suggest exploring the automation of the following activities:</p>
<p><strong>Automate the build process</strong></p>
<p>Most people underestimate the benefits of an automated build.  The obvious benefit is time savings during the normal build cycle.  Imagine the build takes an hour, happens monthly, and usually happens twice per month.  Two hours per month doesn&#8217;t seem like a lot of savings.  However, chasing down a bug caused by the build process is at best expensive, and at worst nightmarishly expensive (because we aren&#8217;t looking in the right place to find the problem).  Use an estimate of the probability of this happening to the <a title="Definition of expected value" href="http://tynerblain.com/blog/2006/02/03/definition-of-expected-value/">expected value calculation</a> for the savings.</p>
<p>The largest <em>potential</em> benefit of an automated build is changing the way we support our customers.  Monthly builds aren&#8217;t scheduled because the business only wants updates once per month.  They are scheduled at a monthly rate because that&#8217;s a balance someone has achieved between the cost-of-delivering and the cost-of-delaying a delivery.  When we automate our delivery process, we dramatically reduce the cost of delivery, and can explore more frequent release schedules.</p>
<p><strong>Automate unit testing</strong></p>
<p>We significantly improve the efficiency of our team at delivering by shortening the feedback loop for developers.  On a Utopian dev team, we would run our test suite as often as we compiled our code.  Realistically, developers should run <em>relevant</em> automated <a title="Introduction to blackbox and whitebox testing" href="http://tynerblain.com/blog/2006/01/12/foundation-series-black-box-and-white-box-software-testing/">whitebox tests</a> every time they compile.  They should run the suite of whitebox tests every time they promote code.  And an automated process should run the full suite against the latest tip on a nightly basis (to catch oversights).  It would be great if the check-in process initiated an automated test run and only allowed a promotion if all the tests passed.</p>
<p><strong>Automate system and functional testing</strong></p>
<p>End to end and blackbox tests should be automated next.  These are the big picture tests, and should be run nightly on a dedicated box against the latest code base.  We&#8217;ve had the most success with teams that used a nightly testing process, which sent an email with test results to the entire team whenever results changed.  We&#8217;ve had the pleasure of working with a team that included performance testing on the nightly runs, and reported statistically significant improvement or degradation of performance.</p>
<p><strong>Documentation</strong></p>
<p>Generate <a title="Strategic and tactical communication" href="http://tynerblain.com/blog/2006/04/03/targeted-communication-three-tips/"><em>tactical documentation</em></a> whenever possible.  Use javadoc or the equivalent to automatically generate well formatted and organized reference materials for future developers.</p>
<p><strong>Marginally relevant reporting</strong></p>
<p>If our team is asked to report metrics like lines of code, cyclomatic complexity, code coverage, etc.  We should automate this.  This work is the definition of tedium, while presenting tenuous value to the manager who requested it.  If we can&#8217;t convince someone that they don&#8217;t want this data, we should at least eliminate the pain of creating it.</p>
<p>Code coverage statistics can provide <em>better than nothing</em> insight into how much testing is being done, or how much functionality is exercised by the test suite.  But code coverage metrics have the danger of false precision.  There&#8217;s no way to say that a project with 90% code coverage has higher quality than a project with 80% coverage.</p>
<p><strong>Conclusion</strong></p>
<p>Automation makes sense.  We save time, increase quality, and ensure a more robust process.  We also spend less time on <em>turn-the-crank</em> activities and more time creating differentiated software.</p>
<p><em>*Technically, they don&#8217;t fly &#8211; they fall.  With style.</em></p>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+Learn+to+Fly+with+Software+Process+Automation+http%3A%2F%2Fbit.ly%2FiblKDE+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/04/04/learn-to-fly-with-software-process-automation/&amp;t=Learn+to+Fly+with+Software+Process+Automation" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/04/04/learn-to-fly-with-software-process-automation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Software testing series: Pairwise testing</title>
		<link>http://tynerblain.com/blog/2006/03/18/software-testing-series-pairwise-testing/</link>
		<comments>http://tynerblain.com/blog/2006/03/18/software-testing-series-pairwise-testing/#comments</comments>
		<pubDate>Sun, 19 Mar 2006 03:19:51 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Foundation series]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[blackbox]]></category>
		<category><![CDATA[blackbox testing]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[pairwise]]></category>
		<category><![CDATA[pairwise test]]></category>
		<category><![CDATA[pairwise testing]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2006/03/18/software-testing-series-pairwise-testing/</guid>
		<description><![CDATA[Very large and complex systems can be very difficult and expensive to test. Often, we inherit legacy systems with multiple man-years of development effort already in place, in the field and of unknown quality. With these systems, there are frequently huge gaps in the requirements documentation. Pairwise testing provides a way to test these large, existing systems. And on many projects, we're called in because there is a quality problem.]]></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%252F03%252F18%252Fsoftware-testing-series-pairwise-testing%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Software%20testing%20series%3A%20Pairwise%20testing%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2006%2F03%2F18%2Fsoftware-testing-series-pairwise-testing%2F", "style": "big", "title": "Software testing series: Pairwise testing" });</script></div>
<p><img alt="testing equipment" title="testing equipment" src="http://sehlhorst.smugmug.com/photos/53239416-M.jpg" /><br />
<strong>Before we explain pairwise testing, let&#8217;s describe the problem it solves<br />
</strong></p>
<p>Very large and complex systems can be very difficult and expensive to test. We inherit legacy systems with multiple man-years of development effort already in place.  These systems are in the field and of unknown quality.  With these systems, there are frequently huge gaps in the requirements documentation. Pairwise testing provides a way to test these large, existing systems.  And on many projects, we&#8217;re called in because there is a quality problem.</p>
<p>We are faced with the challenge of quickly improving, or at least quickly demonstrating momentum and improvement in the quality of this existing software.  We may not have the time to go re-gather the requirements, document them, and validate them through testing before our sponsor pulls the plug (or gets fired).  We&#8217;re therefore faced with the need to approach the problem with <a title="Foundation series: Introduction to blackbox and whitebox testing" href="http://tynerblain.com/blog/2006/01/12/foundation-series-black-box-and-white-box-software-testing/">blackbox (or black box) testing techniques</a>.</p>
<p>For a complex system, the amount of testing required can be overwhelming.  Imaging a product with 20 controls in the user interface, each of which has 5 possible values.  We would have to test 5^20 different combinations (95,367,431,640,625) to cover every possible set of user inputs.</p>
<p><strong>The power of pairwise</strong></p>
<p>With pairwise programming, we can achieve on the order of 90% coverage of our code in this example with 54 tests!  The exact amount of coverage will vary from application to application, but analysis consistently puts the value in the neighborhood of 90%.  The following are some results from <a title="Effectiveness of pairwise" href="http://pairwise.org/results.asp">pairwise.org</a>.</p>
<blockquote><p>We measured the coverage of combinatorial design test sets for 10 Unix commands: basename, cb, comm, crypt, sleep, sort, touch, tty, uniq, and wc. […] The pairwise tests gave over 90 percent block coverage.</p></blockquote>
<blockquote><p>Our initial trial of this was on a subset Nortel&#8217;s internal e-mail system where we able cover 97% of branches with less than 100 valid and invalid testcases, as opposed to 27 trillion exhaustive testcases.</p></blockquote>
<blockquote><p>[…] a set of 29 pair-wise AETG tests gave 90% block coverage for the UNIX sort command. We also compared pair-wise testing with random input testing and found that pair-wise testing gave better coverage.</p></blockquote>
<p>Got our attention!</p>
<p><strong>How does pairwise testing work?</strong></p>
<p>Pairwise testing builds upon an understanding of the way bugs manifest in software.  Usually, a bug is caused not by a single variable causing a bug, but by the unique combination of two variables causing a bug.  For example, imagine a control that calculates and displays shipping charges in an eCommerce website.  The website also calculates taxes for shipped products (when there is a store in the same state as the recipient, sales taxes are charged, otherwise, they are not).  Both controls were implemented and tested and work great.  However, when shipping to a customer in a state that charges taxes, the shipping calculation is incorrect.  It is the interplay of the two variables that causes the bug to manifest.</p>
<p>If we test every unique combination of every pair of variables in the application, we will uncover all of these bugs.  Studies have shown that the overwhelming majority of bugs are caused by the interplay of two variables.  We can increase the number of combinations to look at every three, four, or more variables as well &#8211; this is called N-wise testing.  Pairwise testing is N-wise testing where N=2.</p>
<p><strong>How do we determine the set of tests to run?</strong></p>
<p>There are several commercial and free software packages that will calculate the required pairwise test suite for a given set of variables, and some that will calculate N-wise tests as well.  Our favorite is a public domain (free) <a title="jenny homepage" href="http://burtleburtle.net/bob/math/jenny.html">software package called <em>jenny</em></a>, written by Bob Jenkins.  <em>jenny</em> will calculate N-wise test suites, and its default mode is to calculate pairwise tests.  <em>jenny</em> is a command line tool, written in C, and is very easy to use.  To calculate the pairwise tests for our example (20 controls, each with 5 possible inputs), we simply type the following:</p>
<blockquote><p>jenny 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 > output.txt</p></blockquote>
<p>And <em>jenny</em> generates results that look like the following:</p>
<blockquote><p>1a 2d 3c 4d 5c 6b 7c 8c 9a 10c 11b 12e 13b 14d 15a 16c 17a 18d 19a 20e<br />
1b 2e 3a 4a 5d 6c 7b 8e 9d 10a 11e 12d 13c 14c 15c 16e 17c 18a 19d 20d<br />
1c 2b 3e 4b 5e 6a 7a 8d 9e 10d 11d 12a 13e 14e 15b 16b 17e 18e 19b 20c<br />
1d 2a 3d 4c 5a 6d 7d 8b 9b 10e 11c 12b 13d 14b 15d 16d 17d 18b 19e 20a<br />
1e 2c 3b 4e 5b 6e 7e 8a 9c 10b 11a 12c 13a 14a 15e 16a 17b 18c 19c 20b<br />
1a 2a 3c 4e 5e 6a 7b 8c 9d 10b 11b 12b 13e 14a 15d 16d 17c 18c 19b 20d [...]</p></blockquote>
<p>Where the numbers represent each of the 20 controls, and the letters represent each of the five possible selections.</p>
<p>What&#8217;s the catch?</p>
<p>There are two obvious catches.  First, when you use a tool like <em>jenny</em>, we must run all of the tests that it identifies, we can&#8217;t pick and choose.  Second, pairwise testing doesn&#8217;t find everything.  What if our example bug before about taxes and shipping only manifested when the user is a first time customer?  Pairwise testing would not catch it.  We would need to use N-wise testing with N >= 3.  Our experience has been that N=3 is effective for almost all bugs.</p>
<p>There is also a sneaky catch &#8211; test generators like <em>jenny</em> assume that the order of variables is irrelevant.  Sometimes we are testing dynamic user interfaces, where the order of value selection in controls is relevant.  There is a solution to this, and we will update this post with a link to that solution when it is available.</p>
<p>- &#8211; -</p>
<p>Check out the <a title="Software testing series index" href="http://tynerblain.com/blog/software-testing-series-index/">index of  <em>software testing series posts</em></a> for more testing articles.</p>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+Software+testing+series%3A+Pairwise+testing+http%3A%2F%2Fbit.ly%2FhcFmmI+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/03/18/software-testing-series-pairwise-testing/&amp;t=Software+testing+series%3A+Pairwise+testing" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/03/18/software-testing-series-pairwise-testing/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Measuring the Cost of Quality: Software Testing Series</title>
		<link>http://tynerblain.com/blog/2006/02/22/software-testing-series-measuring-the-cost-of-quality/</link>
		<comments>http://tynerblain.com/blog/2006/02/22/software-testing-series-measuring-the-cost-of-quality/#comments</comments>
		<pubDate>Wed, 22 Feb 2006 15:04:56 +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[blackbox]]></category>
		<category><![CDATA[blackbox tests]]></category>
		<category><![CDATA[cost of quality]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[measuring cost of quality]]></category>
		<category><![CDATA[measuring quality]]></category>
		<category><![CDATA[software development process]]></category>
		<category><![CDATA[unit tests]]></category>
		<category><![CDATA[whitebox]]></category>
		<category><![CDATA[whitebox tests]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2006/02/22/software-testing-series-measuring-the-cost-of-quality/</guid>
		<description><![CDATA[Should we test our software? Should we test it more?

The answer to the first question is almost invariably yes. The answer to the second question is usually "I don't know."

We write a lot about the importance of testing. We have several other posts in our series on software testing. How do we know when we should do more automated testing?]]></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%252F02%252F22%252Fsoftware-testing-series-measuring-the-cost-of-quality%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Measuring%20the%20Cost%20of%20Quality%3A%20Software%20Testing%20Series%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2006%2F02%2F22%2Fsoftware-testing-series-measuring-the-cost-of-quality%2F", "style": "big", "title": "Measuring the Cost of Quality: Software Testing Series" });</script></div>
<p><img alt="scale" title="scale" src="http://sehlhorst.smugmug.com/photos/57286907-M.jpg" /></p>
<p><strong>Should we test our software?  Should we test it more?</strong></p>
<p>The answer to the first question is almost invariably yes.  The answer to the second question is usually &#8220;I don&#8217;t know.&#8221;</p>
<p>We write a lot about the importance of testing.  We have several other posts in our <a title="Software testing series index" href="http://tynerblain.com/blog/software-testing-series-index/">series on software testing</a>.  How do we know when we should do more automated testing?</p>
<p>Determining the costs is an <a title="Definition of ROI" href="http://tynerblain.com/blog/2006/02/01/definition-of-roi-return-on-investment/">ROI analysis</a>. Kent Beck has a great position -</p>
<blockquote><p>If testing costs more than not testing, then don&#8217;t test.</p></blockquote>
<p>At first glance, the statement sounds trite, but it really is the right answer.  If we don&#8217;t increase our profits by adding more testing, we shouldn&#8217;t do it.  Kent is suggesting that we only increase the costs and overhead of testing to the point that there are offsetting benefits.</p>
<p>We need to compare the costs and benefits on both sides of the equation. We&#8217;ll start with a baseline of the status quo (keeping our current level of testing), and identify the benefits and costs of additional testing, relative to our current levels.</p>
<p><strong>We should do more automated testing when the benefits outweigh the costs</strong></p>
<p>We&#8217;ll limit our analysis to increasing the amount of automated testing, and exclude manual testing from our analysis. We will use the assumption that more testing now will reduce the number of introduced bugs in the future.   This assumption will only hold true when developers have the ability to run the automated tests as part of their personal development process.  We&#8217;ve written before about the <a title="Where bugs come from in the software development process" href="http://tynerblain.com/blog/2006/01/22/where-bugs-come-from/">sources of bugs in the software development process</a>, and in other posts in this <a title="Software testing series" href="http://tynerblain.com/blog/software-testing-series-index/">series</a> we show how automated testing can prevent future bugs (unlike manual testing, which can only identify current bugs).</p>
<p>We are also assuming that developers are running whitebox unit tests and the testing team is running blackbox tests.  We don&#8217;t believe that has an impact on this analysis, but it may be skewing our perspective.</p>
<p><strong>Benefits</strong></p>
<ul>
<li><strong>Reduced costs of bugs in the field.</strong>  Bugs in the field can cause us to have &#8220;emergency releases&#8221; to fix them.  They can increase the costs of (internal teams) using our software and working around the bugs.  They can cause delayed sales.  Bugs cause lost customers.</li>
<li><strong>Reduced costs of catching future bugs</strong>.  When developers can run a regression suite to validate that their code didn&#8217;t break anything <em>before</em> asking the testing team to test it, they can prevent introducing regression bugs.  And thereby prevent the costs of finding, triaging, and managing those bugs.</li>
<li><strong>Reduced costs of developing around existing bugs.</strong>  Developers can debug new code faster when they can isolate it&#8217;s effects from other (buggy) code.</li>
<li><strong>Reduced costs of testing around existing bugs.</strong>  There is a saying &#8211; &#8220;What&#8217;s the bug behind the bug?&#8221; we&#8217;ve heard when testers are trying to validate a release.  A bug is discovered, and the slack time in the schedule is used fixing that bug &#8211; then the code is resubmitted to test to confirm that the bug was fixed.  Another bug was hiding behind it, and untestable because the first bug obfuscated the second bug.  Addressing the second bug introduces unplanned testing costs.  Preventing the first bug will reduce the costs of testing the latent bug.</li>
</ul>
<p><strong>Costs</strong></p>
<p>Most of these increased costs are easy to measure once they are identified &#8211; they are straightforward tasks that can be measured as labor costs.<strong><br />
</strong></p>
<ul>
<li><strong>Cost of time spent creating additional tests.</strong></li>
<li><strong>Cost of time spent waiting for test results.</strong></li>
<li><strong>Cost of time spent analyzing test results.</strong></li>
<li><strong>Cost of time spent fixing discovered bugs.</strong></li>
<li><strong>Cost of incremental testing infrastructure</strong>.  If we are in a situation where we <em>have to</em> increase our level of assets dedicated to testing (new server, database license, testing software licenses, etc) in order to increase the amount of automated testing, then this cost should be captured.</li>
</ul>
<p><strong>Conclusion<br />
</strong><br />
This is a good framework for making the decision to increase automated testing.  By focusing on the efficiencies of our testing approaches and tools, we can reduce the costs of automated testing.  This ultimately allows us to do more automated testing &#8211; shifting the pareto optimal point such that we can increase our incremental benefits by reducing our incremental costs.</p>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+Measuring+the+Cost+of+Quality%3A+Software+Testing+Series+http%3A%2F%2Fbit.ly%2FexSRdQ+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/02/22/software-testing-series-measuring-the-cost-of-quality/&amp;t=Measuring+the+Cost+of+Quality%3A+Software+Testing+Series" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/02/22/software-testing-series-measuring-the-cost-of-quality/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Software development process example</title>
		<link>http://tynerblain.com/blog/2006/02/20/software-development-process-example/</link>
		<comments>http://tynerblain.com/blog/2006/02/20/software-development-process-example/#comments</comments>
		<pubDate>Mon, 20 Feb 2006 12:21:16 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Process Improvement]]></category>
		<category><![CDATA[Requirements]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Software requirements specification]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[UX]]></category>
		<category><![CDATA[Use Cases]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[MRD]]></category>
		<category><![CDATA[MRD to PRD]]></category>
		<category><![CDATA[PRD]]></category>
		<category><![CDATA[requirements elicitation]]></category>
		<category><![CDATA[software development process]]></category>
		<category><![CDATA[software process]]></category>
		<category><![CDATA[use cases]]></category>
		<category><![CDATA[writing requirements]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2006/02/20/software-development-process-example/</guid>
		<description><![CDATA[We've presented an example of the software development process across several posts over the last two weeks. In this post we tie them all together, showing the steps in process order.]]></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%252F02%252F20%252Fsoftware-development-process-example%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Software%20development%20process%20example%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2006%2F02%2F20%2Fsoftware-development-process-example%2F", "style": "big", "title": "Software development process example" });</script></div>
<p><img alt="double figure eight knot" title="double figure eight knot" src="http://sehlhorst.smugmug.com/photos/56946278-M.jpg" /></p>
<p>We&#8217;ve presented an example of the software development process across several posts over the last two weeks.  In this post we tie them all together, showing the steps in process order.</p>
<ol>
<li><a title="Tagging as a technology" href="http://tynerblain.com/blog/2006/02/06/software-testing-series-organizing-a-test-suite-with-tags-part-one/">A discussion of the concept of tagging</a>.  Context and background on tagging as a technology, with pros and cons.</li>
<li><a title="Organizing a test suite with tags part 2" href="http://tynerblain.com/blog/2006/02/08/software-testing-series-organizing-a-test-suite-with-tags-part-two/">The top five problems with test automation suites</a>.  We&#8217;ve talked repeatedly about how test automation suites are better than purely manual testing.  Here we look at the &#8220;second order&#8221; problems.  What are the main problems with unit test automation?  These represent our market requirements for the creation of a software product designed to improve unit test automation suite usage.</li>
<li><a title="Going from an MRD to a PRD" href="http://tynerblain.com/blog/2006/02/09/mrd-to-prd-requirements-conversion/">Converting from MRD requirements to PRD requirements</a>.  The ideation / triage process of determining which requirements should be addressed in software.</li>
<li><a title="Sample use cases" href="http://tynerblain.com/blog/2006/02/09/sample-use-case-examples/">Creating informal use cases to support our requirements</a>.  We define the use cases that support the high-level requirements.</li>
<li><a title="Writing functional requirements to support use cases" href="http://tynerblain.com/blog/2006/02/10/writing-functional-requirements-to-support-use-cases/">Writing functional requirements to support the use cases</a>.  With a user-centric approach to software development, it is imperative that we build out our functional requirements in the context of use cases &#8211; we keep our eye on the ball with this focus on the user.</li>
<li><a title="Design elements of an automated unit test framework with tags" href="http://tynerblain.com/blog/2006/02/18/software-testing-series-organizing-a-test-suite-with-tags-part-three/">Design elements that support our functional requirements</a>.  Without going into esoteric details about how to design test automation software, we discuss the elements of the design that relate to the application of tagging to addressing some of the larger market opportunities.</li>
<li><a title="Iterating on requirements and prototyping" href="http://tynerblain.com/blog/2006/02/21/software-requirements-specification-iteration-and-prototyping/">Iterating and prototyping</a>.  We show the iterative process from PRD to design to users and back again.   [Update 21 Feb - added this step.  Thanks again, Deepak]</li>
</ol>
<p>Let us know if you&#8217;d like to see a discussion of any of these or other steps in more detail by leaving a comment on this post.  Thanks in advance!</p>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+Software+development+process+example+http%3A%2F%2Fbit.ly%2FhIsAfX+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/02/20/software-development-process-example/&amp;t=Software+development+process+example" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/02/20/software-development-process-example/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Software Testing Series: Organizing a Test Suite with Tags Part Three</title>
		<link>http://tynerblain.com/blog/2006/02/18/software-testing-series-organizing-a-test-suite-with-tags-part-three/</link>
		<comments>http://tynerblain.com/blog/2006/02/18/software-testing-series-organizing-a-test-suite-with-tags-part-three/#comments</comments>
		<pubDate>Sun, 19 Feb 2006 04:08:58 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Process Improvement]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[managing data]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2006/02/18/software-testing-series-organizing-a-test-suite-with-tags-part-three/</guid>
		<description><![CDATA[This is the third in a three-part post about using tags as a means to organize an automated unit test suite.

Part 3 of this post can be read as a standalone article. If it were, it would be titled Design elements of an automated unit test framework using tags. If you're only reading this post and not parts 1 and 2, pretend that this is the title.]]></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%252F02%252F18%252Fsoftware-testing-series-organizing-a-test-suite-with-tags-part-three%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Software%20Testing%20Series%3A%20Organizing%20a%20Test%20Suite%20with%20Tags%20Part%20Three%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2006%2F02%2F18%2Fsoftware-testing-series-organizing-a-test-suite-with-tags-part-three%2F", "style": "big", "title": "Software Testing Series: Organizing a Test Suite with Tags Part Three" });</script></div>
<p><img alt="organizing into bins" title="organizing into bins" src="http://sehlhorst.smugmug.com/photos/49901557-M.jpg" /></p>
<p><strong>Organizing a test suite with tags (part 3)</strong></p>
<p>This is the third in a three-part post about using tags as a means to organize an automated unit test suite.</p>
<p>Part 3 of this post can be read as a standalone article.  If it were, it would be titled <strong><em>Design elements of an automated unit test framework using tags</em></strong>.  If you&#8217;re only reading this post and not parts 1 and 2, pretend that this is the title.</p>
<ul>
<li><a title="Organizing a test suite with tags part 1" href="http://tynerblain.com/blog/2006/02/06/software-testing-series-organizing-a-test-suite-with-tags-part-one/">In part one of this post</a> we developed an understanding of tagging as a technology, including its pros and cons.</li>
<li><a title="Organizing a test suite with tags part 2" href="http://tynerblain.com/blog/2006/02/08/software-testing-series-organizing-a-test-suite-with-tags-part-two/">In part two of this post</a> we defined the top five opportunities and problems inherent in the organization of automated test suites.</li>
<li>In part three of this post we will consider the key design associated with using tags as a mechanism for organization.</li>
</ul>
<p><strong>Setting expectations</strong></p>
<p>We designed a custom unit test automation system based on the use of tags to organize automated tests for a client.  That system isn&#8217;t the subject of this post, but it did provide us with context and insight into the problem we&#8217;ve addressed.  In this post we won&#8217;t be presenting a completed design &#8211; there are many good tools out there already for automating unit tests.  We will be talking about a subset of the design decisions that are associated with the use of tags as a mechanism to organize the unit testing within the suite.  In <a title="Creating a unit testing tool" href="http://tynerblain.com/blog/2005/12/16/marc-clifton%e2%80%99s-advanced-unit-testing-articles/">Marc Clifton&#8217;s advanced unit testing articles</a>, he walks readers through the creation of a test automation tool for C#.  The concepts presented here can be incorporated into a design relatively easily, but the details of doing that are a little too off-topic for most of our readers.</p>
<p>We are writing about designing software that tests other software.  To keep our language consistent and easy to follow in this post, we will use two terms.  <em>Tool</em> represents the test automation software that we are designing.  <em>Application</em> represents software being tested with the tool, or more specifically, with tests maintained within the tool.</p>
<p><strong>Design approach</strong></p>
<p>After identifying the use cases and functional requirements for the tool, we began iterating on screen designs, business (requirement) object models and architectural (implementation) object models.  We created an object oriented analysis (OOA) diagram to represent the concept concisely.<br />
<strong>OOA diagram</strong></p>
<p><img title="OOA diagram" alt="OOA diagram" src="http://sehlhorst.smugmug.com/photos/56694465-M.png" /></p>
<p>An <a title="Object oriented requirements" href="http://tynerblain.com/blog/2005/12/09/a-picture-is-worth-a-thousand-requirements/">object oriented analysis diagram</a> of the key relationships between scripts, inspections and tags.<br />
A script is the embodiment of a user session in the application &#8211; it represents a set of actions that a user of the application would take.  The user of the tool will create a script (as a separate file), and will create a reference to that script in the tool.</p>
<p>An inspection is an unit test of the application.  The inspection evaluates a particular condition or makes a specific assertion about the state of the application (a properly filled out order is submitted when the user clicks &#8220;submit&#8221;) .  The code that executes that inspection is represented outside of the tool.  The user of the tool will create a reference to the inspection within the tool.</p>
<p>Inspections can be associated explicitly with any number of scripts (including none).  An association between inspection 1 and script A is an instruction to the tool to run script A within the application, and evaluate inspection 1 against the script.</p>
<p>The processing of scripts and inspections is outside the scope of this document, but is covered in many other references, including <a title="Marc Clifton links" href="http://tynerblain.com/blog/2005/12/16/marc-clifton%e2%80%99s-advanced-unit-testing-articles/">Marc Clifton&#8217;s</a>.</p>
<p>Any number of tags can be associated with each script.  Tags could be used to represent different user actions (like deleting items from a shopping cart), different specific selections (user adds 1000 of an item to the shopping cart), different situations (shipping address does not match billing address), or any other relevant descriptor of the user session.  A single script could have multiple tags.</p>
<p>Each inspection can be transitively associated with a set of scripts by explicitly associating it with one or more tags.  By associating an inspection with a tag, we are instructing the tool to dynamically associate the inspection with all scripts that are associated with all of the identified tags.  There are two benefits to this approach.  First, this approach reduces the amount of time that a user of the tool must spend to associate an inspection with a set of relevant existing scripts.  Second, this indirect mapping is utilized to assure that an inspection that is mapped to a tag will also <em>automatically</em> become associated with any future scripts that are added &#8211; as long as they have associations with the same tag or tags as the script.  This reduces the cost of creating future mappings when scripts are added to the suite in the future.</p>
<p>We expect this design approach to provide significant labor savings in maintaining a test suite.  We built our business case for this project upon that assumption.  We also expect that this design approach will result in better testing coverage of the application by users of the tool.  We did not incorporate that expectation into our cost benefit analysis when calculating the <a title="Definition of ROI" href="http://tynerblain.com/blog/2006/02/01/definition-of-roi-return-on-investment/">ROI</a> of this project.</p>
<p><strong> Followup</strong></p>
<p>We will follow-up some months from now when we can evaluate data and draw conclusions from use of a tool built along similar lines for a client.  Until then, we have confidence that it will work very well, but no tangible data.</p>
<p><strong>Summary</strong></p>
<ul>
<li><a title="Organizing a test suite with tags part 1" href="http://tynerblain.com/blog/2006/02/06/software-testing-series-organizing-a-test-suite-with-tags-part-one/">In part one of this post</a> we developed an understanding of tagging as a technology, including its pros and cons.</li>
<li><a title="Organizing a test suite with tags part 2" href="http://tynerblain.com/blog/2006/02/08/software-testing-series-organizing-a-test-suite-with-tags-part-two/">In part two of this post</a> we defined the top five opportunities and problems inherent in the organization of automated test suites.</li>
<li>In part three of this post we considered the key design elements associated with using tags as a mechanism for organization.</li>
</ul>
<p>- &#8211; -Check out the <a title="Software testing series index" href="http://tynerblain.com/blog/software-testing-series-index/">index of <em>software testing series posts</em></a> for more articles.</p>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+Software+Testing+Series%3A+Organizing+a+Test+Suite+with+Tags+Part+Three+http%3A%2F%2Fbit.ly%2FgUddSO+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/02/18/software-testing-series-organizing-a-test-suite-with-tags-part-three/&amp;t=Software+Testing+Series%3A+Organizing+a+Test+Suite+with+Tags+Part+Three" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/02/18/software-testing-series-organizing-a-test-suite-with-tags-part-three/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sample Use Case Examples</title>
		<link>http://tynerblain.com/blog/2006/02/09/sample-use-case-examples/</link>
		<comments>http://tynerblain.com/blog/2006/02/09/sample-use-case-examples/#comments</comments>
		<pubDate>Fri, 10 Feb 2006 00:03:43 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Requirements]]></category>
		<category><![CDATA[Requirements Models]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Use Cases]]></category>
		<category><![CDATA[example use cases]]></category>
		<category><![CDATA[informal use case]]></category>
		<category><![CDATA[informal use cases]]></category>
		<category><![CDATA[iterative development]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[sample informal use case]]></category>
		<category><![CDATA[sample use case]]></category>
		<category><![CDATA[sample use cases]]></category>
		<category><![CDATA[software development process]]></category>
		<category><![CDATA[structured requirements]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2006/02/09/sample-use-case-examples/</guid>
		<description><![CDATA[We talked about informal use cases a while ago in our use case series.  Over a series of posts, we are demonstrating the process of defining a software product.  The next step, and subject of this post, is the creation of informal use cases to support the defined goals for the software.]]></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%252F02%252F09%252Fsample-use-case-examples%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Sample%20Use%20Case%20Examples%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2006%2F02%2F09%2Fsample-use-case-examples%2F", "style": "big", "title": "Sample Use Case Examples" });</script></div>
<p><img title="glasses" alt="glasses" src="http://sehlhorst.smugmug.com/photos/55675798-M.jpg" /></p>
<h2>Sample informal use case examples</h2>
<p>We talked about <a title="Informal use cases" href="http://tynerblain.com/blog/2005/12/21/use-case-series-informal-use-case/">informal use cases</a> a while ago in our <a title="Use case series introduction" href="http://tynerblain.com/blog/2005/12/18/use-case-series-introduction/">use case series</a>.  Over a series of posts, we are demonstrating the process of defining a software product.  The next step, and subject of this post, is the creation of informal use cases to support the defined goals for the software.</p>
<p>In <a title="Defining the project's market requirements" href="http://tynerblain.com/blog/2006/02/08/software-testing-series-organizing-a-test-suite-with-tags-part-two/">part two of our post on using tags to organize automated tests</a>, we identified several <em>market</em> requirements, and identified the ones that we would incorporate as software requirements.</p>
<p>These then become our goals in <a title="Converting from marketing requirements to product requirements" href="http://tynerblain.com/blog/2006/02/09/mrd-to-prd-requirements-conversion/"><em>MRD to PRD requirements conversion</em></a>- and in this post, we will show how we can create informal use cases to support those goals (aka high level requirements).</p>
<h2>Where do use cases belong?</h2>
<p>In our <a title="Introduction to structured requirements" href="http://tynerblain.com/blog/2006/01/04/foundation-series-structured-requirements/">introduction to structured requirements</a>, we showed a basic model for describing requirements.  Once goals are identified, we articulate the use cases that enable those goals.</p>
<p><img title="Structured requirements diagram" alt="Structured requirements diagram" src="http://sehlhorst.smugmug.com/photos/51104388-M.jpg" /></p>
<p><strong>Our product requirements (goals) were defined to be<br />
</strong></p>
<ol>
<li>Minimize time spent identifying broken and obsolete scripts.</li>
<li>Minimize time spent removing obsolete scripts from the suite.</li>
<li>Minimize the time spent managing the mapping of inspections to scripts.</li>
</ol>
<h2>The first step in creating informal use cases</h2>
<p>The easiest way to start writing the use cases is to write the names of the use cases.  Just write out the names (on paper, whiteboard, one-note &#8211; whatever works for you), using semi-descriptive prose.  For example, for the third goal, we could identify the following two use cases.</p>
<ul>
<li>Developer adds a new script and maps to existing inspections</li>
<li>Developer adds a new inspection and maps to existing scripts</li>
</ul>
<p>Notice that in the names we have an actor and an action &#8211; this is a good consistent naming convention that makes it easy to understand exactly what we&#8217;re talking about.  Now we can write the <a title="Reminder of informal use case structure" href="http://tynerblain.com/blog/2005/12/21/use-case-series-informal-use-case/">informal use case</a> details for each of these.</p>
<blockquote><p><strong>Developer adds a new script and maps to existing inspections</strong></p>
<p>The developer&#8217;s goal is to add her recently created script to the suite and associate it with a set of specific inspections, producing a set of test outputs.  She may already have a set of inspections that she knows she wants to associate with the script.  She is also opportunistic about leveraging other existing scripts to create new tests when they are relevant.  She creates a reference to the script in the test framework.  She then identifies the set of inspections that she wants to associate with the script and creates the associations.   She reviews the set of associations, and either needs to change the set of associations, or is satisfied with the mappings.  If she needs to add or remove some of her newly created mappings, she will identify the inspections that are to be modified and create those associations as well.</p></blockquote>
<blockquote><p><strong>Developer adds a new inspection and maps to existing scripts</strong></p>
<p>The developer&#8217;s goal is to add his recently created inspection to the suite and associate it with a set of existing scripts, producing a set of test outputs.  He already knows, generally, what types of scripts he wants to map his inspection to.  He does not have a specific set of scripts in mind for the mapping.  The developer creates a reference to the inspection in the test framework.  Then he reviews the existing scripts, and identifies the scripts to be mapped to his new inspection and creates the associations.  He reviews the set of associations and either decides that he has too many, too few, or has the right amount.  If he needs to modify the associations he does so and re-reviews, repeating until satisfied.</p></blockquote>
<h2>Two things to note about the process of creating the informal use cases above:</h2>
<ol>
<li>This is very fast &#8211; these took about 10 minutes each to create.  It is a very small amount of time that has to be invested prior to validating the use cases with the users.  During and after validation, these use cases can be modified, eliminated or replaced with other use cases.  Having something concrete with a minimum investment of time both helps drive good decisions and saves costs.</li>
<li>These use cases are the result of iteration.  We did not just type for ten minutes and move on.  While writing the second use case, we noticed that we were not handling the possibility that the developer would initially create <em>too many</em> associations and need to go back and remove some of them.  We updated both use cases to reflect this possibility.</li>
</ol>
<h2>More Example Use Cases</h2>
<p>We occasionally add other example use cases, usually focused on a particular element of use case writing.  Here are some that we&#8217;ve added since this article was originally published:</p>
<ul>
<li><a title="Use Case Precondition example samples" href="http://tynerblain.com/blog/2007/03/08/use-case-preconditions-and-triggers/">How To Write Use Case Preconditions and Triggers</a></li>
<li><a title="Subordinate Use Cases" href="http://tynerblain.com/blog/2006/11/27/subordinate-use-cases/">Subordinate and Super-ordinate Use Cases</a></li>
<li><a title="Writing Good Use Case Names" href="http://tynerblain.com/blog/2007/01/22/how-to-write-good-use-case-names/">How To Write Good Use Case Names</a></li>
<li><a title="A Complex Use Case Example" href="http://tynerblain.com/blog/2007/04/09/sample-use-case-example/">Sample Use Case Example</a></li>
<li><a title="Agile Use Case Names" href="http://tynerblain.com/blog/2007/04/23/apr-use-case-names/">APR: Use Case Names</a></li>
<li><a title="Agile Use Case Examples" href="http://tynerblain.com/blog/2007/04/24/apr-use-case-briefs/">APR: Use Case Briefs</a></li>
</ul>
<h2>Summary</h2>
<p><strong> </strong></p>
<p>Our next step is to validate these use cases with the actors identified in the use cases (developers).  Once that is complete, we will define the functional specs for the software that enable these use cases.</p>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+Sample+Use+Case+Examples+http%3A%2F%2Fbit.ly%2Fig7FpH+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/02/09/sample-use-case-examples/&amp;t=Sample+Use+Case+Examples" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/02/09/sample-use-case-examples/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Software Testing Series: Organizing a Test Suite with Tags Part Two</title>
		<link>http://tynerblain.com/blog/2006/02/08/software-testing-series-organizing-a-test-suite-with-tags-part-two/</link>
		<comments>http://tynerblain.com/blog/2006/02/08/software-testing-series-organizing-a-test-suite-with-tags-part-two/#comments</comments>
		<pubDate>Wed, 08 Feb 2006 13:46:41 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<category><![CDATA[Lists]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Software requirements specification]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[software testing]]></category>
		<category><![CDATA[test automation problems]]></category>
		<category><![CDATA[test maintenance]]></category>
		<category><![CDATA[test suite]]></category>
		<category><![CDATA[test suite problems]]></category>
		<category><![CDATA[unit testing software]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2006/02/08/software-testing-series-organizing-a-test-suite-with-tags-part-two/</guid>
		<description><![CDATA[This is the second in a three-part post about using tags as a means to organize an automated test suite.

Part 2 of this post can be read as a standalone article. If it were, it would be titled Top five problems with test automation suites. If you're only reading this post and not parts 1 and 3, pretend that this is the title.]]></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%252F02%252F08%252Fsoftware-testing-series-organizing-a-test-suite-with-tags-part-two%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Software%20Testing%20Series%3A%20Organizing%20a%20Test%20Suite%20with%20Tags%20Part%20Two%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2006%2F02%2F08%2Fsoftware-testing-series-organizing-a-test-suite-with-tags-part-two%2F", "style": "big", "title": "Software Testing Series: Organizing a Test Suite with Tags Part Two" });</script></div>
<p><img title="organized typesetting letters" alt="organized typesetting letters" src="http://sehlhorst.smugmug.com/photos/49901557-M.jpg" /></p>
<p><strong>Organizing a test suite with tags (part 2)</strong></p>
<p>This is the second in a three-part post about using tags as a means to organize an automated test suite.</p>
<p>Part 2 of this post can be read as a standalone article.  If it were, it would be titled <em><strong>Top five problems with test automation suites</strong></em>.  If you&#8217;re only reading this post and not parts 1 and 3, pretend that this is the title.</p>
<ul>
<li><a title="Organizing a test suite with tags part one" href="http://tynerblain.com/blog/2006/02/06/software-testing-series-organizing-a-test-suite-with-tags-part-one/">In part one of this post</a> we developed an understanding of tagging as a technology, including it&#8217;s pros and cons.</li>
<li>In part two of this post we will define the top five opportunities and problems inherent in the organization of automated test suites.</li>
<li>In <a title="Organizing a test suite with tags part 3" href="http://tynerblain.com/blog/2006/02/18/software-testing-series-organizing-a-test-suite-with-tags-part-three/">part three of this post</a> we will explore an approach to combining tagging with test suite organization.</li>
</ul>
<p><strong>What are the problem areas inherent in managing automated tests?</strong></p>
<p>We start with identification of the problems or opportunities, before defining what the requirements will be.  This is the same process we discussed in <a title="From MRD to PRD: The key to defining a spec" href="http://tynerblain.com/blog/2006/01/24/from-mrd-to-prd-the-key-to-defining-a-spec/"><em>From MRD to PRD</em></a>, applied to the test-automation space.  The following are the top five problem areas we can identify about test automation suites.</p>
<ol>
<li><strong>Maintaining the suite becomes too expensive.</strong>  Once we have a suite in place, we have to maintain it.  As the size of the suite grows, the amount of maintenance of existing test grows.  It grows in proportion to the number of tests in the suite and the rate of change of the underlying software being tested.  As the amount of maintenance grows, so does its expense.</li>
<li><strong>Developers will never start using the suite</strong>.  Change is bad.  Well, for many people it is.  Asking someone with a full time, salaried job to take on additional responsibilities has to be done correctly.  There is absolutely a risk that people won&#8217;t start using the suite.  Since this project is focusing on iterative development of an already deployed tool, already in use, this problem really doesn&#8217;t apply.</li>
<li><strong>Developers will stop using the suite.</strong>  Developers avoid tedium.  They&#8217;re smart.  They want to avoid unneccesary work, menial work, and irrelevant work.  If the developers perceive the test suite in any of these ways, we&#8217;re doomed &#8211; they will stop using it.</li>
<li><strong>Not testing the right stuff.</strong>  A test suite that doesn&#8217;t test the right areas of the software is worse than not having one at all &#8211; because it gives you a false sense of confidence.</li>
<li><strong>Test suite becomes less effective over time.</strong>  An initially effective suite can grow less effective over time as the underlying software changes.  Individual tests become irrelevant as they become impossible to reproduce with the application &#8211; perhaps the user interface has changed.  If test design was linked to the heaviest usage patterns, and those patterns change, then coverage of the new heavy usage parts of the suite will be reduced &#8211; and the effectiveness of the suite will be reduced.</li>
</ol>
<p><strong>Which problems should we address with software?</strong></p>
<p>With limited resources, we need to make sure that we focus our <em>software</em> efforts on those problems where software can have the most impact on solving the problem.  We&#8217;ll start by identifying</p>
<ol>
<li><strong>Maintaining the suite becomes too expensive.</strong>  There are three approaches to solving this problem &#8211; reduce the required maintenance, make the required maintenance more efficient, and reduce the cost of the labor that maintains the solution.  Labor cost reductions may very well be the most effective general way to solve this problem, but given the  <em>real world </em>project constraints for the project behind this post, we aren&#8217;t exploring that option.  This is a candidate for the software solution.</li>
<li><strong>Developers will never start using the suite.</strong>  Make them want to use it, or make them use it.  We believe you want to make them want to use it &#8211; both by evangelizing the benefits and by quickly crossing the <em><a title="Getting past the suck threshold" href="http://tynerblain.com/blog/2005/12/14/getting-past-the-suck-threshold/">suck threshold</a></em> so that users get positive feedback.  For this project, we have taken that approach, although it&#8217;s true that there is also a mandate from the dev team&#8217;s managers that we must make sure they use it.  With process and education approaches that have proven effective, this is not a target of the current software solution.</li>
<li><strong>Developers will stop using the suite.</strong>  The looming mandate will assure that developers won&#8217;t go AWOL on the suite.  But if they can present a compelling reason to their managers, there is a risk that they will decide to stop using it.  This is a candidate for the software solution.</li>
<li><strong>Not testing the right stuff. </strong> Test suite planning is a science unto itself.  We will keep in mind &#8220;ways to make test suite planning easier&#8221; as a candidate for the software solution, but we aren&#8217;t otherwise targeting this for the current software solution.</li>
<li><strong>Test suite becomes less effective over time.</strong>  Tests can grow irrelevant over time when the software they test is constantly changing (as in this project).  This problem has been addressed to a large extent by using <a title="Foundation series: Intro to whitebox testing" href="http://tynerblain.com/blog/2006/01/12/foundation-series-black-box-and-white-box-software-testing/">whitebox</a> <a title="Foundation series: Intro to unit testing" href="http://tynerblain.com/blog/2006/01/19/foundation-series-unit-testing-software/">unit tests</a> in the test suite.  We are not targeting this as part of the current software solution.</li>
</ol>
<p>Reminder</p>
<ul>
<li><a title="Organizing a test suite with tags part one" href="http://tynerblain.com/blog/2006/02/06/software-testing-series-organizing-a-test-suite-with-tags-part-one/">In part one of this post</a> we developed an understanding of tagging as a technology, including it&#8217;s pros and cons.</li>
<li>In part two of this post we defined the top five opportunities and problems inherent in the organization of automated test suites.</li>
<li>In <a title="Organizing a test suite with tags part 3" href="http://tynerblain.com/blog/2006/02/18/software-testing-series-organizing-a-test-suite-with-tags-part-three/">part three of this post</a> we will explore an approach to combining tagging with test suite organization.</li>
</ul>
<p>- &#8211; -</p>
<p>Check out the <a title="Software testing series index" href="http://tynerblain.com/blog/software-testing-series-index/">index of <em>software testing series posts</em></a> for more articles.</p>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+Software+Testing+Series%3A+Organizing+a+Test+Suite+with+Tags+Part+Two+http%3A%2F%2Fbit.ly%2FemBoLb+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/02/08/software-testing-series-organizing-a-test-suite-with-tags-part-two/&amp;t=Software+Testing+Series%3A+Organizing+a+Test+Suite+with+Tags+Part+Two" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/02/08/software-testing-series-organizing-a-test-suite-with-tags-part-two/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software Testing Series: Organizing a Test Suite with Tags Part One</title>
		<link>http://tynerblain.com/blog/2006/02/06/software-testing-series-organizing-a-test-suite-with-tags-part-one/</link>
		<comments>http://tynerblain.com/blog/2006/02/06/software-testing-series-organizing-a-test-suite-with-tags-part-one/#comments</comments>
		<pubDate>Tue, 07 Feb 2006 03:04:27 +0000</pubDate>
		<dc:creator>Scott Sehlhorst</dc:creator>
				<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[congnitive analysis]]></category>
		<category><![CDATA[congnitive psychology]]></category>
		<category><![CDATA[folksonomy]]></category>
		<category><![CDATA[managing data]]></category>
		<category><![CDATA[organizing tests]]></category>
		<category><![CDATA[software development process]]></category>
		<category><![CDATA[software process]]></category>
		<category><![CDATA[software testing series]]></category>
		<category><![CDATA[tagging]]></category>
		<category><![CDATA[tags]]></category>
		<category><![CDATA[taxonomy]]></category>
		<category><![CDATA[unit testing software]]></category>

		<guid isPermaLink="false">http://tynerblain.com/blog/2006/02/06/software-testing-series-organizing-a-test-suite-with-tags-part-one/</guid>
		<description><![CDATA[This post is a follow-up to our previous case study on incorporating unit testing into an existing team's development environment. The case study is based on a real solution that has already started reaping rewards for our client, and is gaining momentum. We're now looking at making it easier for the development team to maintain this test suite, and proposing some extensions - including a form of tagging.]]></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%252F02%252F06%252Fsoftware-testing-series-organizing-a-test-suite-with-tags-part-one%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Software%20Testing%20Series%3A%20Organizing%20a%20Test%20Suite%20with%20Tags%20Part%20One%22%20%7D);"><script type="text/javascript">topsyWidgetPreload({ "url": "http%3A%2F%2Ftynerblain.com%2Fblog%2F2006%2F02%2F06%2Fsoftware-testing-series-organizing-a-test-suite-with-tags-part-one%2F", "style": "big", "title": "Software Testing Series: Organizing a Test Suite with Tags Part One" });</script></div>
<p><img alt="organized typeset letters" title="organized typeset letters" src="http://sehlhorst.smugmug.com/photos/49901557-M.jpg" /></p>
<p><strong>Organizing a test suite with tags </strong></p>
<p>Tagging is a method of organizing information that is pushing into the mainstream now through the success of sites like Flickr and Del.icio.us, and blogging software like WordPress.  We can apply this idea to managing our automated test suites.  An automated test suite is a critical component of any <a title="Foundation Series on Continuous Integration" href="http://tynerblain.com/blog/2006/05/08/foundation-series-continuous-integration/">continuous integration process</a>.<br />
<strong>First steps first&#8230;</strong></p>
<p>This post is a follow-up to our <a title="A case study on adding test automation" href="http://tynerblain.com/blog/2006/01/22/software-testing-series-a-case-study/">previous case study</a> on incorporating unit testing into an existing team&#8217;s development environment.  The case study is based on a real solution that has already started reaping rewards for our client, and is gaining momentum.  We&#8217;re now looking at making it easier for the development team to maintain this test suite, and proposing some extensions &#8211; including a form of tagging.</p>
<ul>
<li>In part one of this post we develop an understanding of tagging as a technology, including it&#8217;s pros and cons.</li>
<li>In <a title="Part 2 of organizing a test suite with tags" href="http://tynerblain.com/blog/2006/02/08/software-testing-series-organizing-a-test-suite-with-tags-part-two/">part two of this post</a> we will define the top five opportunities and problems inherent in the organization of automated test suites.</li>
<li>In <a title="Organizing a test suite with tags part 3" href="http://tynerblain.com/blog/2006/02/18/software-testing-series-organizing-a-test-suite-with-tags-part-three/">part three of this post</a> we will explore an approach to combining tagging with test suite organization.</li>
</ul>
<p><strong>Understanding tagging</strong></p>
<p>Tagging allows users to define their own categories for describing the items that they care about.  The technical term for a free-form approach to labeling items is folksonomy as opposed to taxonomy, which is a classical categorization approach.</p>
<p>The <a title="Wikipedia main page" href="http://en.wikipedia.org/wiki/Main_Page">Wikipedia </a>presents the following definitions for folksonomy and taxonomy:</p>
<blockquote><p><strong>Folksonomy</strong>, a <a title="Portmanteau" href="http://en.wikipedia.org/wiki/Portmanteau">portmanteau</a> word combining &#8220;folk&#8221; and &#8220;<a title="Taxonomy" href="http://en.wikipedia.org/wiki/Taxonomy">taxonomy</a>,&#8221; refers to the collaborative but unsophisticated way in which information is being categorized on the web. Instead of using a centralized form of classification, users are encouraged to assign freely chosen keywords (called <a title="Tags" href="http://en.wikipedia.org/wiki/Tags">tags</a>) to pieces of information or data, a process known as tagging. Examples of web services that use tagging include those designed to allow users to publish and share photographs, personal libraries, bookmarks, <a title="Social software" href="http://en.wikipedia.org/wiki/Social_software">social software</a> generally, and most <a title="Blog" href="http://en.wikipedia.org/wiki/Blog">blog</a> software, which permits authors to assign <a title="Tags" href="http://en.wikipedia.org/wiki/Tags">tags</a> to each entry.</p></blockquote>
<blockquote><p><strong>Taxonomy</strong> (from <a title="Greek language" href="http://en.wikipedia.org/wiki/Greek_language">Greek</a> verb <em>tassein</em> = &#8220;to classify&#8221; and <em>nomos</em> = law, science, cf &#8220;economy&#8221;) may refer to:</p>
<ul>
<li>the science of classifying living things (see <a title="Alpha taxonomy" href="http://en.wikipedia.org/wiki/Alpha_taxonomy">alpha taxonomy</a>)</li>
<li>a classification</li>
</ul>
<p>Initially taxonomy was only the science of classifying living organisms, but later the word was applied in a wider sense, and may also refer to either a classification of things, or the principles underlying the classification. Almost anything, animate objects, inanimate objects, places, and events, may be classified according to some taxonomic scheme.</p></blockquote>
<p><strong>There is debate about the value of tags</strong></p>
<p>Several people have voiced concerns that tagging is simply a bad idea, with some compelling arguments.  <a title="I still hate tagging" href="http://www.nettakeaway.com/tp/article/155/i-still-hate-tagging">The Net Takeaway</a> has a post  and links to previous posts.</p>
<blockquote><p>Look, if I am looking for something specific, then I type those terms in. Say I use a search engine. If I am looking for a phrase, I use quotes and type in all the words (up to 10 for most engines) and I get hits with that phrase.</p>
<p>But usually, I want stuff “like” or “similar” to my words. [...]</p>
<p>But that’s now how tagging systems work.  Instead, <em>you have to know the terms up front to find anything.</em>[...] Note that every popular “tagging” system, to date, has been for consumer fun stuff (flickr, etc.) and not for real knowledge management.</p></blockquote>
<p>There are some good rebuttals in the comment thread as well, providing insight into what is intended by tagging, suggestions on how to use it, and alternative comparisons with search.  If you only read one, read comment #3.  Then go back and read the rest of them.</p>
<p>Benjamin Booth writes, in <a title="The present failure of tagging" href="http://www.benjaminbooth.com/tableorbooth/2005/09/the_present_fai.html">The Present Failure of Tagging</a>, about the challenges.  Benjamin&#8217;s approach is &#8220;I like tagging, how do we make it work the way we want?&#8221;</p>
<blockquote><p>The general problem can be seen as the task of 1) externalizing knowledge-retrieval &#8216;landmarks&#8217; when encountering information you want to store (in some context) and then, 2) being able to quickly find these landmarks when trying to recall the information later on, potentially in a completely different context from the one in which you created the landmark in the first place.</p></blockquote>
<p>Near the end of his post he begins:</p>
<blockquote><p>We need <em>refactoring</em> for tagging.[...]</p></blockquote>
<p>Benjamin makes reference to the concept mapping tool from IHMC that we <a title="Using concept maps for brainstorming" href="http://tynerblain.com/blog/2005/11/25/concept-maps-great-tool-for-eating-the-elephant-brainstorming-ideas-for-a-new-product/">talked about previously</a>.</p>
<p>Rashmi Sinha has an <a title="A cognitive analysis of tagging" href="http://www.rashmisinha.com/archives/05_09/tagging-cognitive.html">outsanding article</a> where she applies the science of cognitive psychology to the issues with tagging usability.</p>
<blockquote><p>Cognitively, we are equipped to handle making category decisions. So, why do we find this so difficult, especially in the digital realm &#8211; to put our email into folders, categorize our bookmarks, sort our documents. Here are some factors that lead to what I call the &#8220;post-activation analysis paralysis&#8221;.</p></blockquote>
<p><strong>Our conclusions about tagging<br />
</strong></p>
<p>After reading the linked posts and their discussion threads, we are pretty well versed about the pros and cons of tagging.</p>
<p><strong>Pros</strong></p>
<ul>
<li>Tagging eliminates the &#8220;How do I organize this?&#8221; analysis paralysis that happens when trying to start organizing</li>
<li>Tagging allows for a dynamic classification system that grows over time.  If we make a bad decision early, we can grow out of it.</li>
<li>The &#8220;free association&#8221; approach to tagging that exists in the digital world today is consistent with the way our brains function when storing information.</li>
<li>There are a bunch of smart people working on tagging right now, so there is plenty of opportunity to leverage their good ideas.</li>
</ul>
<p><strong>Cons</strong></p>
<ul>
<li>Tagging makes retrieval of information difficult.  If we don&#8217;t know how we previously tagged something, it can be hard to find it later.</li>
<li>The existing (digital) approaches to tagging don&#8217;t provide an analog for the way our brains function when continuously updating and refining our &#8220;free associations&#8221; as we learn.</li>
<li>People rooted in traditional taxonomy-based classification systems struggle with the concept of tagging.  This probably characterizes 90% of people, so gaining mindshare outside of the technorati will be difficult, and user adoption could be a challenge.</li>
</ul>
<p>Reminder:</p>
<ul>
<li>In part one of this post we develop an understanding of tagging as a technology, including it&#8217;s pros and cons.</li>
<li>In <a title="Part 2 of organizing a test suite with tags" href="http://tynerblain.com/blog/2006/02/08/software-testing-series-organizing-a-test-suite-with-tags-part-two/">part two of this post</a> we will define the top five opportunities and problems inherent in the organization of automated test suites.</li>
<li>In <a title="Organizing a test suite with tags part 3" href="http://tynerblain.com/blog/2006/02/18/software-testing-series-organizing-a-test-suite-with-tags-part-three/">part three of this post</a> we will explore an approach to combining tagging with test suite organization.</li>
</ul>
<p>- &#8211; -</p>
<p>Check out the <a title="Software testing series index" href="http://tynerblain.com/blog/software-testing-series-index/">index of <em>software testing series posts</em></a> for more articles.</p>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=By+%40sehlhorst%3A+Software+Testing+Series%3A+Organizing+a+Test+Suite+with+Tags+Part+One+http%3A%2F%2Fbit.ly%2FdGwROd+" title="Post to Twitter"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/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/02/06/software-testing-series-organizing-a-test-suite-with-tags-part-one/&amp;t=Software+Testing+Series%3A+Organizing+a+Test+Suite+with+Tags+Part+One" title="Post to Facebook"><img class="nothumb" src="http://tynerblain.com/blog/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-big4.png" alt="Post to Facebook" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://tynerblain.com/blog/2006/02/06/software-testing-series-organizing-a-test-suite-with-tags-part-one/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

