<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Developers blog &#187; Fitnesse</title>
	<atom:link href="http://www.realdevelopers.com/blog/tag/fitnesse/feed" rel="self" type="application/rss+xml" />
	<link>http://www.realdevelopers.com/blog</link>
	<description>realdevelopers.com</description>
	<lastBuildDate>Wed, 14 Sep 2011 21:38:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fitnesse reject in do fixtures</title>
		<link>http://www.realdevelopers.com/blog/test/fitnesse-reject-in-do-fixtures</link>
		<comments>http://www.realdevelopers.com/blog/test/fitnesse-reject-in-do-fixtures#comments</comments>
		<pubDate>Tue, 09 Feb 2010 20:11:42 +0000</pubDate>
		<dc:creator>Helga</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Test]]></category>
		<category><![CDATA[Fitnesse]]></category>
		<category><![CDATA[keywords]]></category>

		<guid isPermaLink="false">http://www.realdevelopers.com/blog/?p=726</guid>
		<description><![CDATA[There are more pleasurable things then wading through the fitnesse documentation with its table style, so whenever I don&#8217;t remember some fitnesse key word, I&#8217;d rather hesitate and wait for an inspiration before going there. This is to memorize the key words to be used in do fixtures.

show to print out non-boolean values
check to verify [...]]]></description>
			<content:encoded><![CDATA[<p>There are more pleasurable things then wading through the <a href="http://fitnesse.org/.FitNesse.UserGuide">fitnesse documentation</a> with its table style, so whenever I don&#8217;t remember some fitnesse key word, I&#8217;d rather hesitate and wait for an inspiration before going there. This is to memorize the key words to be used in do fixtures.</p>
<ul>
<li><strong>show</strong> to print out non-boolean values</li>
<li><strong>check </strong>to verify non-boolean values</li>
<li><strong>reject </strong>to invert the logic of the test</li>
</ul>
<p>Usage like this:<span id="more-726"></span></p>
<style type="text/css">.fittable td {border: solid grey; border-width: 0 1px 1px 0; padding: 3px; font-family: 'Lucida Grande','Bitstream Vera Sans','trebuchet ms',verdana,tahoma,arial,sans-serif}</style>
<table class="fittable" cellspacing="0" border="0" style="background-color:#F8F8F8; border: 1px solid grey;">
<tr>
<td colspan="4">Do Fixture Test</td>
</tr>
<tr>
<td>check</td>
<td>fixture method</td>
<td>parameter</td>
<td>expected value</td>
</tr>
<tr>
<td>show</td>
<td colspan="2">fixture method</td>
<td>parameter</td>
</tr>
<tr>
<td>reject</td>
<td colspan="2">fixture method that will fail with</td>
<td>parameter</td>
</tr>
</table>
<p>I was the latter, which caused some failing wild guesses and finally made me read the documentation. <a href="http://www.realdevelopers.com/blog/?p=312">Some more useful keywords</a> worth recapitulating were documented here a year ago.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.realdevelopers.com/blog/test/fitnesse-reject-in-do-fixtures/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Match multiline Strings in FitNesse</title>
		<link>http://www.realdevelopers.com/blog/code/match-multiline-strings-in-fitnesse</link>
		<comments>http://www.realdevelopers.com/blog/code/match-multiline-strings-in-fitnesse#comments</comments>
		<pubDate>Fri, 08 May 2009 08:54:59 +0000</pubDate>
		<dc:creator>Christoph</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Test]]></category>
		<category><![CDATA[Fitnesse]]></category>

		<guid isPermaLink="false">http://www.realdevelopers.com/blog/?p=323</guid>
		<description><![CDATA[Today we upgraded to the newest version of FitNesse (20090214) and suddenly all tests trying to match multiline Strings weren&#8217;t working anymore. We used the approach given here and defined variables that had line breaks in their value:
!define expected_result {some
multiline
text}
These variables could then be simply used in the test tables:
&#124;${expected_result}&#124;
But with the new version, line [...]]]></description>
			<content:encoded><![CDATA[<p>Today we upgraded to the newest version of FitNesse (20090214) and suddenly all tests trying to match multiline Strings weren&#8217;t working anymore. We used the approach given <a href="http://stackoverflow.com/questions/236183/how-do-i-put-preformatted-text-into-a-fitnesse-fixture-table-cell">here</a> and defined variables that had line breaks in their value:</p>
<pre>!define expected_result {some
multiline
text}</pre>
<p>These variables could then be simply used in the test tables:</p>
<pre>|${expected_result}|</pre>
<p>But with the new version, line breaks in variable definitions are treated like spaces and the expected result becomes &#8220;some multiline text&#8221; without the newlines.<br />
A different solution to get preformatted text, to use {{{ &#8230; }}}, <a href="http://www.nabble.com/Re%3AExperience-with-using-FIT-tables-for-XML-data--p21873991.html">isn&#8217;t working in test tables</a> and therefore is of no use in our case.<span id="more-323"></span></p>
<p>So we decided to encode all occurences of \n by some simple comparable string (which isn&#8217;t used elsewhere most likely) in the fitnesse-tests and on the comparator side. If you have a better solution for this problem &#8211; please let us know!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.realdevelopers.com/blog/code/match-multiline-strings-in-fitnesse/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Bringing our Fitnesse up to scratch</title>
		<link>http://www.realdevelopers.com/blog/test/bringing-our-fitnesse-up-to-scratch</link>
		<comments>http://www.realdevelopers.com/blog/test/bringing-our-fitnesse-up-to-scratch#comments</comments>
		<pubDate>Sat, 04 Apr 2009 11:56:43 +0000</pubDate>
		<dc:creator>astro</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Test]]></category>
		<category><![CDATA[Code Quality]]></category>
		<category><![CDATA[Fitnesse]]></category>
		<category><![CDATA[Process]]></category>

		<guid isPermaLink="false">http://www.realdevelopers.com/blog/?p=319</guid>
		<description><![CDATA[Before each release the support guys click through the whole application (following a smoke test script) to prevent that new bugs sneak in. However, sometimes they don&#8217;t manage to find all of them. No wonder since humans just tend to make mistakes when doing such stupefying, reoccuring work. Apart from that, the procedure is awfully [...]]]></description>
			<content:encoded><![CDATA[<p>Before each release the support guys click through the whole application (following a smoke test script) to prevent that new bugs sneak in. However, sometimes they don&#8217;t manage to find all of them. No wonder since humans just tend to make mistakes when doing such stupefying, reoccuring work. Apart from that, the procedure is awfully time consuming &#8211; eight days of development require two days of testing.<br />
That&#8217;s why we decided to enhance our suite of acceptance tests. Now we use exactly those two days support needs for testing to write new <a href="http://fitnesse.org/">Fitnesse</a> tests. We first created a list of all parts of the smoke test which were not already covered by automated tests. Each pair of developers picks one of the tests, implements it and then the interaction design girls look over it to ensure its quality. That way we already implemented 2/3 of the missing tests. As a side effect we improve old Fitnesse tests we find while searching for &#8220;inspiration&#8221; for the new ones.<br />
Because Fitnesse tests are run on our continuous build server after each commit, new bugs are found before the smoke test even starts.<br />
And that pays off: In the last three iterations only one small mistake made it into the release! Customers and support love our improved Fitnesse.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.realdevelopers.com/blog/test/bringing-our-fitnesse-up-to-scratch/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fitnesse Keywords</title>
		<link>http://www.realdevelopers.com/blog/code/fitnesse-keywords</link>
		<comments>http://www.realdevelopers.com/blog/code/fitnesse-keywords#comments</comments>
		<pubDate>Fri, 03 Apr 2009 19:48:01 +0000</pubDate>
		<dc:creator>astro</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Test]]></category>
		<category><![CDATA[Fitnesse]]></category>

		<guid isPermaLink="false">http://www.realdevelopers.com/blog/?p=312</guid>
		<description><![CDATA[Even after one year of writing Fitnesse tests I keep forgetting the keywords to check for empty or erroneous results and how to get/set fitnesse variables. So finally, here&#8217;s a short list to look them up:
blank: checks for empty strings
null: checks for null
error: checks whether any kind of exception occured
Set symbol to the result of [...]]]></description>
			<content:encoded><![CDATA[<p>Even after one year of writing Fitnesse tests I keep forgetting the keywords to check for empty or erroneous results and how to get/set fitnesse variables. So finally, here&#8217;s a short list to look them up:</p>
<p><em>blank</em>: checks for empty strings<br />
<em>null</em>: checks for null<br />
<em>error</em>: checks whether any kind of exception occured</p>
<p>Set <em>symbol</em> to the result of <em>getFun()</em>:<br />
| value | =getFun() |<br />
| 3 | symbol |</p>
<p>Set <em>param</em> to the value of <em>symbol</em>:<br />
| param= | setFun() |<br />
| symbol | true |</p>
]]></content:encoded>
			<wfw:commentRss>http://www.realdevelopers.com/blog/code/fitnesse-keywords/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fitnesse and Reflection</title>
		<link>http://www.realdevelopers.com/blog/code/fitnesse-and-reflection</link>
		<comments>http://www.realdevelopers.com/blog/code/fitnesse-and-reflection#comments</comments>
		<pubDate>Wed, 04 Mar 2009 12:45:04 +0000</pubDate>
		<dc:creator>Christoph</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Test]]></category>
		<category><![CDATA[Fitnesse]]></category>
		<category><![CDATA[Reflection]]></category>

		<guid isPermaLink="false">http://www.realdevelopers.com/blog/?p=88</guid>
		<description><![CDATA[We use Selectors that return a list of objects all over the application and of course we want to use them in our Fitnesse tests.
To be able to do so, we introduced a new kind of Fixture that uses reflection to fill a map &#8211; one entry for each result of the selector. Basically, all [...]]]></description>
			<content:encoded><![CDATA[<p>We use Selectors that return a list of objects all over the application and of course we want to use them in our <a href="http://fitnesse.org/">Fitnesse</a> tests.</p>
<p>To be able to do so, we introduced a new kind of Fixture that uses reflection to fill a map &#8211; one entry for each result of the selector. Basically, all we did was expand Fitnesse&#8217;s <code>RowFixture</code> and override the <code>query()</code> Method: <span id="more-88"></span></p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">@Override</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AObject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Object</span></a><span class="br0">&#91;</span><span class="br0">&#93;</span> query<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="kw2">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AException+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Exception</span></a> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">   <span class="kw2">final</span> List&lt;Map&lt;String, Object&gt;&gt; result = </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">new</span> LinkedList&lt;Map&lt;String, Object&gt;&gt;<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">   <span class="kw1">for</span> <span class="br0">&#40;</span>ValueObject each : executeSelector<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">       Map&lt;String, Object&gt; row = <span class="kw2">new</span> HashMap&lt;String, Object&gt;<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">       <span class="kw1">for</span> <span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AField+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Field</span></a> field : each.<span class="me1">getClass</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">getFields</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">          <span class="kw1">if</span> <span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AModifier+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Modifier</span></a>.<span class="me1">isStatic</span><span class="br0">&#40;</span>field.<span class="me1">getModifiers</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> &amp;&amp; field.<span class="me1">getType</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">equals</span><span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a>.<span class="kw2">class</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">             row.<span class="me1">put</span><span class="br0">&#40;</span>field.<span class="me1">getName</span><span class="br0">&#40;</span><span class="br0">&#41;</span>, each.<span class="me1">getAttributeAllowingNull</span><span class="br0">&#40;</span><span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a><span class="br0">&#41;</span> field.<span class="me1">get</span><span class="br0">&#40;</span><span class="kw2">null</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">          <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">      <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">  <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">  <span class="kw2">return</span> result.<span class="me1">toArray</span><span class="br0">&#40;</span><span class="kw2">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AObject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Object</span></a><span class="br0">&#91;</span>v.<span class="me1">size</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#93;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p><code>executeSelector()</code> is abstract and has to be overwritten in each subclass of this Fixture to return whatever is needed. In Fitnesse, you can directly use the the field names:</p>
<pre>|User Selector|
|NAME|AGE|GENDER|
|Daisy|32|female|
|Donald|34|male|
|Minnie|25|female|</pre>
<p>That way we are able to write slim fixtures and don&#8217;t have to waste time writing getters for each field as we did before.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.realdevelopers.com/blog/code/fitnesse-and-reflection/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

