<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" 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:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>FitNesse</title>
        <link>http://geekswithblogs.net/alternativedotnet/category/9320.aspx</link>
        <description>FitNesse</description>
        <language>en-US</language>
        <copyright>Michel Grootjans</copyright>
        <managingEditor>michel.grootjans@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>Speaking at XP days in november</title>
            <link>http://geekswithblogs.net/alternativedotnet/archive/2009/09/02/134459.aspx</link>
            <description>Yippee, I will be speaking at the upcoming &lt;a href="http://www.xpday.net/"&gt;XP days in Mechelen&lt;/a&gt;. This is a first for me, and I'm really excited about this.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://pascalmestdach.blogspot.com/"&gt;Pascal Mestdach&lt;/a&gt; and myself have submitted a session on Agile Acceptance testing with FitNesse. It just got approved.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="zemanta-pixie"&gt;&lt;img src="http://img.zemanta.com/pixy.gif?x-id=204f4abf-c956-89a3-8ff4-ac8004e1e754" alt="" class="zemanta-pixie-img" /&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=134459"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=134459" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/alternativedotnet/aggbug/134459.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michel Grootjans</dc:creator>
            <guid>http://geekswithblogs.net/alternativedotnet/archive/2009/09/02/134459.aspx</guid>
            <pubDate>Wed, 02 Sep 2009 21:14:26 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/alternativedotnet/comments/134459.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/alternativedotnet/archive/2009/09/02/134459.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/alternativedotnet/comments/commentRss/134459.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/alternativedotnet/services/trackbacks/134459.aspx</trackback:ping>
        </item>
        <item>
            <title>My first FitNesse test</title>
            <link>http://geekswithblogs.net/alternativedotnet/archive/2008/11/25/127388.aspx</link>
            <description>&lt;p&gt;After my &lt;a href="http://geekswithblogs.net/alternativedotnet/archive/2008/11/24/127350.aspx" target="_blank"&gt;previous post&lt;/a&gt;, I've got a FitNesse server running and configured. It's now time to write some tests. Of course, since this is a demo, this will be a simple, self-explanatory test. I'll implement a simple calculator, capable of adding two integers.&lt;/p&gt;
&lt;p&gt;Let's write that in FitNesse. First, I'll create a test suite called "DemoSuite". So I go to &lt;a title="http://localhost:8888/DemoSuite" href="http://localhost:8888/DemoSuite"&gt;http://localhost:8888/DemoSuite&lt;/a&gt;. Since that page doesn't exist yet, FitNesse proposes a new page. I just accept it.&lt;/p&gt;
&lt;p&gt;Then I go to a subpage, that I call &lt;a title="http://localhost:8888/DemoSuite.CalculatorTest" href="http://localhost:8888/DemoSuite.CalculatorTest"&gt;http://localhost:8888/DemoSuite.CalculatorTest&lt;/a&gt;. Again, FitNesse doesn't recognize this page and proposes a new one. I now replace the content with this:&lt;/p&gt;
&lt;div&gt;
&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;!1 Let's run a simple calculator&lt;br /&gt;!|CalculatorRunner|&lt;br /&gt;|Arg1|Arg2|Sum?|&lt;br /&gt;|0|0|0|&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;This gets rendered like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/alternativedotnet/WindowsLiveWriter/MyfirstFitNessetest_11100/image_2.png"&gt;&lt;img height="119" width="289" border="0" style="border: 0px none ;" alt="image" src="http://geekswithblogs.net/images/geekswithblogs_net/alternativedotnet/WindowsLiveWriter/MyfirstFitNessetest_11100/image_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Notice what is expressed here: The test is a CalculatorRunner, that's what the top of the column says. Then I provide two arguments: Arg1=0 and Arg2=0. The Sum of both arguments should be 0. How do I tell FitNesse that the Sum should be checked? Simple: I've appended a "?" after Sum. That's enough to tell FitNesse that this is an assertion.&lt;/p&gt;
&lt;p&gt;This test won't run of course. We now need to create a test fixture to accept the test. These are the steps to follow:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;create a new project&lt;/li&gt;
    &lt;li&gt;add a reference to "fit.dll", located in the dotnet2 directory in the fit directory&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There we create a new class that has to match exactly the name of our test. That will be "CalculatorRunner"&lt;/p&gt;
