<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://devlicio.us/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>Stephen Wright : TDD</title><link>http://devlicio.us/blogs/steve_wright/archive/tags/TDD/default.aspx</link><description>Tags: TDD</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>FitNesse with Bob Martin – Part 2</title><link>http://devlicio.us/blogs/steve_wright/archive/2009/05/03/fitnesse-with-bob-martin-part-2.aspx</link><pubDate>Mon, 04 May 2009 00:48:46 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:46468</guid><dc:creator>Stephen Wright</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://devlicio.us/blogs/steve_wright/rsscomments.aspx?PostID=46468</wfw:commentRss><comments>http://devlicio.us/blogs/steve_wright/archive/2009/05/03/fitnesse-with-bob-martin-part-2.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://www.viddler.com/explore/underwhelmed/videos/2/"&gt;Here is the second part of the meeting&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=46468" width="1" height="1"&gt;</description><category domain="http://devlicio.us/blogs/steve_wright/archive/tags/TDD/default.aspx">TDD</category></item><item><title>FitNesse with Bob Martin – Part 1</title><link>http://devlicio.us/blogs/steve_wright/archive/2009/04/11/fitnesse-with-bob-martin-part-1.aspx</link><pubDate>Sat, 11 Apr 2009 05:55:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:45902</guid><dc:creator>Stephen Wright</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://devlicio.us/blogs/steve_wright/rsscomments.aspx?PostID=45902</wfw:commentRss><comments>http://devlicio.us/blogs/steve_wright/archive/2009/04/11/fitnesse-with-bob-martin-part-1.aspx#comments</comments><description>&lt;p&gt;On Wednesday, Uncle Bob Martin came out to the Chicago ALT.NET meeting to demo FitNesse. &lt;a href="http://www.viddler.com/explore/underwhelmed/videos/1/"&gt;Here is Part 1 of the meeting&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=45902" width="1" height="1"&gt;</description><category domain="http://devlicio.us/blogs/steve_wright/archive/tags/TDD/default.aspx">TDD</category></item><item><title>My Unit Testing Challenge</title><link>http://devlicio.us/blogs/steve_wright/archive/2007/10/23/unit-testing-amp-gui-testing-challenge.aspx</link><pubDate>Tue, 23 Oct 2007 21:02:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:38707</guid><dc:creator>Stephen Wright</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://devlicio.us/blogs/steve_wright/rsscomments.aspx?PostID=38707</wfw:commentRss><comments>http://devlicio.us/blogs/steve_wright/archive/2007/10/23/unit-testing-amp-gui-testing-challenge.aspx#comments</comments><description>&lt;p&gt;&lt;img src="http://devlicio.us/blogs/steve_wright/WindowsLiveWriter/UnitTestingGUITestingChallenge_1277B/Objects_thumb.gif" alt="Objects" align="right" /&gt; I&amp;#39;ve always thought of myself as a decent programmer.&amp;nbsp; I&amp;#39;m able to find solutions for people and I get rave reviews on how great something works.&amp;nbsp; However, there&amp;#39;s always been a part of me that knows that I can program it better using agile methods and sound fundamentals.&lt;/p&gt;  &lt;p&gt;I haven&amp;#39;t taken the time to implement unit testing in my application because of time constraints.&amp;nbsp; It&amp;#39;s been one of those things that has always left a sour taste in my programming mouth.&amp;nbsp; For an application that spans 300 pages, 200 controls and 100 Controller Modules, you&amp;#39;d think that I&amp;#39;d have a better handle on the code and a testing plan in place.&lt;/p&gt; &lt;p&gt;&lt;img src="http://devlicio.us/blogs/steve_wright/WindowsLiveWriter/UnitTestingGUITestingChallenge_1277B/nunit_1.png" style="border:0px none;margin:0px 10px 0px 0px;" alt="nunit" align="left" border="0" height="63" width="118" /&gt;Instead of automated testing, we have our QA team go through printed scripts (some over 200 pages).&amp;nbsp; Some of the site is still undocumented and we do not have a formal testing plan, so we have to remember to test it out before it&amp;#39;s sent to the customer.&amp;nbsp; As a rule of thumb, we&amp;#39;ve always set aside double the time we estimate for programming.&amp;nbsp; Not the most efficient way to estimate, but it&amp;#39;s worked for us in the past.&amp;nbsp; We&amp;#39;ve gotten to the point in a program that it is no longer practical.&lt;/p&gt;&lt;p&gt;Why am I able to get away with this?&amp;nbsp; I am the architect.&amp;nbsp; I am
involved from the kickoff to the deployment.&amp;nbsp; I am creative control.&amp;nbsp; I
can tell you in 30 seconds whether or not a certain feature exists.&amp;nbsp; If
something doesn&amp;#39;t work properly, I&amp;#39;m the one to fix it. &lt;br /&gt;&lt;/p&gt; &lt;p&gt;The solution to this is putting in unit tests for all of the code in the site.&lt;/p&gt; &lt;p&gt;Jeremy Miller from CodeBetter is a proponent of Unit Testing and Agile methods.&amp;nbsp; He says in his &lt;a href="http://codebetter.com/blogs/jeremy.miller/archive/2006/10/30/My-Programming-Manifesto.aspx" target="_blank"&gt;Programming Manifesto&lt;/a&gt;:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&amp;quot;An axiom of software development is that &lt;b&gt;problems are cheaper to fix the sooner that the problems are detected&lt;/b&gt;.&amp;nbsp; If you take that axiom at face value, it&amp;#39;s easy to see why I put far more weight into comprehensive test-first&amp;nbsp;unit testing because it gives you far more rapid feedback to find problems fast.&amp;nbsp; Small, isolated unit tests work on very granular pieces of the code, so the number of variables in any single unit test should be small (if it&amp;#39;s not, look for a different way to write the code).&amp;nbsp; You shouldn&amp;#39;t even try to run the code as a whole until all the constituent pieces have been validated through unit tests.&amp;quot;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This is very easy to build if you are starting a new project.&amp;nbsp; What do you do if you have a large, enterprise-sized project that has no unit testing?&amp;nbsp; You start out with your business layer and build from there. Start with a small method, then you can build up from each class.&amp;nbsp; &lt;/p&gt;&lt;p&gt;I worry about trying to get the Lexus when I&amp;#39;m only looking to build a Kia.&amp;nbsp; I want everything to be perfect when I&amp;#39;ve gotten something to the point of &amp;quot;release ready&amp;quot;.&lt;br /&gt;&lt;/p&gt; &lt;p&gt;When Jeff Atwood (Coding Horror) started posted about formal unit tests, he was struggling&amp;nbsp;to find the &lt;a href="http://www.codinghorror.com/blog/archives/000265.html" target="_blank"&gt;&amp;quot;perfect test&amp;quot;&lt;/a&gt;:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&amp;quot;You&amp;#39;ll get no argument from me on the fundamental value of unit testing. Even the most trivially basic unit test, as shown in the code sample above, is a huge step up from the testing most developers perform-- which is to say, &lt;b&gt;most developers don&amp;#39;t test at all!&lt;/b&gt; They key in a few values at random and click a few buttons. If they don&amp;#39;t get any unhandled exceptions, that code is ready for QA!&amp;quot;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;So I start by building small tests and work from there.&amp;nbsp; It may take a long time to fully implement unit tests, but I believe this will be to our advantage in the end.&lt;/p&gt; &lt;p&gt;I offered this solution of adding unit tests and GUI automation to my boss.&amp;nbsp; He seems to think that this will add significant time to programming and it won&amp;#39;t be practical.&amp;nbsp; The real problem that he doesn&amp;#39;t trust that the interface will get a thorough testing.&amp;nbsp; I told him that there are ways to get this working (possibly using InCisif or WatiN) that would be just like one of the QA team.&amp;nbsp; He really just can&amp;#39;t see how it will work for us.&amp;nbsp; &lt;/p&gt; &lt;p&gt;I don&amp;#39;t know how I can explain to him that it will end up in his best interest (and mine) to add the unit tests for the business layer and for the GUI.&amp;nbsp; If not, I guess I&amp;#39;ll just have to revert back to programming using &lt;a href="http://www.haacked.com/archive/2007/09/24/bug-driven-development.aspx" target="_blank"&gt;BDD&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=38707" width="1" height="1"&gt;</description><category domain="http://devlicio.us/blogs/steve_wright/archive/tags/TDD/default.aspx">TDD</category></item></channel></rss>