<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Object Mentor Blog: Generated Tests and TDD</title>
    <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Generated Tests and TDD</title>
      <description>&lt;p&gt;&lt;span class="caps"&gt;TDD&lt;/span&gt; has become quite popular, and many companies are attempting to adopt it.  However, some folks worry that it takes a long time to write all those unit tests and are looking to test-generation tools as a way to decrease that burden.&lt;/p&gt;


	&lt;p&gt;The burden is not insignificant.  FitNesse, an application created using &lt;span class="caps"&gt;TDD&lt;/span&gt;, is comprised of 45,000 lines of Java code, 15,000 of which are unit tests.  Simple math suggests that &lt;span class="caps"&gt;TDD&lt;/span&gt; increases the coding burden by a full third!&lt;/p&gt;


	&lt;p&gt;Of course this is a naive analysis.  The &lt;em&gt;benefits&lt;/em&gt; of using &lt;span class="caps"&gt;TDD&lt;/span&gt; are significant, and far outweigh the burden of writing the extra code.  But that 33% still feels &amp;#8220;extra&amp;#8221; and tempts people to find ways to shrink it without losing any of the benefits.&lt;/p&gt;


	&lt;h1&gt;Test Generators.&lt;/h1&gt;


	&lt;p&gt;Some folks have put their hope in tools that automatically generate tests by inspecting code.  These tools are very clever.  They generate random calls to methods and remember the results.  They can automatically build mocks and stubs to break the dependencies between modules.  They use remarkably clever algorithms to choose their random test data.  They even provide ways for programmers to write plugins that adjust those algorithms to be a better fit for their applications.&lt;/p&gt;


	&lt;p&gt;The end result of running such a tool is a set of &lt;em&gt;observations&lt;/em&gt;.  The tool observes how the instance variables of a class change when calls are made to its methods with certain arguments.  It notes the return values, changes to instance variables, and outgoing calls to stubs and mocks.  And it presents these observations to the user.&lt;/p&gt;


	&lt;p&gt;The user must look through these observations and determine which are correct, which are irrelevant, and which are bugs.  Once the bugs are fixed, these observations can be checked over and over again by re-running the tests.  This is very similar to the record-playback model used by &lt;span class="caps"&gt;GUI&lt;/span&gt; testers.  Once you have registered all the correct observations, you can play the tests back and make sure those observations are still being observed.&lt;/p&gt;


	&lt;p&gt;Some of the tools will even write the observations as JUnit tests, so that you can run them as a standard test suite.  Just like &lt;span class="caps"&gt;TDD&lt;/span&gt;, right?  Well, not so fast&amp;#8230;&lt;/p&gt;


	&lt;p&gt;Make no mistake, tools like this can be very useful.  If you have a wad of untested legacy code, then generating a suite of JUnit tests that verifies some portion of the behavior of that code can be a great boon!&lt;/p&gt;


	&lt;h2&gt;The Periphery Problem&lt;/h2&gt;


On the other hand, no matter how clever the test generator is, the tests it generates will always be more naive than the tests that a human can write.  As a simple example of this, I have tried to generate tests for the bowling game program using two of the better known test generation tools.  The interface to the Bowling Game looks like this:
&lt;code&gt;&lt;pre&gt;
  public class BowlingGame {
    public void roll(int pins) {...}
    public int score() {...}
  }
