<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom">
  <title>Test Driven Developer</title>
  <link rel="alternate" type="text/html" href="http://testdrivendeveloper.com/" />
  <link rel="self" href="http://testdrivendeveloper.com/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2008-11-15T13:20:22.546875-08:00</updated>
  <author>
    <name>John E. Boal</name>
  </author>
  <subtitle>You got a TEST for that?</subtitle>
  <id>http://testdrivendeveloper.com/</id>
  <generator uri="http://dasblog.info/" version="2.1.8102.813">DasBlog</generator>
  <entry>
    <title>Unit Testing and Test Driven Development - a Practical Guide</title>
    <link rel="alternate" type="text/html" href="http://TestDrivenDeveloper.com/2008/11/15/UnitTestingAndTestDrivenDevelopmentAPracticalGuide.aspx" />
    <id>http://testdrivendeveloper.com/PermaLink,guid,e36a37f3-53c9-460d-8042-ee50090f0ad0.aspx</id>
    <published>2008-11-15T13:08:59.015625-08:00</published>
    <updated>2008-11-15T13:20:22.546875-08:00</updated>
    <category term="ATDD" label="ATDD" scheme="http://testdrivendeveloper.com/CategoryView,category,ATDD.aspx" />
    <category term="Mocks" label="Mocks" scheme="http://testdrivendeveloper.com/CategoryView,category,Mocks.aspx" />
    <category term="Refactoring" label="Refactoring" scheme="http://testdrivendeveloper.com/CategoryView,category,Refactoring.aspx" />
    <category term="Selenium" label="Selenium" scheme="http://testdrivendeveloper.com/CategoryView,category,Selenium.aspx" />
    <category term="TDD" label="TDD" scheme="http://testdrivendeveloper.com/CategoryView,category,TDD.aspx" />
    <category term="Testing" label="Testing" scheme="http://testdrivendeveloper.com/CategoryView,category,Testing.aspx" />
    <category term="Unit Tests" label="Unit Tests" scheme="http://testdrivendeveloper.com/CategoryView,category,UnitTests.aspx" />
    <category term="SQL" label="SQL" scheme="http://testdrivendeveloper.com/CategoryView,category,SQL.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">Here is a presentation I wrote on what Unit
Testing is all about, and how TDD fits into the ATDD cycle.<br /><br />
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.<br /><br />
This presentation is in PDF format, but I can post the PPTX format also if needed.<br /><p></p><a href="http://testdrivendeveloper.com/content/binary/A%20Practical%20Guide%20to%20Unit%20Testing1.pdf">A
Practical Guide to Unit Testing1.pdf (503.29 KB)</a><br /><br /><img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=e36a37f3-53c9-460d-8042-ee50090f0ad0" /></div>
    </content>
  </entry>
  <entry>
    <title>November Agile Beer Night is Nov 20</title>
    <link rel="alternate" type="text/html" href="http://TestDrivenDeveloper.com/2008/11/15/NovemberAgileBeerNightIsNov20.aspx" />
    <id>http://testdrivendeveloper.com/PermaLink,guid,e0963ca0-a741-4795-b40f-c1e8f0f5e038.aspx</id>
    <published>2008-11-15T13:06:29.765625-08:00</published>
    <updated>2008-11-15T13:08:52.5-08:00</updated>
    <category term="ABN" label="ABN" scheme="http://testdrivendeveloper.com/CategoryView,category,ABN.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">For all of you who enjoy beer and talking
about Agile Software Development... Agile Beer Night is for you! See the <a href="http://AgileBUG.com">Agile
Beer Users Group web site</a> for more information about the meeting location. It's
at Daman's Pub from 5PM-7PM.<br /><p></p><img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=e0963ca0-a741-4795-b40f-c1e8f0f5e038" /></div>
    </content>
  </entry>
  <entry>
    <title>Test-Driven Process Improvement with Refactoring, Value Stream Mapping, and Windows Workflow</title>
    <link rel="alternate" type="text/html" href="http://TestDrivenDeveloper.com/2008/10/30/TestDrivenProcessImprovementWithRefactoringValueStreamMappingAndWindowsWorkflow.aspx" />
    <id>http://testdrivendeveloper.com/PermaLink,guid,729dde91-6a43-4e82-88ec-356af2667b62.aspx</id>
    <published>2008-10-30T13:47:03.843-07:00</published>
    <updated>2008-10-30T09:23:55.0675-07:00</updated>
    <category term="Automation" label="Automation" scheme="http://testdrivendeveloper.com/CategoryView,category,Automation.aspx" />
    <category term="Refactoring" label="Refactoring" scheme="http://testdrivendeveloper.com/CategoryView,category,Refactoring.aspx" />
    <category term="TDD" label="TDD" scheme="http://testdrivendeveloper.com/CategoryView,category,TDD.aspx" />
    <category term="Tools" label="Tools" scheme="http://testdrivendeveloper.com/CategoryView,category,Tools.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">Value Stream Mapping [VSM] is a lean concept
