<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: The ROI of Testing</title>
	<atom:link href="http://theshyam.com/2009/07/the-roi-of-testing/feed/" rel="self" type="application/rss+xml" />
	<link>http://theshyam.com/2009/07/the-roi-of-testing/</link>
	<description>Thoughts and factoids from the Real Shyam. You know, unlike those fake ones!!</description>
	<lastBuildDate>Wed, 21 Apr 2010 17:05:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Mike</title>
		<link>http://theshyam.com/2009/07/the-roi-of-testing/comment-page-1/#comment-29</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Fri, 17 Jul 2009 23:03:12 +0000</pubDate>
		<guid isPermaLink="false">http://assertionfailed.wordpress.com/?p=80#comment-29</guid>
		<description>Thanks for the pointer to the guide..there are a lot of good points in there.  However, I think you might have misunderstood what I meant--I was talking about untestable *requirements*, not untestable code.  

The problem is that, too often, people doing requirements gathering don&#039;t think about testing.  I&#039;ve seen tons of untestable requirements, such as:

* The function shall be easy to use.
* The interface shall be intuitive.
* The customer shall be able to perform XYZ task with no training.

In each of those &quot;requirements,&quot; there is so much vagueness that you can&#039;t construct meaningful tests.  Admittedly, these are somewhat strawman requirements, but I&#039;ve seen similar concepts used in my work.

The approach many developers take with bad requirements is to prototype a solution and see how close they get.  After a few iterations on a prototype, the developer can usually get pretty close...but by that time, the code is written, so we&#039;ve lost many of the benefits of TDD.  Since the code is already written, I&#039;ve often seen developers simply skip writing the unit test.