&lt;/pre&gt;&lt;/code&gt;
The idea is that you call roll each time the balls gets rolled, and you call score at the end of the game to get the score for that game.  

	&lt;p&gt;The test generators could not randomly generate valid games.  It&amp;#8217;s not hard to see why.  A valid game is a sequence of between 12 and 21 rolls, all of which must be integers between 0 and 10.  What&amp;#8217;s more, within a given frame, the sum of rolls cannot exceed 10.  These constraints are just too tight for a random generator to achieve within the current age of the universe.&lt;/p&gt;


	&lt;p&gt;I could have written a plugin that guided the generator to create valid games; but such an algorithm would embody much of the logic of the BowlingGame itself, so it&amp;#8217;s not clear that the economics are advantageous.&lt;/p&gt;


	&lt;p&gt;To generalize this, the test generators have trouble getting &lt;em&gt;inside&lt;/em&gt; algorithms that have any kind of protocol, calling sequence, or state semantics.  They can generate tests around the &lt;em&gt;periphery&lt;/em&gt; of the classes; but can&amp;#8217;t get into the guts without help.&lt;/p&gt;


	&lt;h2&gt;&lt;span class="caps"&gt;TDD&lt;/span&gt;?&lt;/h2&gt;


	&lt;p&gt;The real question is whether or not such generated tests help you with Test Driven Development.  &lt;span class="caps"&gt;TDD&lt;/span&gt; is the act of using tests as a way to drive the development of the system.  You write unit test code first, and then you write the application code that makes that code pass.  Clearly generating tests from existing code violates that simple rule.  So in some philosophical sense, using test generators is &lt;em&gt;not&lt;/em&gt; TDD.  But who cares so long as the tests get written, right?  Well, hang on&amp;#8230;&lt;/p&gt;


	&lt;p&gt;One of the reasons that &lt;span class="caps"&gt;TDD&lt;/span&gt; works so well is that it is similar to the accounting practice of dual entry bookkeeping.  Accountants make every entry twice; once on the credit side, and once on the debit side.  These two entries follow separate mathematical pathways. In the end a magical subtraction yields a zero if all the entries were made correctly.&lt;/p&gt;


	&lt;p&gt;In &lt;span class="caps"&gt;TDD&lt;/span&gt;, programmers state their intent twice; once in the test code, and again in the production code.  These two statements of &lt;em&gt;intent&lt;/em&gt; verify each other.  The tests, test the intent of the code, and the code tests the intent of the tests.  This works because it is a &lt;em&gt;human&lt;/em&gt; that makes both entries!  The human must state the intent twice, but in two complementary forms.  This vastly reduces many kinds of errors; as well as providing significant insight into improved design.&lt;/p&gt;


	&lt;p&gt;Using a test generator breaks this concept because the generator writes the test using the production code as input.  The generated test is not a human restatement, it is an automatic translation.  The human states intent only once, and therefore does not gain insights from restatement, nor does the generated test check that the &lt;em&gt;intent&lt;/em&gt; of the code was achieved.  It is true that the human must verify the observations, but compared to &lt;span class="caps"&gt;TDD&lt;/span&gt; that is a far more passive action, providing far less insight into defects, design and intent.&lt;/p&gt;


	&lt;p&gt;I conclude from this that automated test generation is neither equivalent to &lt;span class="caps"&gt;TDD&lt;/span&gt;, nor is it a way to make &lt;span class="caps"&gt;TDD&lt;/span&gt; more efficient.  What you gain by trying to generate the 33% test code, you lose in defect elimination, restatement of intent, and design insight. You also sacrifice depth of test coverage, because of the periphery problem.&lt;/p&gt;


	&lt;p&gt;This does not mean that test generators aren&amp;#8217;t useful.  As I said earlier, I think they can help to partially characterize a large base of legacy code.  But these tools are not &lt;span class="caps"&gt;TDD&lt;/span&gt; tools. The tests they generate are not equivalent to tests written using &lt;span class="caps"&gt;TDD&lt;/span&gt;.  And many of the benefits of &lt;span class="caps"&gt;TDD&lt;/span&gt; are not achieved through test generation.&lt;/p&gt;</description>
      <pubDate>Thu, 10 Jan 2008 13:59:30 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:8528afa6-7e1b-406d-ab72-18557ff0912c</guid>
      <author>Uncle Bob</author>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd</link>
      <category>Uncle Bob's Blatherings</category>
      <category>Agile Methods</category>
    </item>
    <item>
      <title>"Generated Tests and TDD" by Curtis Cooley</title>
      <description>&lt;p&gt;The double entry accounting analogy is pure brilliance!&lt;/p&gt;</description>
      <pubDate>Fri, 27 Jun 2008 15:49:53 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:35a643ad-2bb3-42da-b76d-826643f61ca1</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1863</link>
    </item>
    <item>
      <title>"Generated Tests and TDD" by &lt;a href="http://subway--coupons.blogspot.com"&gt;subway coupons&lt;/a&gt;</title>
      <description>&lt;p&gt;i also interested too&lt;/p&gt;</description>
      <pubDate>Mon, 05 May 2008 09:02:11 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:e991b677-b119-467c-9477-d6f69387813e</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1751</link>
    </item>
    <item>
      <title>"Generated Tests and TDD" by 88250</title>
      <description>&lt;p&gt;en, I am a Chinese newbie in TDD. I wanna translate this entry into chinese, may i?&lt;/p&gt;</description>
      <pubDate>Tue, 18 Mar 2008 22:34:12 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:b8fa4422-6811-4dd8-a0e7-d0e795ba956b</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1665</link>
    </item>
    <item>
      <title>"Generated Tests and TDD" by mmorpg</title>
      <description>&lt;p&gt;funny how something with 33% more code can be that much more efficient&amp;#8230;some of these algorithms people are developing have me in severe coder envy.&lt;/p&gt;</description>
      <pubDate>Wed, 05 Mar 2008 16:30:45 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:e39a693f-a33c-4080-a29d-1bd655c6eb6c</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1630</link>
    </item>
    <item>
      <title>"Generated Tests and TDD" by Yazid</title>
      <description>&lt;p&gt;Hello,&lt;/p&gt;


	&lt;p&gt;I love TDD (or Test first), recently Microsoft research team created something called a tool called PEX.&lt;/p&gt;


	&lt;p&gt;This a description of Pex&lt;/p&gt;


	&lt;p&gt;Pex (Program EXploration) is an intelligent assistant to the programmer. By automatically generating unit tests, it helps to find bugs early. In addition, it suggests to the programmer how to fix the bugs and here is a link&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://research.microsoft.com/Pex/" rel="nofollow"&gt;http://research.microsoft.com/Pex/&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Can this tool be useful or does it defeat the goal of TDD?&lt;/p&gt;


	&lt;p&gt;Thx
