<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Test Driven Developer - Testing</title>
    <link>http://testdrivendeveloper.com/</link>
    <description>You got a TEST for that?</description>
    <language>en-us</language>
    <copyright>John E. Boal</copyright>
    <lastBuildDate>Wed, 08 Apr 2009 19:05:23 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.1.8102.813</generator>
    <managingEditor>web_master1@TestDrivenDeveloper.com</managingEditor>
    <webMaster>web_master1@TestDrivenDeveloper.com</webMaster>
    <item>
      <trackback:ping>http://testdrivendeveloper.com/Trackback.aspx?guid=3672cae1-a523-409d-a5a3-0e032b6f8ebb</trackback:ping>
      <pingback:server>http://testdrivendeveloper.com/pingback.aspx</pingback:server>
      <pingback:target>http://testdrivendeveloper.com/PermaLink,guid,3672cae1-a523-409d-a5a3-0e032b6f8ebb.aspx</pingback:target>
      <dc:creator>John E. Boal</dc:creator>
      <wfw:comment>http://testdrivendeveloper.com/CommentView,guid,3672cae1-a523-409d-a5a3-0e032b6f8ebb.aspx</wfw:comment>
      <wfw:commentRss>http://testdrivendeveloper.com/SyndicationService.asmx/GetEntryCommentsRss?guid=3672cae1-a523-409d-a5a3-0e032b6f8ebb</wfw:commentRss>
      <title>&lt; Rant &gt;</title>
      <guid isPermaLink="false">http://testdrivendeveloper.com/PermaLink,guid,3672cae1-a523-409d-a5a3-0e032b6f8ebb.aspx</guid>
      <link>http://TestDrivenDeveloper.com/2009/04/08/.aspx</link>
      <pubDate>Wed, 08 Apr 2009 19:05:23 GMT</pubDate>
      <description>&lt;div&gt;OK people. STOP putting cowboy code on my desk. Seriously. TEST your software. REALLY. Please STOP writing BRAND NEW LEGACY code.&lt;br&gt;&amp;lt; /Rant &amp;gt;&lt;br&gt;&lt;br&gt;OK I feel better. But not really. Just because a system is not considered to be a "production release" (meaning that people outside the particular organization or business won't have access to it) it DOES NOT mean that we can cowboy it up and plop a steaming pile of untested code out there for our colleagues or coworkers to consume.&lt;br&gt;&lt;br&gt;ALL CODE NEEDS TESTS. Period.&lt;br&gt;&lt;br&gt;Untested code is NOT finished. Please don't just assume that if the code "works" that it's ready to inflict on other people (or even yourself). Self-inflicted legacy code casualties are the second highest cause of career paralysis, according to 4 out of 5 dentists. By definition, code is "legacy" if it doesn't have tests.&lt;br&gt;&lt;br&gt;Here's a plan to get your tests caught up.&lt;br&gt;&lt;br&gt;Start Small&lt;br&gt;At least we need a set of "sanity" checks... if nothing else. Create a "test suite." Use xUnit or the like, keep it simple. Start with the checks for the obvious output... if that doesn't show up, then something is clearly broken.&lt;br&gt;&lt;br&gt;Add Some More&lt;br&gt;One at a time if you have to, add another test for something. Any kind of test will do... unit, functional, acceptance... I recommend starting with acceptance and working backward. We already blew the op to be able to do TDD and get unit testing done, so now let's just make sure the surface behavior is adequate. Definitely do go in deeper if time permits.&lt;br&gt;&lt;br&gt;New Feature&lt;br&gt;Each time a new feature is added, update the test suite to make sure everything is happy with changes that ripple out from the effect of the feature. Again - at least make sure that the obvious functionality is tested on the new code. Don't slack on it, keep at least the new code from being legacy.&lt;br&gt;&lt;br&gt;Lather, Rinse, Repeat&lt;br&gt;Pick a time each week (say 4:30PM on Wednesdays) to put in a half-hour on writing one new test. Schedule it. Block the time out on your calendar so someone can't schedule a meeting... And hide if you have to - to avoid distractions.&lt;br&gt;&lt;br&gt;What to Write&lt;br&gt;Focus on happy-path code tests only if there are none for that feature. Otherwise, do alternate and failure path tests, so that the behavior of the system is understood in circumstances other than the best-case. 90% of bugs occur in the not-happy path.&lt;br&gt;&lt;br&gt;Using this strategy will get testing started, and contribute to a more robust and reliable product, no matter what it is. Remember that most "side projects" or "utilities" that are developed in-house will be used by your own people. We want them to have the best.&lt;br&gt;&lt;br&gt;"But it's just a spreadsheet." OK, yes it is. I say we need to make sure
to test even the lowly spreadsheet. Because, next week someone in
Finance is going to discover it and begin to use it for their payroll
planning... if there is a critical flaw in it, it might be YOUR
paycheck that gets eliminated!&lt;br&gt;
&lt;br&gt;We should realize that even internal tools and web sites are usually used to make business decisions of some kind. We want to make sure that they are made using reliable tools, to the extent possible. Business relies on its data, now more than ever. Competition is fierce in a down economy - even small mistakes can be a big problem.&lt;br&gt;&lt;br&gt;"Bread's not done until it's baked" - and neither is code! SO PLEASE: Test it. Bake it. Slice it... and don't get burned!&lt;br&gt;&lt;br&gt;&lt;p&gt;&lt;/p&gt;&lt;img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=3672cae1-a523-409d-a5a3-0e032b6f8ebb"/&gt;&lt;/div&gt;</description>
      <comments>http://testdrivendeveloper.com/CommentView,guid,3672cae1-a523-409d-a5a3-0e032b6f8ebb.aspx</comments>
      <category>TDD</category>
      <category>Testing</category>
      <category>Unit Tests</category>
    </item>
    <item>
      <trackback:ping>http://testdrivendeveloper.com/Trackback.aspx?guid=98bd176b-bdd6-4fac-9d0e-500ff26a81ec</trackback:ping>
      <pingback:server>http://testdrivendeveloper.com/pingback.aspx</pingback:server>
      <pingback:target>http://testdrivendeveloper.com/PermaLink,guid,98bd176b-bdd6-4fac-9d0e-500ff26a81ec.aspx</pingback:target>
      <dc:creator>John E. Boal</dc:creator>
      <wfw:comment>http://testdrivendeveloper.com/CommentView,guid,98bd176b-bdd6-4fac-9d0e-500ff26a81ec.aspx</wfw:comment>
      <wfw:commentRss>http://testdrivendeveloper.com/SyndicationService.asmx/GetEntryCommentsRss?guid=98bd176b-bdd6-4fac-9d0e-500ff26a81ec</wfw:commentRss>
      <title>Agile Developer Series - Continuous Integration</title>
      <guid isPermaLink="false">http://testdrivendeveloper.com/PermaLink,guid,98bd176b-bdd6-4fac-9d0e-500ff26a81ec.aspx</guid>
      <link>http://TestDrivenDeveloper.com/2009/02/10/AgileDeveloperSeriesContinuousIntegration.aspx</link>
      <pubDate>Tue, 10 Feb 2009 19:38:47 GMT</pubDate>
      <description>&lt;div&gt;Here is a presentation I wrote to explain why Continuous Integration is important, and touch on some of the philosophy of how we think of CI. There are a lot of tools and techniques for CI however I did not go into specifically in this presentation. Scenario Examples may be available in the future as scripts for specific tools to build software with CI. If you want to see these, please reply and let me know.&lt;br&gt;&lt;br&gt;PowerPoint version:&lt;p&gt;&lt;/p&gt;&lt;a href="http://testdrivendeveloper.com/content/binary/AgileDeveloperSeries-ContinuousIntegration.pptx"&gt;AgileDeveloperSeries-ContinuousIntegration.pptx (79.86 KB)&lt;/a&gt;&lt;br&gt;&lt;br&gt;PDF version:&lt;br&gt;&lt;a href="http://testdrivendeveloper.com/content/binary/AgileDeveloperSeries-ContinuousIntegration.pdf"&gt;AgileDeveloperSeries-ContinuousIntegration.pdf (650.31 KB)&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=98bd176b-bdd6-4fac-9d0e-500ff26a81ec"/&gt;&lt;/div&gt;</description>
      <comments>http://testdrivendeveloper.com/CommentView,guid,98bd176b-bdd6-4fac-9d0e-500ff26a81ec.aspx</comments>
      <category>Continuous Integration</category>
      <category>Testing</category>
    </item>
    <item>
      <trackback:ping>http://testdrivendeveloper.com/Trackback.aspx?guid=e36a37f3-53c9-460d-8042-ee50090f0ad0</trackback:ping>
      <pingback:server>http://testdrivendeveloper.com/pingback.aspx</pingback:server>
      <pingback:target>http://testdrivendeveloper.com/PermaLink,guid,e36a37f3-53c9-460d-8042-ee50090f0ad0.aspx</pingback:target>
      <dc:creator>John E. Boal</dc:creator>
      <wfw:comment>http://testdrivendeveloper.com/CommentView,guid,e36a37f3-53c9-460d-8042-ee50090f0ad0.aspx</wfw:comment>
      <wfw:commentRss>http://testdrivendeveloper.com/SyndicationService.asmx/GetEntryCommentsRss?guid=e36a37f3-53c9-460d-8042-ee50090f0ad0</wfw:commentRss>
      <title>Unit Testing and Test Driven Development - a Practical Guide</title>
      <guid isPermaLink="false">http://testdrivendeveloper.com/PermaLink,guid,e36a37f3-53c9-460d-8042-ee50090f0ad0.aspx</guid>
      <link>http://TestDrivenDeveloper.com/2008/11/15/UnitTestingAndTestDrivenDevelopmentAPracticalGuide.aspx</link>
      <pubDate>Sat, 15 Nov 2008 21:08:59 GMT</pubDate>
      <description>&lt;div&gt;Here is a presentation I wrote on what Unit Testing is all about, and how TDD fits into the ATDD cycle.&lt;br&gt;&lt;br&gt;There are specific things here on testing the UI code with Selenium and JSUnit, and recommendations on how to do unit testing on your database code.&lt;br&gt;&lt;br&gt;This presentation is in PDF format, but I can post the PPTX format also if needed.&lt;br&gt;&lt;p&gt;&lt;/p&gt;&lt;a href="http://testdrivendeveloper.com/content/binary/A%20Practical%20Guide%20to%20Unit%20Testing1.pdf"&gt;A Practical Guide to Unit Testing1.pdf (503.29 KB)&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=e36a37f3-53c9-460d-8042-ee50090f0ad0"/&gt;&lt;/div&gt;</description>
      <comments>http://testdrivendeveloper.com/CommentView,guid,e36a37f3-53c9-460d-8042-ee50090f0ad0.aspx</comments>
      <category>ATDD</category>
      <category>Mocks</category>
      <category>Refactoring</category>
      <category>Selenium</category>
      <category>TDD</category>
      <category>Testing</category>
      <category>Unit Tests</category>
      <category>SQL</category>
    </item>
    <item>
      <trackback:ping>http://testdrivendeveloper.com/Trackback.aspx?guid=10a8368d-9191-4f9c-bc29-ca957bb111e5</trackback:ping>
      <pingback:server>http://testdrivendeveloper.com/pingback.aspx</pingback:server>
      <pingback:target>http://testdrivendeveloper.com/PermaLink,guid,10a8368d-9191-4f9c-bc29-ca957bb111e5.aspx</pingback:target>
      <dc:creator>John E. Boal</dc:creator>
      <wfw:comment>http://testdrivendeveloper.com/CommentView,guid,10a8368d-9191-4f9c-bc29-ca957bb111e5.aspx</wfw:comment>
      <wfw:commentRss>http://testdrivendeveloper.com/SyndicationService.asmx/GetEntryCommentsRss?guid=10a8368d-9191-4f9c-bc29-ca957bb111e5</wfw:commentRss>
      <title>More Tips for Unit Testing in Iron Python</title>
      <guid isPermaLink="false">http://testdrivendeveloper.com/PermaLink,guid,10a8368d-9191-4f9c-bc29-ca957bb111e5.aspx</guid>
      <link>http://TestDrivenDeveloper.com/2008/10/07/MoreTipsForUnitTestingInIronPython.aspx</link>
      <pubDate>Tue, 07 Oct 2008 16:09:49 GMT</pubDate>
      <description>&lt;div&gt;Do you ever wonder why there is an extra "False" printed at the end of each run for unit tests?&lt;br&gt;&lt;br&gt;&lt;font face="Courier New"&gt;C:\Code\sample&amp;gt;ipy UnitTests.py&lt;br&gt;.....&lt;br&gt;----------------------------------------------------------------------&lt;br&gt;Ran 5 tests in 0.395s&lt;br&gt;&lt;br&gt;OK&lt;br&gt;False&lt;/font&gt;&lt;br&gt;&lt;br&gt;It looks like there is an exit statement buried inside the unit test framework. We can eliminate the problem pretty easily with the addition of a try/except around the unit test execution. Here is the code to put at the end of your unit test script:&lt;br&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt; __name__ &lt;font color="#0000ff"&gt;==&lt;/font&gt; '&lt;font color="#a9a9a9"&gt;__main__&lt;/font&gt;':&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;try&lt;/font&gt;:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; unittest.main&lt;font color="#0000ff"&gt;()&lt;/font&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;except&lt;/font&gt; SystemExit:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;pass&lt;/font&gt;&lt;br&gt;&lt;/font&gt;&lt;br&gt;This catches and eats the SystemExit exception, and runs without printing the "False" at the end of the execution:&lt;br&gt;&lt;br&gt;&lt;font face="Courier New"&gt;C:\Code\sample&amp;gt;ipy UnitTests.py&lt;br&gt;.....&lt;br&gt;----------------------------------------------------------------------&lt;br&gt;Ran 5 tests in 0.387s&lt;br&gt;&lt;br&gt;OK&lt;br&gt;&lt;/font&gt;&lt;br&gt;cheers!&lt;br&gt;&lt;p&gt;&lt;/p&gt;&lt;img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=10a8368d-9191-4f9c-bc29-ca957bb111e5"/&gt;&lt;/div&gt;</description>
      <comments>http://testdrivendeveloper.com/CommentView,guid,10a8368d-9191-4f9c-bc29-ca957bb111e5.aspx</comments>
      <category>Python</category>
      <category>Testing</category>
      <category>Unit Tests</category>
    </item>
    <item>
      <trackback:ping>http://testdrivendeveloper.com/Trackback.aspx?guid=9c73a72b-9654-4976-83b5-e3f9b6b67e3f</trackback:ping>
      <pingback:server>http://testdrivendeveloper.com/pingback.aspx</pingback:server>
      <pingback:target>http://testdrivendeveloper.com/PermaLink,guid,9c73a72b-9654-4976-83b5-e3f9b6b67e3f.aspx</pingback:target>
      <dc:creator>John E. Boal</dc:creator>
      <wfw:comment>http://testdrivendeveloper.com/CommentView,guid,9c73a72b-9654-4976-83b5-e3f9b6b67e3f.aspx</wfw:comment>
      <wfw:commentRss>http://testdrivendeveloper.com/SyndicationService.asmx/GetEntryCommentsRss?guid=9c73a72b-9654-4976-83b5-e3f9b6b67e3f</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <title>Unit Testing in Python</title>
      <guid isPermaLink="false">http://testdrivendeveloper.com/PermaLink,guid,9c73a72b-9654-4976-83b5-e3f9b6b67e3f.aspx</guid>
      <link>http://TestDrivenDeveloper.com/2008/09/30/UnitTestingInPython.aspx</link>
      <pubDate>Tue, 30 Sep 2008 13:26:26 GMT</pubDate>
      <description>&lt;div&gt;&lt;P&gt;I have been using IronPython lately, and am having a good time testing code with its built-in unit test framework. Here is a brief example of how to write some unit tests for &lt;a target=_ipy href="http://www.codeplex.com/IronPython"&gt;IronPython&lt;/a&gt; (or CPython if that's your flavor). These unit tests&amp;nbsp;leverage the "unittest" module available in Python 2.2 and above.&lt;/P&gt;
&lt;P&gt;Here is a short test class:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff&gt;class&lt;/FONT&gt; TestCode:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; localInt = &lt;FONT color=#ff0000&gt;1&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @classmethod&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;def&lt;/FONT&gt; &lt;FONT color=#ff1493&gt;Method1&lt;/FONT&gt;(self):&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;return&lt;/FONT&gt; &lt;FONT color=#ff0000&gt;100&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;def&lt;/FONT&gt; &lt;FONT color=#ff1493&gt;Method2&lt;/FONT&gt;(self, a, b):&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.localInt = a * b&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Here are&amp;nbsp;some sample&amp;nbsp;unit tests for it, using the unittest framework:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff&gt;import&lt;/FONT&gt; unittest&lt;BR&gt;&lt;FONT color=#0000ff&gt;class&lt;/FONT&gt; UnitTests(unittest.TestCase):&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;def&lt;/FONT&gt; &lt;FONT color=#ff1493&gt;testMethod1&lt;/FONT&gt;(self):&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cut = TestCode()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; actual = cut.Method1()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.assertEqual(&lt;FONT color=#ff0000&gt;100&lt;/FONT&gt;, actual)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;def&lt;/FONT&gt; &lt;FONT color=#ff1493&gt;teststaticInt&lt;/FONT&gt;(self):&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.assertEqual(&lt;FONT color=#ff0000&gt;1&lt;/FONT&gt;, TestCode.localInt)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;def&lt;/FONT&gt; &lt;FONT color=#ff1493&gt;testMethod2&lt;/FONT&gt;(self):&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cut = TestCode()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cut.Method2(&lt;FONT color=#ff0000&gt;7&lt;/FONT&gt;, &lt;FONT color=#ff0000&gt;4&lt;/FONT&gt;)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.assertEqual(&lt;FONT color=#ff0000&gt;28&lt;/FONT&gt;, cut.localInt)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff&gt;if&lt;/FONT&gt; __name__ == '&lt;FONT color=#808080&gt;__main__&lt;/FONT&gt;':&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; unittest.main()&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;This example should illustrate that we can write some unit tests for our Python code fairly easily and quickly. It's nice to have a built-in framework for unit testing. There is also a "doctest" module available for doing more like system testing. I am pretty new to Python, so I haven't got examples of this as yet.&lt;/P&gt;
&lt;P&gt;If anyone has any suggestions on tools&amp;nbsp;or experience with &lt;A href="http://blogs.msdn.com/aaronmar/archive/2006/02/16/533273.aspx"&gt;integration with Visual Studio&lt;/A&gt;&amp;nbsp;those comments would be appreciated.&lt;/P&gt;&lt;img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=9c73a72b-9654-4976-83b5-e3f9b6b67e3f"/&gt;&lt;/div&gt;</description>
      <comments>http://testdrivendeveloper.com/CommentView,guid,9c73a72b-9654-4976-83b5-e3f9b6b67e3f.aspx</comments>
      <category>TDD</category>
      <category>Testing</category>
      <category>Tools</category>
      <category>Python</category>
    </item>
    <item>
      <trackback:ping>http://testdrivendeveloper.com/Trackback.aspx?guid=64ecd9d5-5c44-48ac-b3b5-b900d7c4ecd0</trackback:ping>
      <pingback:server>http://testdrivendeveloper.com/pingback.aspx</pingback:server>
      <pingback:target>http://testdrivendeveloper.com/PermaLink,guid,64ecd9d5-5c44-48ac-b3b5-b900d7c4ecd0.aspx</pingback:target>
      <dc:creator>John E. Boal</dc:creator>
      <wfw:comment>http://testdrivendeveloper.com/CommentView,guid,64ecd9d5-5c44-48ac-b3b5-b900d7c4ecd0.aspx</wfw:comment>
      <wfw:commentRss>http://testdrivendeveloper.com/SyndicationService.asmx/GetEntryCommentsRss?guid=64ecd9d5-5c44-48ac-b3b5-b900d7c4ecd0</wfw:commentRss>
      <title>Organizing Test Code</title>
      <guid isPermaLink="false">http://testdrivendeveloper.com/PermaLink,guid,64ecd9d5-5c44-48ac-b3b5-b900d7c4ecd0.aspx</guid>
      <link>http://TestDrivenDeveloper.com/2008/09/22/OrganizingTestCode.aspx</link>
      <pubDate>Mon, 22 Sep 2008 17:21:35 GMT</pubDate>
      <description>&lt;div&gt;&lt;P&gt;Shawn Neal has a &lt;A href="http://blog.sneal.net/blog/2008/09/02/OrganizeYourTestCode.aspx"&gt;great post&lt;/A&gt; (ok it might be a rant) on organizing test code. I agree with his article, on the separation of different kinds of tests into separate assemblies that perhaps can be run at different times (not always with the build). Only the true unit tests should probably be running with each build, and for each developer. If there are other tests that run very fast (by my definition,&amp;nbsp;a fast test either passes or fails in under 1/10 second [100ms]) they too could be included in per-build and per-developer runs, provided that they don't bog down the total test time too much, and&amp;nbsp;provided that they are in separate assemblies.&lt;/P&gt;
&lt;P&gt;Someday, when technology allows for it, we should even be able to run our tests in parallel threads or parallel processes (see the &lt;A href="http://nunit.com/index.php?p=releaseNotes&amp;amp;r=2.5"&gt;2.5&amp;nbsp;target features for NUnit&lt;/A&gt;). Speed is truly important. If your development team has 10 developers, every minute they wait for a build to complete or a test run to complete is 10 minutes a day of development time wasted. If they build and test 6 times a day each (that's not very much BTW) that is one team development hour per day. Realistically it's likely to be more like 5 or 6 development hours a day.&lt;/P&gt;
&lt;P&gt;So if someone is paying attention to how time is spent, we could say perhaps that spending a couple of development hours on the tests to make them run faster, and save one minute per execution would more than pay for itself in a single day.&lt;/P&gt;
&lt;P&gt;The moral of this story is keep the tests fast, and when they aren't, fix them or move them out of the main test path.&lt;/P&gt;&lt;img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=64ecd9d5-5c44-48ac-b3b5-b900d7c4ecd0"/&gt;&lt;/div&gt;</description>
      <comments>http://testdrivendeveloper.com/CommentView,guid,64ecd9d5-5c44-48ac-b3b5-b900d7c4ecd0.aspx</comments>
      <category>Testing</category>
    </item>
    <item>
      <trackback:ping>http://testdrivendeveloper.com/Trackback.aspx?guid=5872ed9c-4504-4cef-909d-4e2efe0d7269</trackback:ping>
      <pingback:server>http://testdrivendeveloper.com/pingback.aspx</pingback:server>
      <pingback:target>http://testdrivendeveloper.com/PermaLink,guid,5872ed9c-4504-4cef-909d-4e2efe0d7269.aspx</pingback:target>
      <dc:creator>John E. Boal</dc:creator>
      <wfw:comment>http://testdrivendeveloper.com/CommentView,guid,5872ed9c-4504-4cef-909d-4e2efe0d7269.aspx</wfw:comment>
      <wfw:commentRss>http://testdrivendeveloper.com/SyndicationService.asmx/GetEntryCommentsRss?guid=5872ed9c-4504-4cef-909d-4e2efe0d7269</wfw:commentRss>
      <title>Sample Code for Selenium and WatiN tests</title>
      <guid isPermaLink="false">http://testdrivendeveloper.com/PermaLink,guid,5872ed9c-4504-4cef-909d-4e2efe0d7269.aspx</guid>
      <link>http://TestDrivenDeveloper.com/2008/08/26/SampleCodeForSeleniumAndWatiNTests.aspx</link>
      <pubDate>Tue, 26 Aug 2008 15:03:11 GMT</pubDate>
      <description>&lt;div&gt;I posted a simple sample of accepance test code in Selenium and WatiN along with a sample web site to test. You can download the zip file &lt;a href="http://agilebug.com/ct.ashx?id=f4b673d3-cdfe-4a3d-b740-907c1b2cb362&amp;amp;url=http%3a%2f%2fagilebug.com%2fcontent%2fbinary%2fATDDdemo.zip"&gt;here&lt;/a&gt;.&lt;br&gt;&lt;br&gt;I also have posted a Fitnesse fixture in that zip file that illustrates how we can create a simple test fixture for Fitnesse acceptance testing. The Fitnesse tests aren't in the set, but here is the page wiki code that makes use of the fixture:&lt;br&gt;&lt;br&gt;&lt;font face="Courier New" size="2"&gt;!define COMMAND_PATTERN {%m %p}&lt;br&gt;!define TEST_RUNNER {dotnet\FitServer.exe}&lt;br&gt;!define PATH_SEPARATOR {;}&lt;br&gt;!path dotnet\*.dll&lt;br&gt;&lt;br&gt;Here is an acceptance test using our BusinessObjectTestFixture test class:&lt;br&gt;&lt;br&gt;!|FitnesseFixture.BusinessObjectTestFixture|&lt;br&gt;|UserId|Password|Authenticate()|&lt;br&gt;|administrator|secret0|ADMIN|&lt;br&gt;|admin|secret0|NONE|&lt;br&gt;|administrator|secret|NONE|&lt;br&gt;|user11|secret11|USER|&lt;br&gt;|user11|secret0|NONE|&lt;br&gt;|user|secret|NONE|&lt;br&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;I also created some STIQ tests, here is the code for the tests and components. Extract this zip file under repository\ProjectRoot folder and it should be able to test the sample site also.&lt;br&gt;&lt;br&gt;&lt;a href="http://testdrivendeveloper.com/content/binary/ATDDSTIQ.zip"&gt;ATDDSTIQ.zip (3.57 KB)&lt;/a&gt;&lt;img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=5872ed9c-4504-4cef-909d-4e2efe0d7269"/&gt;&lt;/div&gt;</description>
      <comments>http://testdrivendeveloper.com/CommentView,guid,5872ed9c-4504-4cef-909d-4e2efe0d7269.aspx</comments>
      <category>ATDD</category>
      <category>Automation</category>
      <category>Selenium</category>
      <category>TDD</category>
      <category>Testing</category>
      <category>Tools</category>
      <category>WatiN</category>
    </item>
    <item>
      <trackback:ping>http://testdrivendeveloper.com/Trackback.aspx?guid=08d711e8-6e7b-4701-81b6-df843a72fa12</trackback:ping>
      <pingback:server>http://testdrivendeveloper.com/pingback.aspx</pingback:server>
      <pingback:target>http://testdrivendeveloper.com/PermaLink,guid,08d711e8-6e7b-4701-81b6-df843a72fa12.aspx</pingback:target>
      <dc:creator>John E. Boal</dc:creator>
      <wfw:comment>http://testdrivendeveloper.com/CommentView,guid,08d711e8-6e7b-4701-81b6-df843a72fa12.aspx</wfw:comment>
      <wfw:commentRss>http://testdrivendeveloper.com/SyndicationService.asmx/GetEntryCommentsRss?guid=08d711e8-6e7b-4701-81b6-df843a72fa12</wfw:commentRss>
      <slash:comments>6</slash:comments>
      <title>List of Tools for Developers</title>
      <guid isPermaLink="false">http://testdrivendeveloper.com/PermaLink,guid,08d711e8-6e7b-4701-81b6-df843a72fa12.aspx</guid>
      <link>http://TestDrivenDeveloper.com/2008/08/05/ListOfToolsForDevelopers.aspx</link>
      <pubDate>Tue, 05 Aug 2008 05:29:38 GMT</pubDate>
      <description>&lt;div&gt;I have been asked recently about tools I prefer to use in my every-day development. Here is a list of tools, and where to get them.&lt;br&gt;&lt;br&gt;Visual Studio 2008&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  Development IDE&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://msdn.microsoft.com/en-us/vstudio/products/aa700831.aspx"&gt;Microsoft&lt;/a&gt;&lt;br&gt;TestDriven.net&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp; Test Runner&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;a href="http://TestDriven.net"&gt;TestDriven.net&lt;/a&gt;&lt;br&gt;WinMerge&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp; Diff / Merge tool&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;a href="http://winmerge.org/downloads/index.php"&gt;WinMerge.org&lt;/a&gt; integrates with VS and Tortoise too!&lt;br&gt;nUnit&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  Unit Testing Framework&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;a href="http://nunit.org/?p=download"&gt;nUnit.org&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Also see &lt;a href="http://www.mbunit.com/"&gt;mbUnit&lt;/a&gt; and &lt;a href="http://www.gallio.org"&gt;Gallio&lt;/a&gt;&lt;br&gt;Selenium&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp; UI test framework&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp; &lt;a href="http://selenium.openqa.org/"&gt;OpenQA&lt;/a&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  Also see &lt;a href="http://watin.sourceforge.net/"&gt;WatiN&lt;/a&gt;&lt;br&gt;ReSharper&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp; Integrated toolkit for VS&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp; &lt;a href="http://www.jetbrains.com/resharper/download/"&gt;JetBrains&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  (OK I don't actually use it but it's good.)&lt;br&gt;Tortoise SVN&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp; Shell Integration with SVN&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp; &lt;a href="http://tortoisesvn.net/downloads"&gt;Tigris&lt;/a&gt;&lt;br&gt;Ankh SVN&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  Visual Studio Plugin for SVN&amp;nbsp;&amp;nbsp;  &amp;nbsp; &lt;a href="http://ankhsvn.open.collab.net/servlets/ProjectProcess?pageID=3794"&gt;CollabNet&lt;/a&gt;&lt;br&gt;Subversion (Server)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Version Control System&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;a href="http://www.visualsvn.com/server/"&gt;VisualSVN&lt;/a&gt;&lt;br&gt;Cruise Control.net&amp;nbsp; &amp;nbsp;&amp;nbsp;  &amp;nbsp; CI system&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;a href="http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET"&gt;ThoughtWorks&lt;/a&gt;&lt;br&gt;RhinoMocks&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp;  Mock Object System&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;a href="http://www.ayende.com/projects/rhino-mocks/downloads.aspx"&gt;Ayende&lt;/a&gt;&lt;br&gt;nAnt&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp; .NET Build Tool&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &lt;a href="http://nant.sourceforge.net/"&gt;nAnt&lt;/a&gt;&lt;br&gt;Fitnesse&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp; Acceptance Test Tool&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp; &lt;a href="http://fitnesse.org/"&gt;Fitnesse&lt;/a&gt;&lt;br&gt;STIQ&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp; Story Test Tool&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;a href="http://storytestiq.solutionsiq.com/wiki/Main_Page"&gt;Solutions IQ&lt;/a&gt;&lt;br&gt;GIMP&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp;  GNU Image Manipulation Prog. &lt;a href="http://gimp-win.sourceforge.net/"&gt;SourceForge&lt;/a&gt;&lt;br&gt;Notepad++&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp; Smart Text Editor&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp; &lt;a href="http://notepad-plus.sourceforge.net/uk/download.php"&gt;SourceForge UK&lt;/a&gt; when Visual Studio just won't do...&lt;br&gt;&lt;br&gt;Not development tools exactly, but extremely handy:&lt;br&gt;Process Explorer&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp;  Smarter Task Manager&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp; &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx"&gt;SysInternals&lt;/a&gt;&lt;br&gt;FileZilla&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;&amp;nbsp;  Upload/FTP client&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &lt;a href="http://filezilla-project.org/download.php"&gt;FileZilla&lt;/a&gt;&lt;br&gt;DivX&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp; Decoder&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &lt;a href="http://DivX.com"&gt;DivX&lt;/a&gt;&amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp;  &amp;nbsp;&amp;nbsp; Because sometimes we need to watch movies...&lt;br&gt;&lt;br&gt;That's all I can think of at the moment, but am probably missing some
things. I'm sure you'll all (please) chime in with what I forgot... :-)&lt;br&gt;
&lt;br&gt;
&lt;br&gt;&lt;img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=08d711e8-6e7b-4701-81b6-df843a72fa12"/&gt;&lt;/div&gt;</description>
      <comments>http://testdrivendeveloper.com/CommentView,guid,08d711e8-6e7b-4701-81b6-df843a72fa12.aspx</comments>
      <category>Automation</category>
      <category>Mocks</category>
      <category>Selenium</category>
      <category>Testing</category>
      <category>WatiN</category>
      <category>Tools</category>
    </item>
    <item>
      <trackback:ping>http://testdrivendeveloper.com/Trackback.aspx?guid=332ed448-9496-4ba0-981e-68b5559b89c8</trackback:ping>
      <pingback:server>http://testdrivendeveloper.com/pingback.aspx</pingback:server>
      <pingback:target>http://testdrivendeveloper.com/PermaLink,guid,332ed448-9496-4ba0-981e-68b5559b89c8.aspx</pingback:target>
      <dc:creator>John E. Boal</dc:creator>
      <wfw:comment>http://testdrivendeveloper.com/CommentView,guid,332ed448-9496-4ba0-981e-68b5559b89c8.aspx</wfw:comment>
      <wfw:commentRss>http://testdrivendeveloper.com/SyndicationService.asmx/GetEntryCommentsRss?guid=332ed448-9496-4ba0-981e-68b5559b89c8</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <title>Agile Beer Night</title>
      <guid isPermaLink="false">http://testdrivendeveloper.com/PermaLink,guid,332ed448-9496-4ba0-981e-68b5559b89c8.aspx</guid>
      <link>http://TestDrivenDeveloper.com/2008/07/23/AgileBeerNight.aspx</link>
      <pubDate>Wed, 23 Jul 2008 05:14:39 GMT</pubDate>
      <description>&lt;div&gt;We the practitioners of Agile and users of Beer, hereby proclaim &lt;font size="4"&gt;&lt;i&gt;&lt;b&gt;Agile Beer Night&lt;/b&gt;&lt;/i&gt;&lt;/font&gt;.&lt;br&gt;&lt;br&gt;The
&lt;a href="http://AgileBUG.com"&gt;Agile Beer Users Group&lt;/a&gt; (Seattle Chapter) will be meeting on Thursday Aug
21, for information sharing, networking, agile discussions, a brief
topic presentation on Automated Acceptance Testing, oh - and BEER. Come
meet us for a discussion and brief presentation on Agile practices each
month.&lt;br&gt;&lt;br&gt;There is good food, good beer, and a good chance to meet
some of the folks who do agile development in the Pacific Northwest,
get to know their tricks, and share in their success. The Owl has a
fine selection of food, drinks, and spirits for those who choose them.&lt;br&gt;&lt;br&gt;ABN next meeting will be held in Seattle at the &lt;a href="http://www.owlnthistle.com/owlhome.html"&gt;Owl and Thistle Irish Pub and Restaurant&lt;/a&gt; at 808 Post Avenue in downtown Seattle from 5PM to 8PM on Thursday August 21 2008.&lt;br&gt;&lt;br&gt;The September ABN meeting will be on the East side in Redmond or Bellevue, but plans are not firm yet - stay tuned...&lt;br&gt;&lt;br&gt;&lt;br&gt;Please link &lt;a href="http://agilebug.com/2008/07/23/AgileBeerNight.aspx"&gt;this post,&lt;/a&gt; track it back, and let everyone know!&lt;br&gt;&lt;br&gt;&lt;b&gt;&lt;font size="5"&gt;Next ABN on Thursday August 21 2008 5PM to 8PM at the &lt;a href="http://www.owlnthistle.com/owlhome.html"&gt;Owl and Thistle Irish Pub and Restaurant&lt;/a&gt; at 808 Post Avenue in downtown Seattle&lt;br&gt;&lt;/font&gt;&lt;/b&gt;
&lt;br&gt;&lt;p&gt;&lt;/p&gt;&lt;img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=332ed448-9496-4ba0-981e-68b5559b89c8"/&gt;&lt;/div&gt;</description>
      <comments>http://testdrivendeveloper.com/CommentView,guid,332ed448-9496-4ba0-981e-68b5559b89c8.aspx</comments>
      <category>ABN</category>
      <category>Automation</category>
      <category>Testing</category>
    </item>
    <item>
      <trackback:ping>http://testdrivendeveloper.com/Trackback.aspx?guid=6ee1b46c-e597-432a-b719-7b7b5dabf630</trackback:ping>
      <pingback:server>http://testdrivendeveloper.com/pingback.aspx</pingback:server>
      <pingback:target>http://testdrivendeveloper.com/PermaLink,guid,6ee1b46c-e597-432a-b719-7b7b5dabf630.aspx</pingback:target>
      <dc:creator>John E. Boal</dc:creator>
      <wfw:comment>http://testdrivendeveloper.com/CommentView,guid,6ee1b46c-e597-432a-b719-7b7b5dabf630.aspx</wfw:comment>
      <wfw:commentRss>http://testdrivendeveloper.com/SyndicationService.asmx/GetEntryCommentsRss?guid=6ee1b46c-e597-432a-b719-7b7b5dabf630</wfw:commentRss>
      <title>Drag and Drop in Selenium</title>
      <guid isPermaLink="false">http://testdrivendeveloper.com/PermaLink,guid,6ee1b46c-e597-432a-b719-7b7b5dabf630.aspx</guid>
      <link>http://TestDrivenDeveloper.com/2008/07/22/DragAndDropInSelenium.aspx</link>
      <pubDate>Tue, 22 Jul 2008 06:33:26 GMT</pubDate>
      <description>&lt;div&gt;I learned a valuable lesson today using Selenium. It seems that the DragAndDropToObject() function doesn't scale well when the HTML is being updated in a loop by the mainline code... This method uses two locator strings, one to find the object to drag, and the other to find the object to drop.&lt;br&gt;&lt;br&gt;It apparently has to examine the entire XML DOM for each locator, each time through. So, when I created a loop that did a drag and drop 250 times on a page, the first few were not too bad only a couple hundred milliseconds. However, as more and more DHTML was added to the page, it took longer and longer to drop the next objects. I measured this time, and when I charted the data, it was a moderately increasing exponential slope. Definitely not even linear...&lt;br&gt;&lt;br&gt;It seems that the more HTML was added to the DOM, the longer it took both of the locators to locate their objects, even though those objects were static on the page. It walked the DOM each time, for each locator. Thus the increasing non-linear time slope, because the DOM grows with every loop iteration.&lt;br&gt;&lt;br&gt;By the time it got to the 50th iteration through the loop, the time taken was almost 2 orders of magnitude higher than the initial one. It made testing this particular feature not doable through this framework. And in measuring how long it took the actual javascript to render the new DHTML, it was just around 100ms, when the Selenium locates for the command took upwards of 7000ms for the 50th loop, but was only 200ms at the initial loop.&lt;br&gt;&lt;br&gt;The Solution&lt;br&gt;I didn't find a complete solution to the excruciating amount of time the locator code needs to walk the DOM, but I did end up switching from the DragAndDropToObject() method to the DragAndDrop() method. The latter uses one locator string and a relative X,Y coordinate string (NOT a locator). It's just about zero time for it to process the relative coordinate string rather than the locator. So, in my specific case with this test, I was able to cut the time down to 2.5 seconds for the 250th drag and drop. Still a very LONG running test, but it worked (oh yeah and it found a nice juicy bug too...).&lt;br&gt;&lt;br&gt;OpenQA people - it might behoove you to take a look at optimizing how you interact with a DOM that is growing or being updated by the code under test... A bit of performance gain in this area would really come in handy.&lt;br&gt;&lt;p&gt;&lt;/p&gt;&lt;img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=6ee1b46c-e597-432a-b719-7b7b5dabf630"/&gt;&lt;/div&gt;</description>
      <comments>http://testdrivendeveloper.com/CommentView,guid,6ee1b46c-e597-432a-b719-7b7b5dabf630.aspx</comments>
      <category>Automation</category>
      <category>Selenium</category>
      <category>Testing</category>
    </item>
    <item>
      <trackback:ping>http://testdrivendeveloper.com/Trackback.aspx?guid=3aee0837-ec1a-4333-896b-c3b07cbe86e4</trackback:ping>
      <pingback:server>http://testdrivendeveloper.com/pingback.aspx</pingback:server>
      <pingback:target>http://testdrivendeveloper.com/PermaLink,guid,3aee0837-ec1a-4333-896b-c3b07cbe86e4.aspx</pingback:target>
      <dc:creator>John E. Boal</dc:creator>
      <wfw:comment>http://testdrivendeveloper.com/CommentView,guid,3aee0837-ec1a-4333-896b-c3b07cbe86e4.aspx</wfw:comment>
      <wfw:commentRss>http://testdrivendeveloper.com/SyndicationService.asmx/GetEntryCommentsRss?guid=3aee0837-ec1a-4333-896b-c3b07cbe86e4</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <title>Comparing WatiN and Selenium For UI Testing</title>
      <guid isPermaLink="false">http://testdrivendeveloper.com/PermaLink,guid,3aee0837-ec1a-4333-896b-c3b07cbe86e4.aspx</guid>
      <link>http://TestDrivenDeveloper.com/2008/07/22/ComparingWatiNAndSeleniumForUITesting.aspx</link>
      <pubDate>Tue, 22 Jul 2008 06:18:35 GMT</pubDate>
      <description>&lt;div&gt;Both &lt;a href="http://selenium.openqa.org/"&gt;Selenium&lt;/a&gt; and &lt;a href="http://watin.sourceforge.net/"&gt;WatiN&lt;/a&gt; have been around for a while, and both are fairly good tools when it comes to UI automated testing. Both tools now drive both IE7 and FF2, and are free to download. I have been using Selenium RC for a while now, and it seems to be fairly robust, although sometimes rather frustrating and somewhat slow. Both have a recorder mechanism, and both emit C# code for me. However the WatiN recorder did blow sky high with an unhandled exception when a pop-up window came up, but &lt;a href="http://watintestrecord.sourceforge.net/"&gt;the recorder code&lt;/a&gt; was written by someone else so I won't hold it against WatiN.&lt;br&gt;&lt;br&gt;I tried WatiN for the first time today, and decided to go with the V.2 CTP instead of the .NET 1.1 release. It seems that some of the API's have been refactored into more sensible structures (factory patterns, etc.), but somehow the things that would have made the most sense to me in the API were structured much differently that I would have expected. There were some problems with my IE (it kept crashing unless I ran the debug version of W2). However, I blame this on IE, not on W2. FF has a plug-in that needs to be manually installed. It comes with the CTP, but doesn't get installed. Hopefully this will be integrated by release.&lt;br&gt;&lt;br&gt;Most of the basic features are similar in function but not implementation. I can see writing an interface class and a couple of wrapper classes that implement the interface, one each for WatiN and Selenium, so we can have the best of both worlds.&lt;br&gt;&lt;br&gt;WatiN Pro's&lt;br&gt;&lt;ul&gt;&lt;li&gt;No proxy server required. It just runs. Runs both FF and IE, switchable with the parameter to the factory method that creates the instance.&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;WatiN Con's&lt;br&gt;&lt;ul&gt;&lt;li&gt;Documentation is less than sparse.&lt;/li&gt;&lt;li&gt;I could not find a way to do a "drag and drop" which is easily accomplished with Selenium.&lt;/li&gt;&lt;li&gt;Does not handle pop-up windows. This was the show-stopper for me.&lt;/li&gt;&lt;/ul&gt;Selenium Pro's&lt;br&gt;&lt;ul&gt;&lt;li&gt;polished code&lt;/li&gt;&lt;li&gt;well-documented functionality&lt;/li&gt;&lt;li&gt;lots of examples&lt;/li&gt;&lt;li&gt;handles lots of weird types of conditions and situations (most of which we will all need at some point.)&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;Selenium Con's&lt;br&gt;&lt;ul&gt;&lt;li&gt;have to run a java proxy in a separate process and set it up and tear it down&lt;br&gt;&lt;/li&gt;&lt;li&gt;slow in places, due to proxy and not-so-well-written sections of code&lt;/li&gt;&lt;li&gt;locators aren't always easy to figure out. Tools like &lt;a href="http://getfirebug.com/releases/"&gt;Firebug&lt;/a&gt; and &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/1192"&gt;XPather&lt;/a&gt; help identify locator strings.&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;Since it does not handle pop-up windows (or I just couldn't figure it out in about 4h of research), this was the end of the line for it. Selenium does handle them, and has been able to accomplish 100% of the weird scenario tests I have needed so far. Loads of tweaking and frustrating trial and error notwithstanding.&lt;br&gt;&lt;br&gt;So, until we have a bit closer to release for WatiN, Selenium still wins (for now). However, I definitely plan to write the interface and shim both out so I can use either or both later on. Stay tuned for that posting, that will be the money shot...&lt;br&gt;&lt;br&gt;In closing, let me just reiterate that every developer should be thinking about UI automated testing for web code. Each user-interactive element on the page NEEDS AN ID. That's every link, every button, every text box, checkbox, radio button, and other user input elements. The ID's need to be simple, and either fixed, or predictable. With these things in place in the production code, it will be testable and easier to validate. Better quality code will make it out to the hands of the users, and all will be right with the world. Amen.&lt;br&gt;&lt;br&gt;&amp;lt;steps down from soapbox./&amp;gt;&lt;br&gt;&lt;br&gt;&lt;img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=3aee0837-ec1a-4333-896b-c3b07cbe86e4"/&gt;&lt;/div&gt;</description>
      <comments>http://testdrivendeveloper.com/CommentView,guid,3aee0837-ec1a-4333-896b-c3b07cbe86e4.aspx</comments>
      <category>Automation</category>
      <category>C#</category>
      <category>Selenium</category>
      <category>Testing</category>
      <category>WatiN</category>
    </item>
    <item>
      <trackback:ping>http://testdrivendeveloper.com/Trackback.aspx?guid=f5421cea-42ee-4c60-8339-385ff172a931</trackback:ping>
      <pingback:server>http://testdrivendeveloper.com/pingback.aspx</pingback:server>
      <pingback:target>http://testdrivendeveloper.com/PermaLink,guid,f5421cea-42ee-4c60-8339-385ff172a931.aspx</pingback:target>
      <dc:creator>John E. Boal</dc:creator>
      <wfw:comment>http://testdrivendeveloper.com/CommentView,guid,f5421cea-42ee-4c60-8339-385ff172a931.aspx</wfw:comment>
      <wfw:commentRss>http://testdrivendeveloper.com/SyndicationService.asmx/GetEntryCommentsRss?guid=f5421cea-42ee-4c60-8339-385ff172a931</wfw:commentRss>
      <title>Do you test your installer?</title>
      <guid isPermaLink="false">http://testdrivendeveloper.com/PermaLink,guid,f5421cea-42ee-4c60-8339-385ff172a931.aspx</guid>
      <link>http://TestDrivenDeveloper.com/2008/07/01/DoYouTestYourInstaller.aspx</link>
      <pubDate>Tue, 01 Jul 2008 04:41:41 GMT</pubDate>
      <description>&lt;div&gt;Do you write installers? A lot of times I hear that all the features or stories are completed, but nobody has given any thought to how actually to ship the software and install it. This is not a trivial story, and usually it is the user's first experience with the software, so if it doesn't go well, your reputation starts out in the hole and that's not easy to overcome. Let's assume that we are more thorough and professional than the average joe, and we create an installer for our application that does three things: Install, Upgrade, and Uninstall.&lt;br&gt;&lt;br&gt;Most of the time I write installers that are MSI or Setup.exe based, since I sort of get those for free with Visual Studio and .NET. If I have a file or dependency, I simply add it to the package and tell it where on the target machine it is supposed to go. It gets compiled and built (only by DEVENV.EXE by the way - MSBUILD doesn't know how to build setup projects...) after the main assemblies.&lt;br&gt;&lt;br&gt;The main assemblies all have unit tests of course that run with the build, so everybody is green before anything gets built to install. Installers can be kind of tricky. Don't be tempted to run it on your native development box. If you haven't got lots of proven experience with them, be sure to run the installer for the first few iterations ONLY on a virtual machine that you can restore to its original image with a couple clicks. Let's just say I have seen some interesting recursive registry damage from an installer...&lt;br&gt;&lt;br&gt;We need tests for the installer, but in this case we are not talking about "unit" tests, but rather functional tests. We need the tests to actually install and uninstall the software.&lt;br&gt;&lt;br&gt;&lt;b&gt;&lt;font size="4"&gt;Testing the Installer Code&lt;br&gt;&lt;/font&gt;&lt;/b&gt;First up - test the UNinstall. From my experience, I have seen this path as the best one to start with. Install it manually only after the failing test has been created (and test it only on the VM). You can use either NUnit or MSTest as the framework to run the installer. HINT: to uninstall the software exec this command line:&lt;br&gt;MSIEXEC /X {guid}&lt;br&gt;where guid is the identifier for your project. This guid can be found in the .VDPROJ file as the key called "ProductCode." Don't change this value ever, or it will disconnect your next install from your current uninstall, and all kinds of weirdness can happen.&lt;br&gt;&lt;br&gt;Assert that the registry keys get removed from CurrentVersion as discussed below, and that any registry entries created by the installer are removed.&lt;br&gt;&lt;br&gt;&lt;b&gt;&lt;font size="4"&gt;Gotcha&lt;/font&gt;&lt;/b&gt;&lt;br&gt;So it didn't work as planned, and there's an error... an Assert fails, which throws an exception, and your tests end and have left the software installed on the system. The next time the install test runs, it won't work because the software will already be installed. So... make sure you have try-catch logic on everything before you assert anything. The finally block should call a function that uninstalls the product. We know that it will work, because we have tests for it...&lt;br&gt;&lt;br&gt;Unlike most unit tests where we want to be able to run tests in any order, and have complete independence, functional tests for an installer are much simpler to write if they can be run in the Install, Upgrade, and Uninstall order. However, we don't write them in this order, we start with the uninstall first, then add tests for install, and finally the upgrade cases.&lt;br&gt;&lt;br&gt;Make sure to catch everything done by the installer in the uninstall test, and do not proceed to write install tests until you are absolutely certain that the uninstall works properly and is adequately tested.&lt;br&gt;&lt;br&gt;When you move on to the install case, it should be a bit easier, as all you need do is reverse the tests in the uninstall. Make sure that you place this test code before the uninstall test code, so that it is now automated.&lt;br&gt;&lt;br&gt;Now, voila - you have automated tests for your install code. Finally, your upgrade test can be written to confirm the behavior if the installer is run on a system where the software is already installed. You may want to just fail the install and tell the user to uninstall the previous version, or you may want to upgrade in place. A true upgrade is far nicer to the user, but it is a lot of complexity some times when data migration, customized configurations, or other scenarios are needed. Make sure that any of this functionality is captured in stories, and documented with thorough testing.&lt;br&gt;&lt;br&gt;&lt;font size="4"&gt;&lt;b&gt;What do I test?&lt;br&gt;&lt;/b&gt;&lt;/font&gt;&lt;ul&gt;&lt;li&gt;Make sure to open the registry after you install your application, and find the key to make sure you can uninstall it later:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{guid}&lt;/li&gt;&lt;li&gt;This key's value should have the above mentioned MSIEXEC uninstall statement. Check it with an assert to make sure it's correct.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Make sure each of the assemblies and executables are sent to the correct target folder on the target machine.&lt;/li&gt;&lt;li&gt;If you support command line options or fancy things for the installer, make sure to test each and every one.&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Write the tests first of course...&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Make sure that config files, documentation, and support files (such as XML or other things) are delivered to the correct locations.&lt;/li&gt;&lt;li&gt;If any files are dynamically generated or modified by the installer with custom actions after delivery, make sure that the modifications are correct.&lt;br&gt;&lt;/li&gt;&lt;li&gt;Make sure that directories are created on install&lt;/li&gt;&lt;li&gt;Make sure that the ACL security on the folders and files is correct, if this is something your installer does.&lt;br&gt;&lt;/li&gt;&lt;li&gt;Make sure that directories are deleted on uninstall (except if logs or other artifacts are in them, they won't be deleted)&lt;br&gt;&lt;/li&gt;&lt;li&gt;Make sure these things are written in such a way that they are easy to call from a test, and that they handle errors and take care to leave the system in the same state as before the tests ran (with the software uninstalled).&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;b&gt;&lt;font size="4"&gt;Where do I run the tests?&lt;br&gt;&lt;/font&gt;&lt;/b&gt;
A word of advice: DO NOT RUN THESE TESTS ON THE BUILD SERVER... it is
tempting since they look like "unit" tests, but don't do it. Build
servers are not something we want to be messing with installing and
uninstalling software. Especially software that gets built every few
minutes... The best way to automate the whole process is to have the build server build the app, the installer, and the installer tests and deliver them to an install server, or sandbox server. This can be done through a build step that copies all the executables to a UNC share on the sandbox server after each build. The sandbox server can be set to watch for new files in a folder and automatically begin to run the tests. If you are using CruiseControl.net, this is nicely accomplished by running CC.NET on both the sandbox server and the build server. The build server can "import" the red/green status of the functional tests from the installer to its own dashboard, just as if they were local. It takes a bit of work to get this all figured out, but once it's done it is a nice way to live. I wish I had all my CC.NET code to post, but unfortunately it belongs to someone else and I don't have the rights to post it. If someone has wrapped this concept up in an easier to run turn-key package I would love to hear about it with a comment.&lt;br&gt;
&lt;br&gt;
If there are any questions about this, please feel free to comment below and I will try to reply as soon as I am able.&lt;br&gt;&lt;img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=f5421cea-42ee-4c60-8339-385ff172a931"/&gt;&lt;/div&gt;</description>
      <comments>http://testdrivendeveloper.com/CommentView,guid,f5421cea-42ee-4c60-8339-385ff172a931.aspx</comments>
      <category>TDD</category>
      <category>Testing</category>
    </item>
    <item>
      <trackback:ping>http://testdrivendeveloper.com/Trackback.aspx?guid=2dda944f-e700-47bf-9a85-4e806eae920f</trackback:ping>
      <pingback:server>http://testdrivendeveloper.com/pingback.aspx</pingback:server>
      <pingback:target>http://testdrivendeveloper.com/PermaLink,guid,2dda944f-e700-47bf-9a85-4e806eae920f.aspx</pingback:target>
      <dc:creator>John E. Boal</dc:creator>
      <wfw:comment>http://testdrivendeveloper.com/CommentView,guid,2dda944f-e700-47bf-9a85-4e806eae920f.aspx</wfw:comment>
      <wfw:commentRss>http://testdrivendeveloper.com/SyndicationService.asmx/GetEntryCommentsRss?guid=2dda944f-e700-47bf-9a85-4e806eae920f</wfw:commentRss>
      <title>Multi-threading Unit Tests</title>
      <guid isPermaLink="false">http://testdrivendeveloper.com/PermaLink,guid,2dda944f-e700-47bf-9a85-4e806eae920f.aspx</guid>
      <link>http://TestDrivenDeveloper.com/2008/06/04/MultithreadingUnitTests.aspx</link>
      <pubDate>Wed, 04 Jun 2008 21:20:10 GMT</pubDate>
      <description>&lt;div&gt;&lt;b&gt;&lt;font size="4"&gt;Why to Do It&lt;/font&gt;&lt;/b&gt;&lt;br&gt;When running lots of unit tests, there are distinct advantages in using all of those cores and cpu's that most of our modern computers have. We can parallelize testing so that we gain two distinct advantages. First, the testing will complete much faster. If you have 4 cpu's or 4 cores, we should see at least a halving of test time, if not more. Secondly, we prove our code is able to run in the closer-to-real-world scenario that other things might be going on while our code under test is executing. Plus its just cool to do multi-threading.&lt;br&gt;&lt;br&gt;The by-product or side effect benefit we get also in multi-threading our tests is that we need to put more careful thought into the design and construction of test cases, and by that virtue, our software under test. The ability to multi-thread tests is I think one of the highest bars we have in demonstrating conclusively that our software is robust.&lt;br&gt;&lt;br&gt;&lt;b&gt;&lt;font size="4"&gt;Advice on How to Do It&lt;br&gt;&lt;/font&gt;&lt;/b&gt;Separate tests into separate test assemblies that can be launched by the build server in parallel. There is no real reason to sequence tests, unless they sometimes interfere with each other. If they do interfere with each other, the tests are poorly designed and should be re-written as independent.&lt;br&gt;&lt;br&gt;See the &lt;a href="http://www.amazon.com/Pragmatic-Unit-Testing-NUnit-2nd/dp/0977616673/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1212767277&amp;amp;sr=8-1"&gt;Pragmatic Unit Testing book&lt;/a&gt; or see &lt;a href="http://thought-tracker.blogspot.com/2005/11/notes-on-pragmatic-unit-testing.html"&gt;this article&lt;/a&gt; for good advice on how to write good tests that you can parallelize.&lt;br&gt;&lt;br&gt;Tests must be thread-safe. We probably should be able to run the same test at the same time without collisions.&lt;br&gt;Tests must be TRULY independent. This usually means that tests need to generate data that is keyed specific to that test run.&lt;br&gt;Tests must not have side-effects. They must leave the test system in the state they found it.&lt;br&gt;&lt;br&gt;The new version of NUnit (2.5) is rumored to have functionality to be able to run tests in parallel threads. The currently released version has only one thread to run all the tests. In some preliminary research I have done, when manually coding up multiple threads to run each test in parallel from a single "unit test" method, it has some contradictory behavior. NUnit reports that all tests pass, but the GUI bar turns red.&lt;br&gt;&lt;br&gt;More to follow on multi-threading test with MS Test...&lt;br&gt;&lt;p&gt;&lt;/p&gt;&lt;img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=2dda944f-e700-47bf-9a85-4e806eae920f"/&gt;&lt;/div&gt;</description>
      <comments>http://testdrivendeveloper.com/CommentView,guid,2dda944f-e700-47bf-9a85-4e806eae920f.aspx</comments>
      <category>C#</category>
      <category>TDD</category>
      <category>Testing</category>
    </item>
    <item>
      <trackback:ping>http://testdrivendeveloper.com/Trackback.aspx?guid=5b08a3b3-85a8-4c3b-b6d3-76cf1c796f8c</trackback:ping>
      <pingback:server>http://testdrivendeveloper.com/pingback.aspx</pingback:server>
      <pingback:target>http://testdrivendeveloper.com/PermaLink,guid,5b08a3b3-85a8-4c3b-b6d3-76cf1c796f8c.aspx</pingback:target>
      <dc:creator>John E. Boal</dc:creator>
      <wfw:comment>http://testdrivendeveloper.com/CommentView,guid,5b08a3b3-85a8-4c3b-b6d3-76cf1c796f8c.aspx</wfw:comment>
      <wfw:commentRss>http://testdrivendeveloper.com/SyndicationService.asmx/GetEntryCommentsRss?guid=5b08a3b3-85a8-4c3b-b6d3-76cf1c796f8c</wfw:commentRss>
      <title>Testing the Paint Truck</title>
      <guid isPermaLink="false">http://testdrivendeveloper.com/PermaLink,guid,5b08a3b3-85a8-4c3b-b6d3-76cf1c796f8c.aspx</guid>
      <link>http://TestDrivenDeveloper.com/2008/06/03/TestingThePaintTruck.aspx</link>
      <pubDate>Tue, 03 Jun 2008 18:55:32 GMT</pubDate>
      <description>&lt;div&gt;&lt;P&gt;I was explaining to someone about different types of testing I do with my code, and how mock objects can be used in unit tests. I used the example of the paint truck at the airport that spray-paints lines on the tarmac. Its job is to put down wide lines, narrow lines, in yellow, and white, and of a certain length, at specific places on the runways and taxiways. The truck is driven by a person, and the paint spray system is operated by&amp;nbsp;driver. It's not a perfect example, but it may get the point across.&lt;/P&gt;
&lt;P&gt;When we model this with truck software and try to test it,&amp;nbsp;most developers seem to tend to go right for testing the whole solution end to end.&amp;nbsp;That means&amp;nbsp;trying to figure out how to fire up the engine, position the truck at&amp;nbsp;certain coordinates, be at a certain speed, and then test the spray gun and see if it paints the correct stripes. It's a hard problem to solve, to try to set up with all these things&amp;nbsp;and get it just right - just to see if the painter works properly. It can be a daunting task to try to test software this way, yet most developers who do "unit testing" are trying to do just this kind of thing. My take is that this is not really "unit testing" but actually "functional" testing. While it is definitely good to have functional tests, I prefer my development team to focus on more narrow areas such as individual classes. If these are thoughtfully designed and&amp;nbsp;tested individually, they should work well when combined. This is also where integration and scenario testing come in. These types of tests are beyond the scope of unit tests.&lt;/P&gt;
&lt;P&gt;Let me give an example that explains how we might be able to go about testing this a bit more carefully. Let's take the truck as a single "system" and the paint sprayer as a separate "system." These systems are really not very coupled - the sprayer runs on the truck's electric system, but that's about it. It makes sense to decouple them in trying to test them.&lt;/P&gt;
&lt;P&gt;If we separate out the sprayer as a separate system, the only inputs it needs from the truck&amp;nbsp;are the electrical connection and the trigger input. We can "mock" out these connections by supplying a new power source and trigger input connector&amp;nbsp;that has the same "interface" (that is -&amp;nbsp;implements the same interface class in code). Now we can test the system without needing to have the actual truck around. This is the&amp;nbsp;concept of mock objects at its best in unit testing.&lt;/P&gt;
&lt;P&gt;We can separate even the power mock object from the trigger mock object. We can control how these mock objects behave precisely, and keep them in specific states so that the only variables under test are in the sprayer system. We can then test what happens to the sprayer if we make the power go away, what happens if we trigger both paint guns at the same time, and making sure we can turn on and off each gun. These make great unit tests and document how our code is supposed to work. They should run very fast, and not require any diesel fuel...&lt;/P&gt;
&lt;P&gt;All of the ability we have to be able to mock things like this, depends on programming to interfaces, which is a long-time engineering best practice to avoid decoupling. If we design our software to implement interfaces, we can then easily substitute dependency systems at test time with our own controlled version, and focus the testing on a more narrow area, while making the tests run faster at the same time.&lt;/P&gt;&lt;img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=5b08a3b3-85a8-4c3b-b6d3-76cf1c796f8c"/&gt;&lt;/div&gt;</description>
      <comments>http://testdrivendeveloper.com/CommentView,guid,5b08a3b3-85a8-4c3b-b6d3-76cf1c796f8c.aspx</comments>
      <category>TDD</category>
      <category>Testing</category>
      <category>Mocks</category>
    </item>
    <item>
      <trackback:ping>http://testdrivendeveloper.com/Trackback.aspx?guid=479d0bc6-9415-477b-ab7c-1df1e67ea53f</trackback:ping>
      <pingback:server>http://testdrivendeveloper.com/pingback.aspx</pingback:server>
      <pingback:target>http://testdrivendeveloper.com/PermaLink,guid,479d0bc6-9415-477b-ab7c-1df1e67ea53f.aspx</pingback:target>
      <dc:creator>John E. Boal</dc:creator>
      <wfw:comment>http://testdrivendeveloper.com/CommentView,guid,479d0bc6-9415-477b-ab7c-1df1e67ea53f.aspx</wfw:comment>
      <wfw:commentRss>http://testdrivendeveloper.com/SyndicationService.asmx/GetEntryCommentsRss?guid=479d0bc6-9415-477b-ab7c-1df1e67ea53f</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <title>Tools and Tips</title>
      <guid isPermaLink="false">http://testdrivendeveloper.com/PermaLink,guid,479d0bc6-9415-477b-ab7c-1df1e67ea53f.aspx</guid>
      <link>http://TestDrivenDeveloper.com/2008/06/03/ToolsAndTips.aspx</link>
      <pubDate>Tue, 03 Jun 2008 06:31:40 GMT</pubDate>
      <description>&lt;div&gt;I have been using TestDriven.net as a tool now for a few weeks, and I have to say that it is a fine addition to my tools collection. It gives me the flexibility I need to run tests in any manner I choose, simply by right-clicking. It's a Visual Studio add-in for 2005, and 2008, and it works seamlessly with a variety of test frameworks (NUnit, MbUnit, and MSTest being the most notable).&lt;br&gt;&lt;p&gt;&lt;/p&gt;&lt;br&gt;Speaking of NUnit, another excellent tool that I find invaluable to help me test my code. NUnit now has RowTest extensions (like MbUnit) in the production release (2.4.7 and if you aren't using this version, you should upgrade), and &lt;a href="http://blogs.nunit.com/"&gt;Parameterized Tests&lt;/a&gt; coming soon, and they look really cool. I find that I can replace a lot of repetition in my tests with this row based system. It enables me to write more tests faster, and that's always good. I am hoping that the new release goes into production mode very soon.&lt;br&gt;&lt;br&gt;UI testing with Selenium is another favorite topic, I will write up another article later with examples of how to do real automated user interface testing using NUnit and Selenium. However, feel free to start playing with it now... its a great tool also, and plays nicely with the other tools in the toolbox.&lt;br&gt;&lt;br&gt;Use these tools in good health, to help get your code into production as bug-free as possible by testing the heck out of it!&lt;br&gt;&lt;br&gt;P.S.&lt;br&gt;Please make your unit tests into separate assemblies... no one-massive-monolithic-test assemblies please... and the tests should run FAST. If you mock out all the database, network, web service, etc. calls, you should be able to get all of your tests in an assembly run in under 5 seconds. Aim for a target of 100 tests per second, and you will be a much happier camper.&lt;br&gt;&lt;br&gt;If you are a real stickler for this (and I recommend it...) add this code to your test assemblies:&lt;br&gt;&lt;pre&gt;&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;private&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;static&lt;/span&gt; DateTime assemblyStart;

 [ClassInitialize]
 &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;public&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;static&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;void&lt;/span&gt; MyClassInitialize(TestContext testContext)
 {
     assemblyStart &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; DateTime.Now;
 }

 [TestCleanup]
 &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;public&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;static&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;void&lt;/span&gt; TestCleanup()
 {
     Assert.IsTrue(
         assemblyStart.AddMilliseconds(5000) &amp;gt; DateTime.Now,
         &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"Tests took too long to execute."&lt;/span&gt;);
 }
&lt;/span&gt;&lt;/pre&gt;Enjoy!&lt;br&gt;&lt;img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=479d0bc6-9415-477b-ab7c-1df1e67ea53f"/&gt;&lt;/div&gt;</description>
      <comments>http://testdrivendeveloper.com/CommentView,guid,479d0bc6-9415-477b-ab7c-1df1e67ea53f.aspx</comments>
      <category>C#</category>
      <category>TDD</category>
      <category>Testing</category>
    </item>
    <item>
      <trackback:ping>http://testdrivendeveloper.com/Trackback.aspx?guid=9eda991a-3ada-4e70-84d8-1194fa5edda7</trackback:ping>
      <pingback:server>http://testdrivendeveloper.com/pingback.aspx</pingback:server>
      <pingback:target>http://testdrivendeveloper.com/PermaLink,guid,9eda991a-3ada-4e70-84d8-1194fa5edda7.aspx</pingback:target>
      <dc:creator>John E. Boal</dc:creator>
      <wfw:comment>http://testdrivendeveloper.com/CommentView,guid,9eda991a-3ada-4e70-84d8-1194fa5edda7.aspx</wfw:comment>
      <wfw:commentRss>http://testdrivendeveloper.com/SyndicationService.asmx/GetEntryCommentsRss?guid=9eda991a-3ada-4e70-84d8-1194fa5edda7</wfw:commentRss>
      <title>Acceptance Test Driven Development, Explained</title>
      <guid isPermaLink="false">http://testdrivendeveloper.com/PermaLink,guid,9eda991a-3ada-4e70-84d8-1194fa5edda7.aspx</guid>
      <link>http://TestDrivenDeveloper.com/2008/04/02/AcceptanceTestDrivenDevelopmentExplained.aspx</link>
      <pubDate>Wed, 02 Apr 2008 06:10:03 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;Acceptance criteria should be our 
measuring stick when we write software. These criteria should give us the 
direction to go in writing features, and ultimately the final answer on whether 
the software is "done" or meets the customer's need. When the customer (or the 
customer representative, product owner, or business analyst) gives us a notion 
of what the software is to do for them, it represents a guideline and a goal for 
our development. 
&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;!-- BOF buynow --&gt;&lt;!-- EOF buynow --&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;This article is a discussion of ATDD 
in an Agile development context with Scrum project management and Extreme 
Programming [XP] development methodology. However it does not apply specifically 
to Agile. These same techniques can be applied with almost any mechanism. 
&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;!-- BOF buynow --&gt;&lt;!-- EOF buynow --&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;Test-Driven Development [TDD] says 
that we should first write a test before we write the code. This forces us to 
understand clearly what the code is to do, because we have to write the test to 
verify it. Writing the test is usually the hard part - the code next is easier. 
This is where the discipline of TDD is most needed. The test itself should be 
failing when executed, since we don't have the code under test [CUT]. This is a 
good sign - we need to actually "test the test." We then write as little CUT 
code as needed, just to make the test pass. Then, we start all over again - 
write a test, some more code, etc. We refactor the CUT as needed, to make it a 
cohesive, maintainable design, while still keeping all the tests passing. In 
this way, we have a complete test framework wrapped around our high-quality 
code, which makes certain that the code always functions the way we intended no 
matter what kinds of changes we make internally to it. &lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;!-- BOF buynow --&gt;&lt;!-- EOF buynow --&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;This process of TDD as described, is 
the traditional mechanism we now refer to at Unit Test-Driven Development, or 
UTDD. There are higher-level tests that we can write also, that have the same 
impact on our development process. Applying this same concept of a failing test 
driving us to write code is where this discussion now leads, but at one level of 
abstraction higher. We now look to the Acceptance Criteria to drive our TDD, or 
now ATDD. 
&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;!-- BOF buynow --&gt;&lt;!-- EOF buynow --&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;font color="#052230" face="Arial" size="2"&gt;&lt;font color="#052230" face="Arial" size="2"&gt;&lt;img src="/content/binary/ATDDdiagram.gif" border="0" height="561" width="791"&gt;&lt;/font&gt;&lt;/font&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;1. Acceptance Criteria gives us a 
target for writing Automated Acceptance Tests [AAT's] a. Acceptance Criteria 
need to be written into an executable set of automated tests. b. AAT's should be 
able demonstrate to the customer that their criteria for the functionality has 
been met. c. Ideally, this should include as much detail as the requirements 
bear out, and as many tests and checks are necessary to convey that each of the 
criteria has been accounted for. &lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;!-- BOF buynow --&gt;&lt;!-- EOF buynow --&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;2. AAT's give us a reason to write 
code (they are failing - no CUT yet) a. AAT's can be written before writing the 
code, or written one at a time following this process. &lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;!-- BOF buynow --&gt;&lt;!-- EOF buynow --&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;3. We now write the empty framework 
for the CUT. Some AAT's may still be failing, but that's OK. a. This step 
deviates from strict TDD in that we are writing code, but not for the intent of 
passing a test. b. One example is that if a criteria states that a customer is 
able to bring up a web page with a set of information, obviously we need to 
provide a web page. c. This framework concept is creating the empty page or 
container for the code we are going to write. d. The empty framework should not 
cause AAT's to pass, because AAT's should written to test at a higher level of 
functionality. 
&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;!-- BOF buynow --&gt;&lt;!-- EOF buynow --&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;4. To make the AAT's pass, we need to 
start providing the functionality inside the empty framework. Here we need to 
apply the standard TDD concepts, and write a failing unit test. &lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;!-- BOF buynow --&gt;&lt;!-- EOF buynow --&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;5. We now have a failing unit test, so 
we write enough CUT to pass that test. &lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;!-- BOF buynow --&gt;&lt;!-- EOF buynow --&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;6. We repeat at step 4, refactor, and 
continue following the UTDD process as described above. &lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;!-- BOF buynow --&gt;&lt;!-- EOF buynow --&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;7. When the functionality that the 
AAT's require is there, they will be passing, Unit Tests [UT's] are passing, and 
our story (feature) is complete. We now continue to step 1 again for the next 
story. 
&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;!-- BOF buynow --&gt;&lt;!-- EOF buynow --&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;&lt;font size="2"&gt;&lt;span style="font-weight: bold; font-family: Verdana;"&gt;How do I do it? What do I need 
to get started?&lt;/span&gt;&lt;br style="font-weight: bold; font-family: Verdana;"&gt;&lt;br style="font-family: Verdana;"&gt;&lt;span style="font-family: Verdana;"&gt;Acceptance Test 
Driven Development is a practice that can yield good returns on the time 
invested. Customers will be pleased with the software they receive, bugs will be 
fewer, and delivery times will be shorter. However, there are a few things that 
are needed to make this practice effective in an 
organization.&lt;br&gt;&lt;br&gt;&lt;/span&gt;&lt;/font&gt;
&lt;/font&gt;&lt;ol&gt;&lt;font color="#052230" face="Arial" size="2"&gt;&lt;li&gt;&lt;font size="2"&gt;Buy-in&lt;/font&gt;
&lt;ol&gt;&lt;li&gt;&lt;font size="2"&gt;People must be bought-in to the concept that test driven 
development is a good thing.&lt;/font&gt;
&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Management must support this practice, for if not, it will be a 
much more difficult thing to accomplish.&lt;/font&gt;
&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Developers must be willing to put aside their "classical" 
training and try something new.&lt;br&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Testing Tools&lt;/font&gt;&lt;font color="#052230" face="Arial" size="2"&gt;&lt;/font&gt;
&lt;ol&gt;&lt;li&gt;&lt;font size="2"&gt;If we can't write an automated acceptance test for our product, 
we can't do ATDD. We need a tool designed for testing the particular type of 
product we are shipping.&lt;/font&gt;
&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Story Test IQ [STIQ] is a great tool for automated testing of 
web applications. Straight Selenium RC under C# code, driven by NUnit also works great, in my experience. VSTS has some good tools also, as do Fiddler, and probably 
lots of other products.&lt;/font&gt;
&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;The framework must be in place on day 1 of the iteration to 
begin writing acceptance tests. If it isn't available, we won't be able to do 
ATDD.&lt;br&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Skills&lt;/font&gt;
&lt;ol&gt;&lt;li&gt;&lt;font size="2"&gt;Developers need the skills to be able to envision what is to be 
delivered, and be able to write automated test scenarios for the acceptance 
criteria.&lt;br&gt;&lt;/font&gt;
&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Testers need to be able to validate that the tests cover enough 
of the functionality through testing the criteria, and provide other functional, 
integration, load, and performance tests in addition to the developers' unit 
tests and acceptance tests.&lt;br&gt;&lt;/font&gt;
&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Management needs to be able to direct the right resources at 
tasks, no matter whether they are Development or Test tasks. Sometimes it's best 
to blur the lines between the disciplines to make this practice most 
effective.&lt;br&gt;&lt;/font&gt;
&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Customers need to be aware that they are actually going to get 
what they specify (and perhaps ONLY that much). Education on criteria evolution 
is almost always required for customers. Don't be surprised if only 50% of the 
criteria are discovered in sprint planning a&lt;/font&gt;&lt;font size="2"&gt;nd story generation for the first 
couple of iterations.&lt;br&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Experience&lt;/font&gt;
&lt;ol&gt;&lt;li&gt;&lt;font size="2"&gt;TDD takes discipline, and ATDD even more so. This is not a 
practice for an organization just beginning down the road of TDD. Put in at 
least 6 iterations of using strict TDD first before trying ATDD. The experience 
gained with using TDD will naturally flow into ATDD, and the organization and 
the customers will see the benefits.&lt;br&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Perseverance&lt;/font&gt;
&lt;ol&gt;&lt;li&gt;&lt;font size="2"&gt;Good things don't happen instantly. It takes some time to see 
the benefits of ATDD.&lt;/font&gt;
&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Be patient for a few sprints. It should take approximately 
three iterations to get it dialed in.&lt;br&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Customer Cooperation&lt;/font&gt;
&lt;ol&gt;&lt;li&gt;&lt;font size="2"&gt;Customers must be available for providing their criteria for 
acceptance.&lt;/font&gt;
&lt;/li&gt;&lt;li&gt;&lt;font size="2"&gt;Customers generally are not experts in this type of 
"specification" of criteria, and must often be helped through the process at 
first, to generate usable criteria.&lt;br&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/font&gt;&lt;/ol&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=9eda991a-3ada-4e70-84d8-1194fa5edda7"/&gt;&lt;/div&gt;</description>
      <comments>http://testdrivendeveloper.com/CommentView,guid,9eda991a-3ada-4e70-84d8-1194fa5edda7.aspx</comments>
      <category>ATDD</category>
      <category>TDD</category>
      <category>Testing</category>
    </item>
    <item>
      <trackback:ping>http://testdrivendeveloper.com/Trackback.aspx?guid=6a38c2cf-ed78-4deb-8ad3-c3f2afa9c38c</trackback:ping>
      <pingback:server>http://testdrivendeveloper.com/pingback.aspx</pingback:server>
      <pingback:target>http://testdrivendeveloper.com/PermaLink,guid,6a38c2cf-ed78-4deb-8ad3-c3f2afa9c38c.aspx</pingback:target>
      <dc:creator>John E. Boal</dc:creator>
      <wfw:comment>http://testdrivendeveloper.com/CommentView,guid,6a38c2cf-ed78-4deb-8ad3-c3f2afa9c38c.aspx</wfw:comment>
      <wfw:commentRss>http://testdrivendeveloper.com/SyndicationService.asmx/GetEntryCommentsRss?guid=6a38c2cf-ed78-4deb-8ad3-c3f2afa9c38c</wfw:commentRss>
      <title>Testing? Aren't I a Developer?</title>
      <guid isPermaLink="false">http://testdrivendeveloper.com/PermaLink,guid,6a38c2cf-ed78-4deb-8ad3-c3f2afa9c38c.aspx</guid>
      <link>http://TestDrivenDeveloper.com/2008/03/24/TestingArentIADeveloper.aspx</link>
      <pubDate>Mon, 24 Mar 2008 05:47:08 GMT</pubDate>
      <description>&lt;div&gt;&lt;p&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;Aren't developers just supposed to 
