<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Test Driven Development - Is it good or bad?</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx</link><description>For short: BAD . I've been thinking about this for a while and reading Michael Puleio's blog [ ^ ] [ ^ ] has made me think even more about this. What is often referred as Test Driven Development (TDD) is actually Test First Development (TFD), which is</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Chris Holmes Online  &amp;raquo; Blog Archive   &amp;raquo; TDD: Misunderstood</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#1658466</link><pubDate>Sun, 04 Jan 2009 18:37:28 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1658466</guid><dc:creator>Chris Holmes Online  » Blog Archive   » TDD: Misunderstood</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Chris Holmes Online &amp;nbsp;&amp;raquo; Blog Archive &amp;nbsp; &amp;raquo; TDD: Misunderstood&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1658466" width="1" height="1"&gt;</description></item><item><title>re: Test Driven Development - Is it good or bad?</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#929761</link><pubDate>Mon, 28 May 2007 08:13:39 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:929761</guid><dc:creator>Adam</dc:creator><description>&lt;p&gt;@Dwight&lt;/p&gt;
&lt;p&gt;Same can be said of procedural vs. OO. It depends on the people, not TDD.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=929761" width="1" height="1"&gt;</description></item><item><title>re: Test Driven Development - Is it good or bad?</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#922226</link><pubDate>Thu, 24 May 2007 00:05:38 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:922226</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;I have no problem with design with testability in mind as long as it’s not testability driven.&lt;/p&gt;
&lt;p&gt;What I mean is that the architecture and its APIs should be primarily reliable, preformant and easy to use and not just easy to test.&lt;/p&gt;
&lt;p&gt;And with tools like TypeMock.NET, you can not only avoid design for testability but you can get the comfort of 100% code coverage with your tests.&lt;/p&gt;
&lt;p&gt;I how and why is apparent that I haven’t had and &amp;quot;Ah, ha!&amp;quot; moment like you say. I’ve had more that I would like to. Some of them were caught on integration testes. 100% code coverage with tests and all tests passed. It did exactly what I wanted it to do. It was the right code to do the wrong thing.&lt;/p&gt;
&lt;p&gt;I would like to have really automatic test generation. With the help of code coverage I would be able to see what tests were missing. Missing that and being a control freak, I’m pleased with Visual Studio’s test stub generation and especially with its private accessors generation.&lt;/p&gt;
&lt;p&gt;Thanks for your feedback, Mark.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=922226" width="1" height="1"&gt;</description></item><item><title>re: Test Driven Development - Is it good or bad?</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#922145</link><pubDate>Wed, 23 May 2007 22:49:08 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:922145</guid><dc:creator>Mark Lindell</dc:creator><description>You should design to test!  Not being able to test in isolation is a sign of a poor design due to high coupling and low cohesion. (IMHO) Following the principles of good design will lead to testable code.

Apparently you have not had an &amp;quot;Ah, ha!&amp;quot; moment when a unit test catches a bug introduced by another bug fix that is so obscure you would swear no test plan was going to catch.  Typically I find these when I write cross-check unit tests.  I&amp;#39;ve had a few that would have made it to production and cost my company way more than the time it took me to design for testing and to write the tests.

One other note, only test what is important to test!  Automatically generating a unit test is worthless.