&lt;div&gt;
&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt; fit;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;namespace&lt;/span&gt; MyBlogPosts.FitNesse&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; CalculatorRunner : ColumnFixture&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt; Arg1 { get; set; }&lt;br /&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt; Arg2 { get; set; }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt; Sum()&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; Arg1 + Arg2;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Get it? Each column in the FitNesse test above matches a property or a method in my testclass.&lt;/p&gt;
&lt;p&gt;Ok, if I now run the test, it will still fail! Why? Because it can't find the assembly it's in. Lets fix that, shall we. Hit "edit" on the testpage (or navigate to &lt;a title="http://localhost:8888/DemoSuite.CalculatorTest?edit" href="http://localhost:8888/DemoSuite.CalculatorTest?edit"&gt;http://localhost:8888/DemoSuite.CalculatorTest?edit&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Add the following on top of the page:&lt;/p&gt;
&lt;p style="font-family: Courier New;"&gt;!path C:\...\bin\Debug\*.dll&lt;/p&gt;
&lt;p&gt;This will tell FitNesse to scan that directory for assemblies too. It's kinda like having a reference in a project.&lt;/p&gt;
&lt;p&gt;On last thing before you hit "Save" (you hit it already, didn't you?). Add the following too:&lt;/p&gt;
&lt;p style="font-family: Courier New;"&gt;!|import|   &lt;br /&gt;
|MyBlogPosts.FitNesse|&lt;/p&gt;
&lt;p&gt;This is the namespace to import during this test. Kind of a "using" declaration in C#. Now run the test. Did it work? For me, this is the result:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/alternativedotnet/WindowsLiveWriter/MyfirstFitNessetest_11100/image_4.png"&gt;&lt;img height="131" width="324" border="0" style="border: 0px none ;" alt="image" src="http://geekswithblogs.net/images/geekswithblogs_net/alternativedotnet/WindowsLiveWriter/MyfirstFitNessetest_11100/image_thumb_1.png" /&gt;&lt;/a&gt; Looks OK to me. Lets expand the tests a little, shall we?&lt;/p&gt;
&lt;p&gt;I'm editing the page like this:&lt;/p&gt;
&lt;p style="font-family: Courier New;"&gt;!|CalculatorRunner|   &lt;br /&gt;
|Arg1|Arg2|Sum?|    &lt;br /&gt;
|0|0|0|    &lt;br /&gt;
|1|1|3|    &lt;br /&gt;
|-1|1|0|    &lt;br /&gt;
|-100|1|-99|&lt;/p&gt;
&lt;p&gt;Lets run it again:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/alternativedotnet/WindowsLiveWriter/MyfirstFitNessetest_11100/image_6.png"&gt;&lt;img height="220" width="171" border="0" style="border: 0px none ;" alt="image" src="http://geekswithblogs.net/images/geekswithblogs_net/alternativedotnet/WindowsLiveWriter/MyfirstFitNessetest_11100/image_thumb_2.png" /&gt;&lt;/a&gt; Oops, looks like I missed one... but hey. That's exactly what tests are for, no?&lt;/p&gt;
&lt;p&gt;By the way, this is what a ColumnFixture in FitNesse is. Three more testtypes coming up, plus a little refactoring.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=127388"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=127388" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/alternativedotnet/aggbug/127388.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michel Grootjans</dc:creator>
            <guid>http://geekswithblogs.net/alternativedotnet/archive/2008/11/25/127388.aspx</guid>
            <pubDate>Tue, 25 Nov 2008 21:39:16 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/alternativedotnet/comments/127388.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/alternativedotnet/archive/2008/11/25/127388.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/alternativedotnet/comments/commentRss/127388.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/alternativedotnet/services/trackbacks/127388.aspx</trackback:ping>
        </item>
        <item>
            <title>How to set up a FitNesse server</title>
            <link>http://geekswithblogs.net/alternativedotnet/archive/2008/11/24/127350.aspx</link>
            <description>&lt;h2&gt;What is FitNesse?&lt;/h2&gt;
&lt;p&gt;Fitnesse is a tool that, if used wisely (&lt;strong&gt;big &lt;/strong&gt;assumption), can turn requirements into functional tests.&lt;/p&gt;
&lt;p&gt;Examples can elaborate requirements. Examples can become tests. Tests can verify requirements.&lt;/p&gt;
&lt;p&gt;I'm not going to elaborate on the pro's and contra's of FitNesse. &lt;a target="_blank" href="http://gojko.net/"&gt;Others&lt;/a&gt; have done that before me.&lt;/p&gt;
&lt;h2&gt;Installing the server&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/alternativedotnet/WindowsLiveWriter/HowtosetupaFitNesseserver_C159/image_6.png"&gt;&lt;img height="210" border="0" align="right" width="244" src="http://geekswithblogs.net/images/geekswithblogs_net/alternativedotnet/WindowsLiveWriter/HowtosetupaFitNesseserver_C159/image_thumb_2.png" alt="image" style="border-width: 0px;" /&gt;&lt;/a&gt;Setting up FitNesse is a piece of cake. You just need to know the steps.&lt;/p&gt;
&lt;p&gt;First of all, go download &lt;a target="_blank" href="http://fitnesse.org/FitNesse.DownLoad"&gt;fitnesse&lt;/a&gt;. Extract the downloaded content to a directory of your choosing. We'll call this the "fit directory" from now on.&lt;/p&gt;
&lt;p&gt;Go and download the .net 2.0 &lt;a target="_blank" href="http://sourceforge.net/projects/fitnessedotnet/"&gt;testrunner&lt;/a&gt;. Extract this content to a new subdirectory called "dotnet2" under the fit directory. The fit directory should now look like the image to the right.&lt;/p&gt;
&lt;h2&gt;Preparing the server&lt;/h2&gt;
&lt;p&gt;Since all of us are running IIS on port 80, FitNesse wont run on it. You will have to edit run.bat, and add the port number to it.&lt;/p&gt;
&lt;p&gt;We run on port 8888. To do this, you need to edit "run.bat" like this&lt;/p&gt;
&lt;p&gt;&lt;font face="Consolas"&gt;java -cp fitnesse.jar fitnesse.FitNesse %1 %2 %3 %4 %5 &lt;strong&gt;–p 8888&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;When you run 'run.bat', you have your server up and running. Just go to &lt;a href="http://localhost:8888"&gt;http://localhost:8888&lt;/a&gt; and go "Ooooh...".&lt;/p&gt;
&lt;p&gt;Next step is editing the base markup variables. Go to &lt;a href="http://localhost:8888/?edit"&gt;http://localhost:8888/?edit&lt;/a&gt; and add the following lines to the page.&lt;/p&gt;
&lt;p&gt;!path dotnet2\*.dll &lt;/p&gt;
&lt;p&gt;!define COMMAND_PATTERN {%m %p}    &lt;br /&gt;
!define TEST_RUNNER {dotnet2\FitServer.exe}     &lt;br /&gt;
!define PATH_SEPARATOR {;}&lt;/p&gt;
&lt;p&gt;This declares some specifics for running .net tests, as well as pointing to the .net 2.0 test runner we downloaded separately.&lt;/p&gt;
&lt;p&gt;That's it for the moment. Next will be the tests.&lt;/p&gt;
&lt;h3&gt;External links:&lt;/h3&gt;
&lt;table cellspacing="0" cellpadding="2" border="0"&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td valign="top"&gt;FitNesse &lt;/td&gt;
            &lt;td valign="top"&gt;&lt;a href="http://fitnesse.org/FitNesse.DownLoad" title="http://fitnesse.org/FitNesse.DownLoad"&gt;http://fitnesse.org/FitNesse.DownLoad&lt;/a&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td valign="top"&gt;.net 2.0 runner&lt;/td&gt;
            &lt;td valign="top"&gt;&lt;a href="http://sourceforge.net/projects/fitnessedotnet/" title="http://sourceforge.net/projects/fitnessedotnet/"&gt;http://sourceforge.net/projects/fitnessedotnet/&lt;/a&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td valign="top"&gt;Gojko's web site&lt;/td&gt;
            &lt;td valign="top"&gt;&lt;a href="http://gojko.net/" title="http://gojko.net/"&gt;http://gojko.net/&lt;/a&gt;           &lt;br /&gt;
            &lt;a href="http://gojko.net/tag/fitnesse/" title="http://gojko.net/tag/fitnesse/"&gt;http://gojko.net/tag/fitnesse/&lt;/a&gt;&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=127350"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=127350" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/alternativedotnet/aggbug/127350.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Michel Grootjans</dc:creator>
            <guid>http://geekswithblogs.net/alternativedotnet/archive/2008/11/24/127350.aspx</guid>
            <pubDate>Mon, 24 Nov 2008 18:30:41 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/alternativedotnet/comments/127350.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/alternativedotnet/archive/2008/11/24/127350.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/alternativedotnet/comments/commentRss/127350.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/alternativedotnet/services/trackbacks/127350.aspx</trackback:ping>
        </item>
    </channel>
</rss>