that helps us improve our processes by focusing on the whole process and making stepwise
refinements on smaller parts of the process, to gain improvement for the whole. It
is in a sense, "Refactoring" a process.<br /><br />
In an ideal case, a process can be thought of as a workflow, and perhaps we might
be able to represent it using the WF Windows Workflow Foundation code delivered in
.NET 3.5. It would be nice to show a code example here of how we can represent a process
with workflow steps, but I didn't have time to write up an example as of yet.<br /><br />
With VSM, we are trying to improve a process by mapping it into parts, each of which
we can study. We can gather metrics on each of the process steps, and metrics on how
long things wait between steps. The waiting between steps is usually far more significant
time-wise than any of the steps themselves. WF can be instrumental in providing an
automated framework for collecting and reporting these metrics.<br /><br />
Indeed there are also other workflow alternatives of course. BizTalk Server 2006 R2
is a fine candidate for workflow representation as well, when adapters are available
for systems that interoperate. I have a specific Microsoft focus in my career, but
I have used CapeClear as a Java-based workflow system, and there are others in the
ESB space which have features that would allow us to collect metrics on an automated
representation of our processes.<br /><br />
Automation is key to refactoring, as in any development mechanism. We can't fix what
we don't know is broken. With VSM, we focus on the entire process as a whole, so we
need to collect measurements on where it is today, and then we can see total improvement
on the whole as we make small changes (refactoring the process).<br /><br />
Many enterprises today use Service-Oriented Architecture [SOA] as a design pattern
for the construction of enterprise systems. This architecture lends itself well to
the use of WF or BizTalk (substiitute your favorite flavor here) workflow components.
SOA helps us to map the entire process to blocks of functionality that we can measure
and monitor easily, contributing to our VSM overall picture.<br /><br />
My theory is that like with software development, process improvement can also have
a test-driven, scientific approach. VSM is a tool that helps us change the right things
to improve our overall process, but it typically has measurements in large units -
days, even weeks. With the right automation framework contributing to very rapid feedback
with the metrics collected on processes, we can write tests that indicate Red or Green
for not only each component being analyzed, but for the entire process as well.<br /><br />
Tests don't have to be in the form of an NUnit DLL or test fixture. We can use simple
reports actually to give us the feedback we need to make decisions on how we refactor.
Think of it as moving test-driven concepts a couple elevations higher in the plan
view. From the 500 foot view to the 5000 foot view if you will. It's the exact same
concept, just applied at a somewhat higher level of abstraction.<br /><br />
For each of our services we monitor the time taken in the process and the time between
processes, and compare them to our initial baseline. We might even be able to get
real-time data on a visible dashboard in the best of cirumstances. When we are better
than our initial baseline, we are Green, if not, then we're Red. There is no yellow
- same result means we haven't improved so it's still red. This concept is brutally
simple, but it can be very effective, especially if the Red/Green report is made visible
on a web-based report.<br /><br />
Mapping the workflow using WF, BizTalk, or other tools gives us a way to take automated
measurements and compare them to our baseline to render a decision on whether our
process has improved or not, and whether we are reaching our overall goal of total
improvement. Individual portions of the whole can still be red as long as we achieve
green for the overall process.<br /><br />
A business process really is a workflow, we just need to map it as such using software
and automation. In this way we can apply the fine concepts of test-driven and refactoring
to process improvement, once again using automation and measurement as our top key
tools for leveraging our own technologies to help us improve them.<br /><br />
Code examples here would be good of course... Stay tuned for future posts with WF
code examples of a process flow that has metrics and baseline comparisons for Red/Green.<br /><p></p><img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=729dde91-6a43-4e82-88ec-356af2667b62" /></div>
    </content>
  </entry>
  <entry>
    <title>More Tips for Unit Testing in Iron Python</title>
    <link rel="alternate" type="text/html" href="http://TestDrivenDeveloper.com/2008/10/07/MoreTipsForUnitTestingInIronPython.aspx" />
    <id>http://testdrivendeveloper.com/PermaLink,guid,10a8368d-9191-4f9c-bc29-ca957bb111e5.aspx</id>
    <published>2008-10-07T09:09:49.86675-07:00</published>
    <updated>2008-10-07T09:18:45.819875-07:00</updated>
    <category term="Python" label="Python" scheme="http://testdrivendeveloper.com/CategoryView,category,Python.aspx" />
    <category term="Testing" label="Testing" scheme="http://testdrivendeveloper.com/CategoryView,category,Testing.aspx" />
    <category term="Unit Tests" label="Unit Tests" scheme="http://testdrivendeveloper.com/CategoryView,category,UnitTests.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">Do you ever wonder why there is an extra