I understand how everyone&amp;#39;s opinion is based on their own experiences though.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=922145" width="1" height="1"&gt;</description></item><item><title>re: Test Driven Development - Is it good or bad?</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#915115</link><pubDate>Sun, 20 May 2007 16:31:51 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:915115</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;Thanks for your feedback, Dwight.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=915115" width="1" height="1"&gt;</description></item><item><title>re: Test Driven Development - Is it good or bad?</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#908176</link><pubDate>Wed, 16 May 2007 23:24:47 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:908176</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;Thank you all for offering me your experience in TDD.&lt;/p&gt;
&lt;p&gt;I feel I’m beginning to shift a bit on my beliefs (and those who know me know that that can be hard to accomplish).&lt;/p&gt;
&lt;p&gt;Well, serious discussions can have that effect on you.&lt;/p&gt;
&lt;p&gt;I wonder what attracted people to this one and a half month old post.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=908176" width="1" height="1"&gt;</description></item><item><title>re: Test Driven Development - Is it good or bad?</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#908170</link><pubDate>Wed, 16 May 2007 23:20:06 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:908170</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;Jeff Tucker:&lt;/p&gt;
&lt;p&gt;Jeff,&lt;/p&gt;
&lt;p&gt;I just can't bring myself to write the tests first.&lt;/p&gt;
&lt;p&gt;Maybe because I can write, compile and execute code in my mind. And that would mean that I'm &amp;quot;writing&amp;quot; tests first.&lt;/p&gt;
&lt;p&gt;Right now, in one of the projects I'm involved, I'm literally dictating the overview of the architecture and API. Probably I should write the tests (providing I had the time) and tell the developer to come back when he could make his code pass all my tests.&lt;/p&gt;
&lt;p&gt;But I still maintain that Test First is not Test Driven. This Driven thing just bothers me.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=908170" width="1" height="1"&gt;</description></item><item><title>re: Test Driven Development - Is it good or bad?</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#908160</link><pubDate>Wed, 16 May 2007 23:12:08 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:908160</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;Jimmy Bogard:&lt;/p&gt;
&lt;p&gt;Jimmy,&lt;/p&gt;
&lt;p&gt;I always unit test my code. Hopefully, using automatic tools. But, when needed, the debugger in Visual Studio can do the trick.&lt;/p&gt;
&lt;p&gt;I’ve been playing with TypeMock.NET and I find it amazing. With it I can make really unitary tests. Even when mocking HttpApplication, HttpContext, HttpRequest and HttpResponse is needed. I love a 100% code coverage.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=908160" width="1" height="1"&gt;</description></item><item><title>re: Test Driven Development - Is it good or bad?</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#908151</link><pubDate>Wed, 16 May 2007 23:06:03 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:908151</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;Derik Whittaker:&lt;/p&gt;
&lt;p&gt;Derik,&lt;/p&gt;
&lt;p&gt;not as much as he wanted.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=908151" width="1" height="1"&gt;</description></item><item><title>re: Test Driven Development - Is it good or bad?</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#908148</link><pubDate>Wed, 16 May 2007 23:04:42 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:908148</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;Scott Bellware:&lt;/p&gt;
&lt;p&gt;Scott,&lt;/p&gt;
&lt;p&gt;I think I'll let everyone get addicted to it first.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=908148" width="1" height="1"&gt;</description></item><item><title>re: Test Driven Development - Is it good or bad?</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#908145</link><pubDate>Wed, 16 May 2007 23:03:46 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:908145</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;Jeffrey Palermo:&lt;/p&gt;
&lt;p&gt;Jeff, you said it all.&lt;/p&gt;
&lt;p&gt;&amp;quot;test-associated development&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;disgarding objections the exact meaning of the terms used&amp;quot;&lt;/p&gt;
&lt;p&gt;My beef is just with the middle D.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=908145" width="1" height="1"&gt;</description></item><item><title>http://codebetter.com/blogs/scott.bellware/</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#908125</link><pubDate>Wed, 16 May 2007 22:50:34 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:908125</guid><dc:creator>TrackBack</dc:creator><description>&lt;img src="http://msmvps.com/aggbug.aspx?PostID=908125" width="1" height="1"&gt;</description></item><item><title>http://codebetter.com/blogs/scott.bellware/</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#908124</link><pubDate>Wed, 16 May 2007 22:50:32 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:908124</guid><dc:creator>TrackBack</dc:creator><description>&lt;img src="http://msmvps.com/aggbug.aspx?PostID=908124" width="1" height="1"&gt;</description></item><item><title>http://codebetter.com/blogs/scott.bellware/archive/2007/05/16/163086.aspx</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#908123</link><pubDate>Wed, 16 May 2007 22:50:11 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:908123</guid><dc:creator>TrackBack</dc:creator><description>&lt;img src="http://msmvps.com/aggbug.aspx?PostID=908123" width="1" height="1"&gt;</description></item><item><title>re: Test Driven Development - Is it good or bad?</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#907797</link><pubDate>Wed, 16 May 2007 20:01:03 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:907797</guid><dc:creator>Jeff Tucker</dc:creator><description>I&amp;#39;m still out on true TDD (writing the tests first) but I do have some numbers from one of my previous projects.  The project was an ASP .NET web application with about 20k lines of code or so.  I was the main developer and there were two testers executing the test plan.  I utilized NMock2 for mocking and csUnit for my unit tests.  Part of my Nant build script was to run unit tests and create a code coverage report in NCover.  There were a total of about 300 bugs logged against the project (this is an estimate, the project had 360 bugs total but I don&amp;#39;t know how many of those were duplicates or pre-existing before I started working with the code, but I think 50-60 of those is a fair estimate).  I had unit tests on both the database and the business layer, for a total of 107 unit tests with about 90% code coverage on those layers (according to NCover).    For the complete life of this project, every single one of those 300 or so bugs was logged against bad requirements or UI issues.  There were no bugs logged at any time against any code that was covered by a unit test.  I did NO modifications to ANY code that was covered by unit tests as a result of a defect (there were two requirements changes in the middle of the project that required code changes but these caused me to change the unit tests also).  My point is that proper use of unit tests to ensure that objects behave the way they are supposed to will have a huge impact on the quality of the software that you are creating.  &lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=907797" width="1" height="1"&gt;</description></item><item><title>re: Test Driven Development - Is it good or bad?</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#907378</link><pubDate>Wed, 16 May 2007 14:42:33 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:907378</guid><dc:creator>Jimmy Bogard</dc:creator><description>&lt;p&gt;I&amp;#39;ve been doing TDD for about 2 years now, and at first, I did have the sort of class explosion you mentioned. &amp;nbsp;It was only after I put it together with the GoF, Fowler&amp;#39;s PoEAA, Evans&amp;#39; DDD and eventually behavior-driven design did good designs emerge from my software and tests. &amp;nbsp;I had to completely relearn how to design, now always doing the simplest thing that works and doing a sort of JIT design. &amp;nbsp;Every test I write now centers around behavior and functionality. &amp;nbsp;TDD is a paradigm shift in your development practices, and takes time and effort to master.&lt;/p&gt;
&lt;p&gt;As for using TypeMock with unit tests, I had the same experience with it as I did with typed DataSets. &amp;nbsp;Easy to use the first time, but an absolute PITA to maintain. &amp;nbsp;I always felt my tests should be concerned with the public, observable behavior (or state) of a module. &amp;nbsp;Any time I started tinkering with testing the internals, my tests started breaking much more often.&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t speak for all TDD practitioners, but all I need to do is look at code I wrote test-after (or test-never) and code I wrote test-first to know I could never go back. &amp;nbsp;I think your mileage may vary on TDD, but at least we can all agree it&amp;#39;s better to have code with tests than without. &amp;nbsp;Now back to Michael Feathers&amp;#39; book...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=907378" width="1" height="1"&gt;</description></item><item><title>re: Test Driven Development - Is it good or bad?</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#907369</link><pubDate>Wed, 16 May 2007 14:26:47 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:907369</guid><dc:creator>Jimmy Bogard</dc:creator><description>&lt;p&gt;I&amp;#39;ve been doing TDD for about 2 years now, and at first, I did have the sort of class explosion you mentioned. &amp;nbsp;It was only after I put it together with the GoF, Fowler&amp;#39;s PoEAA, Evans&amp;#39; DDD and eventually behavior-driven design did good designs emerge from my software and tests. &amp;nbsp;I had to completely relearn how to design, now always doing the simplest thing that works and doing a sort of JIT design. &amp;nbsp;Every test I write now centers around behavior and functionality. &amp;nbsp;TDD is a paradigm shift in your development practices, and takes time and effort to master.&lt;/p&gt;
&lt;p&gt;As for using TypeMock with unit tests, I had the same experience with it as I did with typed DataSets. &amp;nbsp;Easy to use the first time, but an absolute PITA to maintain. &amp;nbsp;I always felt my tests should be concerned with the public, observable behavior (or state) of a module. &amp;nbsp;Any time I started tinkering with testing the internals, my tests started breaking much more often.&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t speak for all TDD practitioners, but all I need to do is look at code I wrote test-after (or test-never) and code I wrote test-first to know I could never go back. &amp;nbsp;I think your mileage may vary on TDD, but at least we can all agree it&amp;#39;s better to have code with tests than without. &amp;nbsp;Now back to Michael Feathers&amp;#39; book...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=907369" width="1" height="1"&gt;</description></item><item><title>re: Test Driven Development - Is it good or bad?</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#907150</link><pubDate>Wed, 16 May 2007 11:28:19 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:907150</guid><dc:creator>Derik Whittaker</dc:creator><description>&lt;p&gt;This post to me sounds more like the rant of a misguided developer that has failed to grasp onto TDD (or any variant there of). &amp;nbsp;I wonder if the auther has really given testing a solid try?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=907150" width="1" height="1"&gt;</description></item><item><title>re: Test Driven Development - Is it good or bad?</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#906811</link><pubDate>Wed, 16 May 2007 07:05:23 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:906811</guid><dc:creator>Scott Bellware</dc:creator><description>Indeed, you should copyright it&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=906811" width="1" height="1"&gt;</description></item><item><title>re: Test Driven Development - Is it good or bad?</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/03/29/test-driven-development-is-it-good-or-bad.aspx#906567</link><pubDate>Wed, 16 May 2007 03:17:26 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:906567</guid><dc:creator>Jeffrey Palermo</dc:creator><description>When speaking to an executive, do you really tell him that the studies and case studies he&amp;#39;s read from reputable research firms are all lies?  The studies that associate test-associated development with higher quality?  There is so much evidence for the benefit of TDD (disgarding objections the exact meaning of the terms used) that this post can&amp;#39;t be considered well-informed.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=906567" width="1" height="1"&gt;</description></item></channel></rss>