Dr Y Arezki&lt;/p&gt;</description>
      <pubDate>Fri, 22 Feb 2008 05:49:26 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:abfcfd99-b1a3-4b4c-8f74-fa750119ff88</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1612</link>
    </item>
    <item>
      <title>"Generated Tests and TDD" by Yet another Bob</title>
      <description>&lt;p&gt;Bob,&lt;/p&gt;


	&lt;p&gt;What about code generation? Some people suggest that for certain solutions where metaprogramming is being applied you should generate tests and the corresponding code you want to test &amp;#8211; but then you are not really expressing the intent twice (weeellll, the generating code consists of two parts, with one part generating the tests and another one generating the code).&lt;/p&gt;


	&lt;p&gt;Of course you can TDD the generation code and let it generate simple examples that you test automatically as well.&lt;/p&gt;


	&lt;p&gt;What&amp;#8217;s your take on this?&lt;/p&gt;</description>
      <pubDate>Fri, 15 Feb 2008 03:55:01 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:00555ff5-b3ed-41ea-8602-d8c4b5996bf3</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1585</link>
    </item>
    <item>
      <title>"Generated Tests and TDD" by unclebob</title>
      <description>&lt;blockquote&gt;
		&lt;p&gt;For example the problem of the number of pins is easily solved by creating an integer value type that only has the range of 0-10. So when it comes time to generate a random value it can only generate valid numbers.&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;The problem is that a valid game is not just a sequence of rolls between 0 and 10.  Within any frame (usually two rolls) the sum of the rolls cannot exceed 10; but if the first roll is 10, then that rule doesn&amp;#8217;t count.&lt;/p&gt;


	&lt;p&gt;Trying to capture all the constraints for valid rolls is tantamount to writing the scoring algorithm.&lt;/p&gt;</description>
      <pubDate>Tue, 05 Feb 2008 15:59:17 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:8c513e2e-999b-408d-a608-7fd85643d295</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1537</link>
    </item>
    <item>
      <title>"Generated Tests and TDD" by Ross MacGregor</title>
      <description>&lt;p&gt;Bob, I&amp;#8217;m not sure the Periphery Problem as you&amp;#8217;ve stated it is really a good argument.&lt;/p&gt;


	&lt;p&gt;&amp;#8220;The test generators could not randomly generate valid games. It&#226;&#8364;&#8482;s not hard to see why. A valid game is a sequence of between 12 and 21 rolls, all of which must be integers between 0 and 10. What&#226;&#8364;&#8482;s more, within a given frame, the sum of rolls cannot exceed 10. These constraints are just too tight for a random generator to achieve within the current age of the universe.&amp;#8221;&lt;/p&gt;


	&lt;p&gt;Here you assume these constraints cannot be captured by the system, but why couldn&amp;#8217;t they? Perhaps we need  languages with more powerful constraint systems like Eiffel that has championed Design by Contract programming.&lt;/p&gt;


	&lt;p&gt;For example the problem of the number of pins is easily solved by creating an integer value type that only has the range of 0-10. So when it comes time to generate a random value it can only generate valid numbers.&lt;/p&gt;


	&lt;p&gt;DBC like TDD is a methodology for designing software that promises to increase the quality of the design. Perhaps with enough practice with DBC programming one would be able to capture most of these elusive constraints you speak of. You want to capture these constraints programmatically so that you can verify that your software is not operating in an invalid state.&lt;/p&gt;


	&lt;p&gt;If DBC programming languages were more common perhaps these tools may actually work well and be able to auto generate most of the unit tests.&lt;/p&gt;</description>
      <pubDate>Wed, 30 Jan 2008 01:22:36 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:a61c9fff-288e-4bf2-b365-f60aa301806c</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1512</link>
    </item>
    <item>
      <title>"Generated Tests and TDD" by choy</title>
      <description>&lt;p&gt;the double-entry bookkeeping analogy is insightful. i think it&amp;#8217;d be interesting to take this analogy too far.&lt;/p&gt;</description>
      <pubDate>Sun, 13 Jan 2008 16:14:35 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:045639da-2ec3-440b-b925-cd2f39eb04c2</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1458</link>
    </item>
    <item>
      <title>"Generated Tests and TDD" by Eric Landes</title>
      <description>&lt;p&gt;Bob, a great point here.  I&amp;#8217;ve posted some more thoughts at the URL I&amp;#8217;ve posted, that relate to TDD and using that with Visul Studio Testing (for those new to TDD).&lt;/p&gt;</description>
      <pubDate>Sun, 13 Jan 2008 16:09:46 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:48124dc1-72a0-4667-91e8-36cba6d2b7a2</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1457</link>
    </item>
    <item>
      <title>"Generated Tests and TDD" by Amund</title>
      <description>&lt;p&gt;quote: &amp;#8220;The burden is not insignificant. FitNesse, an application created using TDD, is comprised of 45,000 lines of Java code,  15,000 of which are unit tests. Simple math suggests that TDD increases the coding burden by a full third!&amp;#8221;&lt;/p&gt;


	&lt;p&gt;That is not simple math, it is likely to be advanced-alternative-history-math. How do you know that it would end up with 30k lines (and still work) if it was written without TDD?&lt;/p&gt;


	&lt;p&gt;TDD also drives design and my guess is that you are likely to end with quite a different application when using other development approaches.&lt;/p&gt;</description>
      <pubDate>Sun, 13 Jan 2008 09:26:18 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:54e205af-8f3d-4e60-8c55-6090a0c6b6f7</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1456</link>
    </item>
    <item>
      <title>"Generated Tests and TDD" by DAR</title>
      <description>&lt;p&gt;Actually, the tests increased the size of the code base by 50%.&lt;/p&gt;


	&lt;p&gt;&amp;#8220;45,000 lines of Java code, 15,000 of which are unit tests&amp;#8221;&lt;/p&gt;


	&lt;p&gt;So that means 30K LOC without tests.  15K/30K = .5.  So +15K means +50%.&lt;/p&gt;


	&lt;p&gt;I don&amp;#8217;t have a problem with that (I&amp;#8217;m a strong TDD advocate myself).  But it doesn&amp;#8217;t serve anybody well to have the numbers wrong.&lt;/p&gt;</description>
      <pubDate>Fri, 11 Jan 2008 13:35:46 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:16005fbb-e0e5-4db8-8d9a-56ac20af859b</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1451</link>
    </item>
    <item>
      <title>"Generated Tests and TDD" by unclebob</title>
      <description>&lt;blockquote&gt;
		&lt;p&gt;The portion of TDD code may be 1/3, but the coding burden is increased by 1/2.&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;Damn!  How do you TDD a blog?&lt;/p&gt;</description>
      <pubDate>Fri, 11 Jan 2008 12:54:37 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:285baa5d-ea6e-436a-9476-8b7ee20fa50d</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1448</link>
    </item>
    <item>
      <title>"Generated Tests and TDD" by Steve Meuse</title>
      <description>&lt;p&gt;Arghh.  The &amp;#8220;Given&amp;#8221;/&amp;#8221;We Know&amp;#8221; block lost its formatting.  It should be eight lines, which Preview displays correctly:&lt;/p&gt;


	&lt;p&gt;Given:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FitNesseWithTDD = 45,000 LOC&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;TDDPortion = 15,000 LOC&lt;br /&gt;