write their code and let the test team test it? 
&lt;/font&gt;&lt;p&gt;&lt;font color="#052230" face="Arial" size="2"&gt;ahem. 
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#052230" face="Arial" size="2"&gt;no. 
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#052230" face="Arial" size="2"&gt;As a developer, I take pride in delivering *working* software. If I don't 
test my own software, I think that I'm really failing to do my job. Testing is 
not just for "testers." 
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#052230" face="Arial" size="2"&gt;As a professional software engineer, I need have not only unit tests for my 
code (a Development practice by the way), but I also need to write automated 
functional tests to make sure that all the functionality works as I think it 
should. Then, I need to have automated Acceptance tests that tell me if indeed 
the whole system works together to deliver the business solution that the story 
or requirements describe. 
&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td colspan="2" align="center"&gt;&lt;font color="#96372b" face="Arial" size="+1"&gt;Acceptance 
Tests &lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;Why do I start with acceptance tests? 
&lt;/font&gt;&lt;p&gt;&lt;font color="#052230" face="Arial" size="2"&gt;Because... they should drive the entire development process. Test-Driven 
Development doesn't necessarily have to *always* mean Unit Test-Driven 
Development... 
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#052230" face="Arial" size="2"&gt;The Acceptance tests drive me to write code.&lt;br&gt;In order to write code, I 
need a unit test.&lt;br&gt;Then I can write the code that passes the unit test and the 
acceptance test.
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#052230" face="Arial" size="2"&gt;job well done. 
&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td colspan="2" align="center"&gt;&lt;font color="#96372b" face="Arial" size="+1"&gt;Unit Tests 
&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;I write enough unit tests to be able 
to make sure that the functionality I write works as I intended. Not too many - 
tests require maintenance as well as the code they test - but enough to ensure 
that it's safe to refactor just about anything in the code and make sure that it 
still works as intended. This is the safety net that unit tests provide. 
&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;!-- BOF buynow --&gt;&lt;!-- EOF buynow --&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td colspan="2" align="center"&gt;&lt;font color="#96372b" face="Arial" size="+1"&gt;Code 
&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;Write some. It should make the tests 
pass. Failure is not an option. &lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;!-- BOF buynow --&gt;&lt;!-- EOF buynow --&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td colspan="2" align="center"&gt;&lt;font color="#96372b" face="Arial" size="+1"&gt;Functional 
Tests &lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;We need to make sure that all the 
pieces of functionality behave in a known way. This is what functional testing 
does. 
&lt;/font&gt;&lt;p&gt;&lt;br&gt;&lt;br&gt;&lt;!-- BOF buynow --&gt;&lt;!-- EOF buynow --&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td colspan="2" align="center"&gt;&lt;font color="#96372b" face="Arial" size="+1"&gt;Integration 
Tests &lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;We need to make sure that all the 
systems co-operate. Integration tests are deeper yet than functional tests, 
these are more like "end-to-end" tests of particular scenarios. Usually these 
scenarios cover all the happy paths of end-to-end, and most likely a couple of 
failure scenarios as well, to illustrate how the system overall behaves in 
failure modes. 
&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;!-- BOF buynow --&gt;&lt;!-- EOF buynow --&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td colspan="2" align="center"&gt;&lt;font color="#96372b" face="Arial" size="+1"&gt;Deployment 
Tests &lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;You DID want to INSTALL the software 
and use it, right? 
&lt;/font&gt;&lt;p&gt;&lt;font color="#052230" face="Arial" size="2"&gt;So... you got a test for that? 
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#052230" face="Arial" size="2"&gt;Sure you do. 
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#052230" face="Arial" size="2"&gt;Deployment tests are essential for making sure the software delivers and 
configures the binary bits in a way that's useful to the user. Uninstall is a 
particularly critical issue as well. Make sure that you have complete testing 
around these critical fundamental features of the software. &lt;/font&gt;&lt;br&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=6a38c2cf-ed78-4deb-8ad3-c3f2afa9c38c"/&gt;&lt;/div&gt;</description>
      <comments>http://testdrivendeveloper.com/CommentView,guid,6a38c2cf-ed78-4deb-8ad3-c3f2afa9c38c.aspx</comments>
      <category>ATDD</category>
      <category>TDD</category>
      <category>Testing</category>
    </item>
    <item>
      <trackback:ping>http://testdrivendeveloper.com/Trackback.aspx?guid=01948cfb-2778-4a70-b766-85bc690d660f</trackback:ping>
      <pingback:server>http://testdrivendeveloper.com/pingback.aspx</pingback:server>
      <pingback:target>http://testdrivendeveloper.com/PermaLink,guid,01948cfb-2778-4a70-b766-85bc690d660f.aspx</pingback:target>
      <dc:creator>John E. Boal</dc:creator>
      <wfw:comment>http://testdrivendeveloper.com/CommentView,guid,01948cfb-2778-4a70-b766-85bc690d660f.aspx</wfw:comment>
      <wfw:commentRss>http://testdrivendeveloper.com/SyndicationService.asmx/GetEntryCommentsRss?guid=01948cfb-2778-4a70-b766-85bc690d660f</wfw:commentRss>
      <title>About TestDrivenDeveloper.com</title>
      <guid isPermaLink="false">http://testdrivendeveloper.com/PermaLink,guid,01948cfb-2778-4a70-b766-85bc690d660f.aspx</guid>
      <link>http://TestDrivenDeveloper.com/2008/02/12/AboutTestDrivenDevelopercom.aspx</link>
      <pubDate>Tue, 12 Feb 2008 06:33:29 GMT</pubDate>
      <description>&lt;div&gt;&lt;h2&gt;&lt;font color="#96372b" face="Arial" size="+1"&gt;Test Driven Developer 