"False" printed at the end of each run for unit tests?<br /><br /><font face="Courier New">C:\Code\sample&gt;ipy UnitTests.py<br />
.....<br />
----------------------------------------------------------------------<br />
Ran 5 tests in 0.395s<br /><br />
OK<br />
False</font><br /><br />
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:<br /><br /><font face="Courier New"><font color="#0000ff">if</font> __name__ <font color="#0000ff">==</font> '<font color="#a9a9a9">__main__</font>':<br />
    <font color="#0000ff">try</font>:<br />
        unittest.main<font color="#0000ff">()</font><br />
    <font color="#0000ff">except</font> SystemExit:<br />
        <font color="#0000ff">pass</font><br /></font><br />
This catches and eats the SystemExit exception, and runs without printing the "False"
at the end of the execution:<br /><br /><font face="Courier New">C:\Code\sample&gt;ipy UnitTests.py<br />
.....<br />
----------------------------------------------------------------------<br />
Ran 5 tests in 0.387s<br /><br />
OK<br /></font><br />
cheers!<br /><p></p><img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=10a8368d-9191-4f9c-bc29-ca957bb111e5" /></div>
    </content>
  </entry>
  <entry>
    <title>Unit Testing in Python</title>
    <link rel="alternate" type="text/html" href="http://TestDrivenDeveloper.com/2008/09/30/UnitTestingInPython.aspx" />
    <id>http://testdrivendeveloper.com/PermaLink,guid,9c73a72b-9654-4976-83b5-e3f9b6b67e3f.aspx</id>
    <published>2008-09-30T06:26:26.217875-07:00</published>
    <updated>2008-09-30T06:41:36.921-07:00</updated>
    <category term="TDD" label="TDD" scheme="http://testdrivendeveloper.com/CategoryView,category,TDD.aspx" />
    <category term="Testing" label="Testing" scheme="http://testdrivendeveloper.com/CategoryView,category,Testing.aspx" />
    <category term="Tools" label="Tools" scheme="http://testdrivendeveloper.com/CategoryView,category,Tools.aspx" />
    <category term="Python" label="Python" scheme="http://testdrivendeveloper.com/CategoryView,category,Python.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
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 <a target="_ipy" href="http://www.codeplex.com/IronPython">IronPython</a> (or
CPython if that's your flavor). These unit tests leverage the "unittest" module
available in Python 2.2 and above.
</p>
        <p>
Here is a short test class:
</p>
        <p>
          <font face="Courier New">
            <font color="#0000ff">class</font> TestCode:<br />
    localInt = <font color="#ff0000">1</font><br />
    @classmethod<br />
    <font color="#0000ff">def</font><font color="#ff1493">Method1</font>(self):<br />
        <font color="#0000ff">return</font><font color="#ff0000">100</font><br />
    <font color="#0000ff">def</font><font color="#ff1493">Method2</font>(self,
a, b):<br />
        self.localInt = a * b<br /></font>
        </p>
        <p>
Here are some sample unit tests for it, using the unittest framework:
</p>
        <p>
          <font face="Courier New">
            <font color="#0000ff">import</font> unittest<br /><font color="#0000ff">class</font> UnitTests(unittest.TestCase):<br />
    <font color="#0000ff">def</font><font color="#ff1493">testMethod1</font>(self):<br />
        cut = TestCode()<br />
        actual = cut.Method1()<br />
        self.assertEqual(<font color="#ff0000">100</font>,
actual)</font>
        </p>
        <p>
          <font face="Courier New">    <font color="#0000ff">def</font><font color="#ff1493">teststaticInt</font>(self):<br />
        self.assertEqual(<font color="#ff0000">1</font>,
TestCode.localInt)</font>
        </p>
        <p>
          <font face="Courier New">    <font color="#0000ff">def</font><font color="#ff1493">testMethod2</font>(self):<br />
        cut = TestCode()<br />
        cut.Method2(<font color="#ff0000">7</font>, <font color="#ff0000">4</font>)<br />
        self.assertEqual(<font color="#ff0000">28</font>,
cut.localInt)</font>
        </p>
        <p>
          <font face="Courier New">
            <font color="#0000ff">if</font> __name__ == '<font color="#808080">__main__</font>':<br />
    unittest.main()<br /></font>
        </p>
        <p>
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.
</p>
        <p>
If anyone has any suggestions on tools or experience with <a href="http://blogs.msdn.com/aaronmar/archive/2006/02/16/533273.aspx">integration
with Visual Studio</a> those comments would be appreciated.
</p>
        <img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=9c73a72b-9654-4976-83b5-e3f9b6b67e3f" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Organizing Test Code</title>
    <link rel="alternate" type="text/html" href="http://TestDrivenDeveloper.com/2008/09/22/OrganizingTestCode.aspx" />
    <id>http://testdrivendeveloper.com/PermaLink,guid,64ecd9d5-5c44-48ac-b3b5-b900d7c4ecd0.aspx</id>
    <published>2008-09-22T10:21:35.4046029-07:00</published>
    <updated>2008-09-22T10:33:12.9358149-07:00</updated>
    <category term="Testing" label="Testing" scheme="http://testdrivendeveloper.com/CategoryView,category,Testing.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Shawn Neal has a <a href="http://blog.sneal.net/blog/2008/09/02/OrganizeYourTestCode.aspx">great
post</a> (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, 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 provided
that they are in separate assemblies.
</p>
        <p>
Someday, when technology allows for it, we should even be able to run our tests in
parallel threads or parallel processes (see the <a href="http://nunit.com/index.php?p=releaseNotes&amp;r=2.5">2.5 target
features for NUnit</a>). 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.
</p>
        <p>
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.
</p>
        <p>
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.
</p>
        <img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=64ecd9d5-5c44-48ac-b3b5-b900d7c4ecd0" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Acceptance Criteria is Critical for Test Driven Development</title>
    <link rel="alternate" type="text/html" href="http://TestDrivenDeveloper.com/2008/09/20/AcceptanceCriteriaIsCriticalForTestDrivenDevelopment.aspx" />
    <id>http://testdrivendeveloper.com/PermaLink,guid,734346b7-6fa7-46b2-8725-4e92be3a6725.aspx</id>
    <published>2008-09-20T16:38:33.437625-07:00</published>
    <updated>2008-09-20T16:59:25.45325-07:00</updated>
    <category term="Acceptance Criteria" label="Acceptance Criteria" scheme="http://testdrivendeveloper.com/CategoryView,category,AcceptanceCriteria.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">Acceptance criteria are the real key to
being able to develop software in the agile model. Acceptance criteria is not really
adequately represented by a use case, even with several alternate path scenarios...
I have seen this and it just doesn't do the trick. A scenario is good, but it's really
not acceptance criteria. We can however, analyze these scenarios and alternate paths,
and usually come up with a pretty good set of criteria.<br /><br />
Beware of the incomplete criteria. It's darn hard to get it all. We know this. But,
make an attempt anyway. Use the thinking that if it isn't in the criteria it won't
be delivered, and that the developers can implement it any way they want... This thought
should be scary enough for a customer that they will be forced to think hard about
what they really want the software to do.<br /><br />
When we think we know what we are doing, we can write some tests, write some code.
We think we have the idea, only to find out later that we had misunderstood or didn't
have all the requirements. Acceptance criteria are absolutely the must-have thing
for agile processes to succeed. We need the Customer or product owner [PO] to provide
clear, concise, and specific criteria for our software.<br /><br />
I'm not saying that generating/gathering acceptance criteria is easy. It takes practice.
It takes cooperation. It takes understanding on both the development team and the
customer/PO that "if it isn't requested or specified in the acceptance criteria, it
isn't going to be delivered." It's really kind of harsh actually to practice this,
so I wouldn't advocate it. However, it might be a good idea to talk about it in those
kind of terms while in the sprint planning or story negotiation phase.<br /><br />
Without the ability to know that we are doing the right thing, surely we will fail
to deliver it. The customer knows exactly what they want. OK, most customers really
don't know what they want. It is up to us as a development team to be able to know
this, and help them out by asking lots of questions, and examining exactly what we
propose to deliver. After all, that is why they hired us right?<br /><br />
Train your team. Let them know that the ancient role of "Business Analyst" is no place
to be found in an agile team, and the whole team is really responsible for making
sure to ask the right questions. I do like the whole user story concept, but it is
far more practical in sprint planning to capture some of the actual acceptance criteria
and store it attached to the story somehow, so that it is accessible by the team and
can be implemented as automated tests.<br /><br />
Test automation is critical, mandatory, required, and not optional. Did I mention
that test automation is required. Perhaps I should mention it again, in case my previous
sentences weren't clear. Automate, Automate, Automate. Double-click run test suite,
should be the demo in the sprint review and customer demonstration at the end of the
sprint. This is really and truly the only way that agile teams can operate successfully.<br /><br />
If you have people doing any kind of manual testing (other than exploratory), this
is a great opportunity to get the team to be far more productive by assisting the
manual testers to get these tasks automated. Sometimes it is not practical to automate
some manual tests. But in my experience - NOT OFTEN. If it looks hard to automate,
someone should be asking why the code is so "untestable"... In most cases, the three
or four dev or test hours it takes to automate the most difficult manual test case
scenario is more than paid back in the number of times the automation can be run from
then on. The number of bugs and breaks that it will prevent is a definite value add
to the organization, and in my opinion, money in the bank.<br /><p></p><img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=734346b7-6fa7-46b2-8725-4e92be3a6725" /></div>
    </content>
  </entry>
  <entry>
    <title>September Agile Beer Night</title>
    <link rel="alternate" type="text/html" href="http://TestDrivenDeveloper.com/2008/09/12/SeptemberAgileBeerNight.aspx" />
    <id>http://testdrivendeveloper.com/PermaLink,guid,5a017eb7-e72b-4a9f-97ad-9457c7b54bcd.aspx</id>
    <published>2008-09-12T08:22:57.515625-07:00</published>
    <updated>2008-09-12T08:25:08.59375-07:00</updated>
    <category term="ABN" label="ABN" scheme="http://testdrivendeveloper.com/CategoryView,category,ABN.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">The next <a href="http://agilebug.com/2008/09/11/SeptemberAgileBeerNight.aspx">Agile
Beer Night</a> is coming up on Tuesday September 30, at the Celtic Bayou pub in Redmond
from 5PM to 7PM. Be there or be square...<br /><br /><p></p><img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=5a017eb7-e72b-4a9f-97ad-9457c7b54bcd" /></div>
    </content>
  </entry>
  <entry>
    <title>Sample Code for Selenium and WatiN tests</title>
    <link rel="alternate" type="text/html" href="http://TestDrivenDeveloper.com/2008/08/26/SampleCodeForSeleniumAndWatiNTests.aspx" />
    <id>http://testdrivendeveloper.com/PermaLink,guid,5872ed9c-4504-4cef-909d-4e2efe0d7269.aspx</id>
    <published>2008-08-26T08:03:11.27425-07:00</published>
    <updated>2008-08-26T08:16:29.883625-07:00</updated>
    <category term="ATDD" label="ATDD" scheme="http://testdrivendeveloper.com/CategoryView,category,ATDD.aspx" />
    <category term="Automation" label="Automation" scheme="http://testdrivendeveloper.com/CategoryView,category,Automation.aspx" />
    <category term="Selenium" label="Selenium" scheme="http://testdrivendeveloper.com/CategoryView,category,Selenium.aspx" />
    <category term="TDD" label="TDD" scheme="http://testdrivendeveloper.com/CategoryView,category,TDD.aspx" />
    <category term="Testing" label="Testing" scheme="http://testdrivendeveloper.com/CategoryView,category,Testing.aspx" />
    <category term="Tools" label="Tools" scheme="http://testdrivendeveloper.com/CategoryView,category,Tools.aspx" />
    <category term="WatiN" label="WatiN" scheme="http://testdrivendeveloper.com/CategoryView,category,WatiN.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">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 <a href="http://agilebug.com/ct.ashx?id=f4b673d3-cdfe-4a3d-b740-907c1b2cb362&amp;url=http%3a%2f%2fagilebug.com%2fcontent%2fbinary%2fATDDdemo.zip">here</a>.<br /><br />
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:<br /><br /><font face="Courier New" size="2">!define COMMAND_PATTERN {%m %p}<br />
!define TEST_RUNNER {dotnet\FitServer.exe}<br />
!define PATH_SEPARATOR {;}<br />
!path dotnet\*.dll<br /><br />
Here is an acceptance test using our BusinessObjectTestFixture test class:<br /><br />
!|FitnesseFixture.BusinessObjectTestFixture|<br />
|UserId|Password|Authenticate()|<br />
|administrator|secret0|ADMIN|<br />
|admin|secret0|NONE|<br />
|administrator|secret|NONE|<br />
|user11|secret11|USER|<br />
|user11|secret0|NONE|<br />
|user|secret|NONE|<br /></font><br /><br />
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.<br /><br /><a href="http://testdrivendeveloper.com/content/binary/ATDDSTIQ.zip">ATDDSTIQ.zip
(3.57 KB)</a><img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=5872ed9c-4504-4cef-909d-4e2efe0d7269" /></div>
    </content>
  </entry>
  <entry>
    <title>List of Tools for Developers</title>
    <link rel="alternate" type="text/html" href="http://TestDrivenDeveloper.com/2008/08/05/ListOfToolsForDevelopers.aspx" />
    <id>http://testdrivendeveloper.com/PermaLink,guid,08d711e8-6e7b-4701-81b6-df843a72fa12.aspx</id>
    <published>2008-08-04T22:29:38.4459076-07:00</published>
    <updated>2008-08-04T22:29:38.4459076-07:00</updated>
    <category term="Automation" label="Automation" scheme="http://testdrivendeveloper.com/CategoryView,category,Automation.aspx" />
    <category term="Mocks" label="Mocks" scheme="http://testdrivendeveloper.com/CategoryView,category,Mocks.aspx" />
    <category term="Selenium" label="Selenium" scheme="http://testdrivendeveloper.com/CategoryView,category,Selenium.aspx" />
    <category term="Testing" label="Testing" scheme="http://testdrivendeveloper.com/CategoryView,category,Testing.aspx" />
    <category term="WatiN" label="WatiN" scheme="http://testdrivendeveloper.com/CategoryView,category,WatiN.aspx" />
    <category term="Tools" label="Tools" scheme="http://testdrivendeveloper.com/CategoryView,category,Tools.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">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.<br /><br />
Visual Studio 2008      Development IDE      
            <a href="http://msdn.microsoft.com/en-us/vstudio/products/aa700831.aspx">Microsoft</a><br />
TestDriven.net           Test Runner  
                      <a href="http://TestDriven.net">TestDriven.net</a><br />
WinMerge                 
Diff / Merge tool              
    <a href="http://winmerge.org/downloads/index.php">WinMerge.org</a> integrates
with VS and Tortoise too!<br />
nUnit                 
      Unit Testing Framework          <a href="http://nunit.org/?p=download">nUnit.org</a>    
Also see <a href="http://www.mbunit.com/">mbUnit</a> and <a href="http://www.gallio.org">Gallio</a><br />
Selenium                  
UI test framework              
  <a href="http://selenium.openqa.org/">OpenQA</a>      
Also see <a href="http://watin.sourceforge.net/">WatiN</a><br />
ReSharper                 
Integrated toolkit for VS        <a href="http://www.jetbrains.com/resharper/download/">JetBrains</a>    
(OK I don't actually use it but it's good.)<br />
Tortoise SVN              Shell Integration
with SVN      <a href="http://tortoisesvn.net/downloads">Tigris</a><br />
Ankh SVN                 
Visual Studio Plugin for SVN     <a href="http://ankhsvn.open.collab.net/servlets/ProjectProcess?pageID=3794">CollabNet</a><br />
Subversion (Server)     Version Control System     
    <a href="http://www.visualsvn.com/server/">VisualSVN</a><br />
Cruise Control.net       CI system        
                   <a href="http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET">ThoughtWorks</a><br />
RhinoMocks                Mock
Object System              <a href="http://www.ayende.com/projects/rhino-mocks/downloads.aspx">Ayende</a><br />
nAnt                 
       .NET Build Tool        
            <a href="http://nant.sourceforge.net/">nAnt</a><br />
Fitnesse                 
  Acceptance Test Tool            <a href="http://fitnesse.org/">Fitnesse</a><br />
STIQ                 
       Story Test Tool        
           <a href="http://storytestiq.solutionsiq.com/wiki/Main_Page">Solutions
IQ</a><br />
GIMP                 
       GNU Image Manipulation Prog. <a href="http://gimp-win.sourceforge.net/">SourceForge</a><br />
Notepad++                 Smart
Text Editor                 <a href="http://notepad-plus.sourceforge.net/uk/download.php">SourceForge
UK</a> when Visual Studio just won't do...<br /><br />
Not development tools exactly, but extremely handy:<br />
Process Explorer          Smarter Task Manager  
        <a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx">SysInternals</a><br />
FileZilla                 
    Upload/FTP client           
      <a href="http://filezilla-project.org/download.php">FileZilla</a><br />
DivX                 
        Decoder           
                  <a href="http://DivX.com">DivX</a>  
      Because sometimes we need to watch movies...<br /><br />
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... :-)<br /><br /><br /><img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=08d711e8-6e7b-4701-81b6-df843a72fa12" /></div>
    </content>
  </entry>
  <entry>
    <title>Avoid Large Methods</title>
    <link rel="alternate" type="text/html" href="http://TestDrivenDeveloper.com/2008/08/04/AvoidLargeMethods.aspx" />
    <id>http://testdrivendeveloper.com/PermaLink,guid,eb23c920-3a3b-4287-ac47-b12f55edd465.aspx</id>
    <published>2008-08-04T12:41:20.8844098-07:00</published>
    <updated>2008-08-04T12:41:20.8844098-07:00</updated>
    <category term="C#" label="C#" scheme="http://testdrivendeveloper.com/CategoryView,category,C.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">500 lines of code in one method? uh... U
R DOING IT WRONG!<br /><br />
Long methods are a code smell. And a loud one at that. Methods should be focused on
doing ONE thing. That thing can be simple or complex, but inner complexity should
be refactored out into other (small) methods, keeping them each small and focused
on a single task. A method with 4 nested levels of for/foreach/while statements is
just so wrong in so many ways... Keep it simple. Keep it straightforward. Did I mention
keep it simple?<br /><br />
Jeremy Miller posted a nice <a href="http://codebetter.com/blogs/jeremy.miller/archive/2005/04/26/129549.aspx" target="_jm">article</a> a
while back about short methods, and Ward Cunningham has another on <a href="http://c2.com/cgi/wiki?FewShortMethodsPerClass" target="_c2">C2</a> that
Jeremy references.<br />
We definitely need a Visual Studio plug-in to turn the background yellow when a method
exceeds 20 lines, and turn red when it goes over 40 lines...<br /><br />
Here is a simple example. Code by intent means writing code by declaring what it does
by well named (and usually long-named) methods. This method is only three lines long,
but it conveys that there are two steps to be done, the second with the result of
the first. This should be clear to anyone reading it. Further, the XML comment summary
(missing from this example) should provide the reader with any information needed
not conveyed with the title.<br /><pre><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> DoOneThing()<br />
{<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">int</span> n <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span> 0;<br />
n <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span> DoStep1ReturnNumber(n);<br />
DoStep2WithResultOfStep1(n);<br />
}<br /><br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">private</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> DoStep1ReturnNumber(<span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">int</span> number)<br />
{<br /><span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">//
simple method</span> } <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">private</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> DoStep2WithResultOfStep1(<span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">int</span> number)<br />
{<br /><span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">//
more simple stuff</span> }</span></pre><br />
Seriously, if there is something out there already that does this, please let me know!
If not, I am going to have to write one...<br /><p></p><img width="0" height="0" src="http://testdrivendeveloper.com/aggbug.ashx?id=eb23c920-3a3b-4287-ac47-b12f55edd465" /></div>
    </content>
  </entry>
</feed>