We know:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FitNesseWithoutTDD = 30,000 LOC&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RatioOfExtraTDDCode = TDD / FitNesseWithoutTDD&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;= 15,000 / 30,000&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;= 1/2&lt;/p&gt;</description>
      <pubDate>Fri, 11 Jan 2008 12:22:54 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:647363de-44a2-4066-a5fb-3f101749dfbf</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1447</link>
    </item>
    <item>
      <title>"Generated Tests and TDD" by Steve Meuse</title>
      <description>&lt;p&gt;Very nice article, insightful and clear.  One tiny glitch:  Uncle Bob wrote, &amp;#8220;The burden is not insignificant. FitNesse, an application created using TDD, is comprised of 45,000 lines of Java code, 15,000 of which are unit tests. Simple math suggests that TDD increases the coding burden by a full third!&amp;#8221;&lt;/p&gt;


	&lt;p&gt;The portion of TDD code may be 1/3, but the coding burden is increased by 1/2.&lt;/p&gt;


	&lt;p&gt;Given:
     FitNesseWithTDD = 45,000 LOC
     TDDPortion = 15,000 LOC
We know:
     FitNesseWithoutTDD = 30,000 LOC
     RatioOfExtraTDDCode = TDD / FitNesseWithoutTDD
     = 15,000 / 30,000
     = 1/2&lt;/p&gt;


	&lt;p&gt;Of course, this doesn&amp;#8217;t account for the time saved finding bugs before and during the coding phase, rather than retrospectively.  A hypothetical FitNesse developed with traditional testing methods could well be bigger than 30,000 LOC.  Still, the delta is a bit higher than a third, just so the folks who write the checks and set the schedules know what to expect and when.&lt;/p&gt;


	&lt;p&gt;I agree with Pavel.  The bookkeeping analogy is brilliant.  Thanks!&lt;/p&gt;</description>
      <pubDate>Fri, 11 Jan 2008 12:13:28 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:5fa6ff4e-0df9-4966-9724-4255446f5731</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1446</link>
    </item>
    <item>
      <title>"Generated Tests and TDD" by Jeff Langr</title>
      <description>&lt;p&gt;I&amp;#8217;m wondering if FitNesse would be 75,000 total lines, no tests, were it not written test-first.&lt;/p&gt;</description>
      <pubDate>Fri, 11 Jan 2008 08:39:33 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:e04d99f2-f818-459a-b62a-a42dde541092</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1444</link>
    </item>
    <item>
      <title>"Generated Tests and TDD" by Pavel Tcholakov</title>
      <description>&lt;p&gt;Great post, and the double entry bookkeeping analogy is excellent!&lt;/p&gt;</description>
      <pubDate>Fri, 11 Jan 2008 07:49:34 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:b4c4afc1-36e4-42a5-aaed-6297a9cdffa4</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1442</link>
    </item>
    <item>
      <title>"Generated Tests and TDD" by Johan Samyn</title>
      <description>&lt;p&gt;A comment from a somewhat unusual angle :&lt;br&gt;