If we start from testable requirements, TDD becomes much more intuitive, so developers are more willing to adhere to that strategy.</description>
		<content:encoded><![CDATA[<p>Thanks for the pointer to the guide..there are a lot of good points in there.  However, I think you might have misunderstood what I meant&#8211;I was talking about untestable *requirements*, not untestable code.  </p>
<p>The problem is that, too often, people doing requirements gathering don&#8217;t think about testing.  I&#8217;ve seen tons of untestable requirements, such as:</p>
<p>* The function shall be easy to use.<br />
* The interface shall be intuitive.<br />
* The customer shall be able to perform XYZ task with no training.</p>
<p>In each of those &#8220;requirements,&#8221; there is so much vagueness that you can&#8217;t construct meaningful tests.  Admittedly, these are somewhat strawman requirements, but I&#8217;ve seen similar concepts used in my work.</p>
<p>The approach many developers take with bad requirements is to prototype a solution and see how close they get.  After a few iterations on a prototype, the developer can usually get pretty close&#8230;but by that time, the code is written, so we&#8217;ve lost many of the benefits of TDD.  Since the code is already written, I&#8217;ve often seen developers simply skip writing the unit test.</p>
<p>If we start from testable requirements, TDD becomes much more intuitive, so developers are more willing to adhere to that strategy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shyam</title>
		<link>http://theshyam.com/2009/07/the-roi-of-testing/comment-page-1/#comment-28</link>
		<dc:creator>Shyam</dc:creator>
		<pubDate>Fri, 17 Jul 2009 17:56:46 +0000</pubDate>
		<guid isPermaLink="false">http://assertionfailed.wordpress.com/?p=80#comment-28</guid>
		<description>I used to think that, till my eyes were opened. Now, I don&#039;t think that there are any requirements which can be inherently untestable. There are some core tenets, which if you follow without fail (or, if you write your tests first, in which case, there is no way something can be untestable), you will always end up with testable code. Look at http://misko.hevery.com/code-reviewers-guide for more details.</description>
		<content:encoded><![CDATA[<p>I used to think that, till my eyes were opened. Now, I don&#8217;t think that there are any requirements which can be inherently untestable. There are some core tenets, which if you follow without fail (or, if you write your tests first, in which case, there is no way something can be untestable), you will always end up with testable code. Look at <a href="http://misko.hevery.com/code-reviewers-guide" rel="nofollow">http://misko.hevery.com/code-reviewers-guide</a> for more details.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://theshyam.com/2009/07/the-roi-of-testing/comment-page-1/#comment-27</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Fri, 17 Jul 2009 04:55:29 +0000</pubDate>
		<guid isPermaLink="false">http://assertionfailed.wordpress.com/?p=80#comment-27</guid>
		<description>I&#039;ve found that many developers are willing to write unit tests for TDD, but lack testable requirements.  These same developers tend to fall back on prototyping to get something close to what the customer wants, then never bothers to come back and write the tests.  Instead, they move on to the next feature.

To help developers dive into TDD, I think those doing requirements gathering need to do a better job writing testable requirements to make developer (and tester, for that matter) jobs easier.  

The other major benefit of TDD that seems to have been overlooked in this post is that these unit tests can generally (if written using JUnits, for example) be integrated into a regression bucket that can be run at each build.  By using TDD, you&#039;re constantly adding tests to your bucket and catching bugs sooner.

Anyway, excellent post.  I&#039;ll look forward to reading more!</description>
		<content:encoded><![CDATA[<p>I&#8217;ve found that many developers are willing to write unit tests for TDD, but lack testable requirements.  These same developers tend to fall back on prototyping to get something close to what the customer wants, then never bothers to come back and write the tests.  Instead, they move on to the next feature.</p>
<p>To help developers dive into TDD, I think those doing requirements gathering need to do a better job writing testable requirements to make developer (and tester, for that matter) jobs easier.  </p>
<p>The other major benefit of TDD that seems to have been overlooked in this post is that these unit tests can generally (if written using JUnits, for example) be integrated into a regression bucket that can be run at each build.  By using TDD, you&#8217;re constantly adding tests to your bucket and catching bugs sooner.</p>
<p>Anyway, excellent post.  I&#8217;ll look forward to reading more!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronnie Holm</title>
		<link>http://theshyam.com/2009/07/the-roi-of-testing/comment-page-1/#comment-25</link>
		<dc:creator>Ronnie Holm</dc:creator>
		<pubDate>Thu, 16 Jul 2009 19:10:01 +0000</pubDate>
		<guid isPermaLink="false">http://assertionfailed.wordpress.com/?p=80#comment-25</guid>
		<description>Right on!

I&#039;d like to supplement your reasoning with a couple of guidelines for writing and organizing tests:

    http://www.bugfree.dk/blog/2009/06/19/my-unit-testing-guidelines/

For some reason it&#039;s a challenge to convince developers to test. The Return on Investment isn’t obvious to many developers. 

I think one reason is that people mix the concepts of unit testing and integration testing, partly because a unit testing framework is used for both.

People new to unit testing frameworks often start writing integration tests because they&#039;re the easiest to write. Unfortunately they&#039;re also the most brittle, and tend to fail for no apparent reason -- when some dependency isn’t properly configured. After a few such false positives developers grow tired of testing because they find the maintenance cost too high.

Another reason is that unit testing is simply hard. Getting used to think in terms of testability doesn&#039;t come natural to many developers. The same goes for dependency injection and mocking frameworks. 

In addition many frameworks used by the application aren’t written with testability in mind. And so extra effort must go into mocking their APIs.

Finally, in my experience, organizing tests so that a team of developers are comfortable with the structure is paramount to success. Basically, a common set of guidelines should be in place from early on and at least one team members must be passionate about testing for it to take off.</description>
		<content:encoded><![CDATA[<p>Right on!</p>
<p>I&#8217;d like to supplement your reasoning with a couple of guidelines for writing and organizing tests:</p>
<p>    <a href="http://www.bugfree.dk/blog/2009/06/19/my-unit-testing-guidelines/" rel="nofollow">http://www.bugfree.dk/blog/2009/06/19/my-unit-testing-guidelines/</a></p>
<p>For some reason it&#8217;s a challenge to convince developers to test. The Return on Investment isn’t obvious to many developers. </p>
<p>I think one reason is that people mix the concepts of unit testing and integration testing, partly because a unit testing framework is used for both.</p>
<p>People new to unit testing frameworks often start writing integration tests because they&#8217;re the easiest to write. Unfortunately they&#8217;re also the most brittle, and tend to fail for no apparent reason &#8212; when some dependency isn’t properly configured. After a few such false positives developers grow tired of testing because they find the maintenance cost too high.</p>
<p>Another reason is that unit testing is simply hard. Getting used to think in terms of testability doesn&#8217;t come natural to many developers. The same goes for dependency injection and mocking frameworks. </p>
<p>In addition many frameworks used by the application aren’t written with testability in mind. And so extra effort must go into mocking their APIs.</p>
<p>Finally, in my experience, organizing tests so that a team of developers are comfortable with the structure is paramount to success. Basically, a common set of guidelines should be in place from early on and at least one team members must be passionate about testing for it to take off.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