&lt;/font&gt;&lt;/h2&gt;
&lt;h3&gt;&lt;img src="/content/binary/USFlag.JPG" border="0" height="285" width="322"&gt;&lt;/h3&gt;&lt;br&gt;&lt;h3&gt;&lt;font color="#000000" face="Arial" size="2"&gt;Assert.AreEqual(13, stripes);&lt;br&gt;Assert.AreEqual(50, stars); 
&lt;br&gt;see&lt;/font&gt;&lt;font color="#000000" face="Arial" size="2"&gt;ms like enough tests to me...&lt;br&gt;&lt;br&gt;NOT! &lt;/font&gt;&lt;/h3&gt;
&lt;p&gt;
&lt;/p&gt;&lt;h2&gt;
&lt;/h2&gt;&lt;p&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;Welcome to Test Driven Developer! This 
site is dedicated to those who understand the benefits of test-first 
development, and the advancement of the practice. &lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;!-- BOF buynow --&gt;&lt;!-- EOF buynow --&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!-- EOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- BOF: ./personal-templates/simple/generic/paragraphs/style.1 --&gt;
&lt;table border="0" cellpadding="10" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;font color="#052230" face="Arial" size="2"&gt;It is sometimes hard to convince 
traditionally trained developers that it is better to write a test first, before 
writing the code. In Test Driven Development, we always write a test first 
before writing the code. 
&lt;/font&gt;&lt;p&gt;&lt;font color="#052230" face="Arial" size="2"&gt;Many developers are hard to convince to use this methodology. It is very 
often difficult for a developer to understand completely what the code needs to 
do. Yet - they want to proceed to write it anyway? It's kind of a flaw in the 
thinking process. 
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#052230" face="Arial" size="2"&gt;Lucky that you are smart enough to know that there's a better way..&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;font color="#000000" face="Arial" size="2"&gt;TDD is not a Java thing. It's 
not a .NET thing. It's not language dependent. Anyone can do test-first 
development, for literally any kind of software development. 
&lt;/font&gt;&lt;p&gt;&lt;font color="#000000" face="Arial" size="2"&gt;Figuring out the test for some code is always the hard part... that's why we 
like to do it first, and get it out of the way. 
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#000000" face="Arial" size="2"&gt;TestDrivenDeveloper.com is a &lt;a href="http://johnboal.com" target="_jeb"&gt;John 
E. Boal&lt;/a&gt; web site. Please see also my &lt;a href="http://jboal.com" target="_blog"&gt;personal blog&lt;/a&gt; and my &lt;a href="http://BitsNWidgets.com" target="_bnw"&gt;Agile Development blog&lt;/a&gt; &lt;/font&gt;&lt;/p&gt;&lt;img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=01948cfb-2778-4a70-b766-85bc690d660f"/&gt;&lt;/div&gt;</description>
      <comments>http://testdrivendeveloper.com/CommentView,guid,01948cfb-2778-4a70-b766-85bc690d660f.aspx</comments>
      <category>TDD</category>
      <category>Testing</category>
    </item>
  </channel>
</rss>