Two things I like most about this post : the comparison with the accounting practice (great for advocacy), and the referring to the human factor. The second the most. Indeed, we humans are the most important factor, and will stay so for quite some time I believe. This helps me understand why you run a successful company : you seem to value people, the single most important asset there is. And that&amp;#8217;s a great thing. You consider humans as an important factor in the process of writing software. Not just the languages, tools, methodologies and so on. But those people using all that. They are the binding glue, the commanding factor in the process. The importance of us, as valuable human beings, can&amp;#8217;t be stressed enough. That&amp;#8217;s why other/new tools and so can&amp;#8217;t beat the fact that you can get more out of a team by educating them, because that is helping to make those good people (the best factor in the game) even better. Which is not always understood.&lt;/p&gt;</description>
      <pubDate>Thu, 10 Jan 2008 15:15:10 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:15a5067e-de19-4354-929c-d1c84a6d3a4c</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1437</link>
    </item>
    <item>
      <title>"Generated Tests and TDD" by swombat</title>
      <description>&lt;p&gt;Very true. As a dedicated RSpec BDDer, it is a bit shocking to hear of people trying to take the shortcut of generating their tests. If I was in a smart-arse mood, I might comment that they should take an even quicker shortcut and just generate the test reports directly! Why bother running the tests at all? They&amp;#8217;ve already cut out 90% or so of the benefits of testing, why not go all the way? :-)&lt;/p&gt;


	&lt;p&gt;One element which is missing from your article is the use of TDD as a design process. This is especially the case in BDD, but as BDD is supposed to simply be &amp;#8220;TDD done right&amp;#8221;, with a better adapted vocabulary, what&amp;#8217;s true of BDD tends to hold for TDD as well. When you write tests first, it makes you think about the design of the item you&amp;#8217;re writing in a way that&amp;#8217;s immensely helpful.&lt;/p&gt;


	&lt;p&gt;Another important use of TDD is to ensure that you let user stories drive the requirements. In this case, you&amp;#8217;d write a user story (e.g. using FIT or the RSpec Story Runner) first, then write a view spec, then a controller spec, then finally a model spec if required. Thus, every line of new code that you write is driven by a clear user benefit, and you waste no time implementing features that You Ain&amp;#8217;t Gonna Need (It). In my experience, this goes a long way towards reducing cruft and keeping your codebase tight and focused on user benefits.&lt;/p&gt;


	&lt;p&gt;Daniel&lt;/p&gt;</description>
      <pubDate>Thu, 10 Jan 2008 14:28:46 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:d3d9bd02-5ff5-439a-aa8a-eebf85656360</guid>
      <link>http://blog.objectmentor.com/articles/2008/01/10/generated-tests-and-tdd#comment-1436</link>
    </item>
  </channel>
</rss>
