<?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>Gojko Adzic &#187; fitnesse</title>
	<atom:link href="http://gojko.net/tag/fitnesse/feed/" rel="self" type="application/rss+xml" />
	<link>http://gojko.net</link>
	<description>Building software that matters</description>
	<lastBuildDate>Wed, 04 Aug 2010 11:38:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Using FitNesse to test web services</title>
		<link>http://gojko.net/2010/05/05/using-fitnesse-to-test-web-services/</link>
		<comments>http://gojko.net/2010/05/05/using-fitnesse-to-test-web-services/#comments</comments>
		<pubDate>Wed, 05 May 2010 19:51:11 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[agile testing]]></category>
		<category><![CDATA[fitnesse]]></category>
		<category><![CDATA[fitsharp]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=1829</guid>
		<description><![CDATA[Just got this question from a blog reader: I am evaluating whether to use FitNesse with FitSharp for acceptance testing some web services. In reading your book and searching online, I could not find a template or recommended approach to doing this. The following is a working idea on the approach. I would like to [...]]]></description>
			<content:encoded><![CDATA[<p>Just got this question from a blog reader:</p>
<blockquote><p>
I am evaluating whether to use FitNesse with FitSharp for acceptance testing some web services.</p>
<p>In reading your book and searching online, I could not find a template or recommended approach to doing this. The following is a working idea on the approach. I would like to hear your feedback if there is a better means of doing this!
</p></blockquote>
<p><span id="more-1829"></span></p>
<blockquote><p>
Template for writing web service acceptance tests:</p>
<ol>
<li>Generate proxy class using the SVCUTIL / WSDL tools in Visual Studio .NET</li>
<li>Wrap the proxy in a helper class that exposes properties for the requests/responses along with setting up the endpoint. This class also includes an Execute() method.</li>
<li>Compose a fixture class containing an instance of the helper class</li>
<li>From FitNesse, initialize the setup of a fixture object with endpoint data and instance variables for web service communication.</li>
<li>Execute()</li>
<li>Check data in assertions </li>
</ol>
</blockquote>
<p>This very much depends on who the stakeholders are for the tests &#8211; who is concerned about them and who is involved in writing them.</p>
<p>FitNesse magic works best on automating shared expectations about what the software should do before you start writing code &#8211; examples that you can agree on with your business customers and analysts, because you can automate these examples and still keep them in a human readable form.</p>
<p>You can still get some benefits using fitnesse in a legacy environment if you decide to write tests for existing software but need to have them in a form that is easily readable by business analysts. But in this case just wrapping a web service with a technical autogenerated fixture won&#8217;t do the trick &#8211; try to create a table format that makes sense for the business instead of basing it on a technical wsdl.</p>
<p>If you don&#8217;t need this, and if the only stakeholders for these tests are developers, then you won&#8217;t get any benefits from FitNesse over MBUnit and it will give you higher maintenance costs.</p>
<p>If you are testing web services after the fact &#8211; after they were written &#8211; you will probably get much better return on your investment in test in just using a technical test tool such as NUnit or MBunit.</p>
<p>Related post: <a href="http://gojko.net/2009/03/09/how-to-implement-loops-in-fitnesse-test-fixtures/">How to implement loops in FitNesse test fixtures</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2010/05/05/using-fitnesse-to-test-web-services/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to implement UI testing without shooting yourself in the foot</title>
		<link>http://gojko.net/2010/04/13/how-to-implement-ui-testing-without-shooting-yourself-in-the-foot-2/</link>
		<comments>http://gojko.net/2010/04/13/how-to-implement-ui-testing-without-shooting-yourself-in-the-foot-2/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 06:56:58 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[agile acceptance testing]]></category>
		<category><![CDATA[atdd]]></category>
		<category><![CDATA[fitnesse]]></category>
		<category><![CDATA[page object]]></category>
		<category><![CDATA[robot framework]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[twist]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=1782</guid>
		<description><![CDATA[I&#8217;m currently interviewing lots of teams that have implemented acceptance testing for my new book. A majority of those interviewed so far have at some point shot themselves in the foot with UI test automation. After speaking to several people who are about to do exactly that at the Agile Acceptance Testing Days in Belgium [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently interviewing lots of teams that have implemented acceptance testing for my new book. A majority of those interviewed so far have at some point shot themselves in the foot with UI test automation. After speaking to several people who are about to do exactly that at the Agile Acceptance Testing Days in Belgium a few weeks ago, I&#8217;d like to present what I consider a very good practice for how to do UI test automation efficiently. <span id="more-1782"></span></p>
<p><a href="http://gojko.net/2007/09/25/effective-user-interface-testing/">I&#8217;ve written against UI test automation several times so far, so I won&#8217;t repeat myself</a>. However, many teams I interviewed seem to prefer UI level automation, or think that such level of testing is necessary to prove the required business functionality. Almost all of them have realised six to nine months after starting this effort that the cost of maintaining UI level tests is higher than the benefit they bring. Many have thrown away the tests at that point and effectively lost all the effort they put into them. If you have to do UI test automation (which I&#8217;d challenge in the first place), here is how do go about doing it so that the cost of maintenance doesn&#8217;t kill you later.</p>
<h2>Three levels of UI test automation</h2>
<p>A very good idea when designing UI level functional tests is to think about describing the test and the automation at these three levels:</p>
<p><img align="right" src="http://gojko.s3.amazonaws.com/three_levels.png"/></p>
<ul>
<li>Business rule/functionality level: what is this test demonstrating or exercising. For example: Free delivery is offered to customers who order two or more books.</li>
<li>User interface workflow level: what does a user have to do to exercise the functionality through the UI, on a higher activity level. For example, put two books in a shopping cart, enter address details, verify that delivery options include free delivery.</li>
<li>Technical activity level: what are the technical steps required to exercise the functionality. For example, open the shop homepage, log in with &#8220;testuser&#8221; and &#8220;testpassword&#8221;, go to the &#8220;/book&#8221; page, click on the first image with the &#8220;book&#8221; CSS class, wait for page to load, click on the &#8220;Buy now&#8221; link&#8230; and so on.</li>
</ul>
<p><br clear="all" /></p>
<p>At the point where they figured out that UI testing is not paying off, most teams I interviewed were describing tests at the technical level only (an extreme case of this are recorded test scripts, where even the third level isn&#8217;t human readable). Such tests are very brittle, and many of them tend to break with even the smallest change in the UI. The third level is quite verbose as well, so it is often hard to understand what is broken when a test fails. Some teams were describing tests at the workflow level, which was a bit more stable. These tests weren&#8217;t bound to a particular layout, but they were bound to user interface implementation. When the page workflow changes, or when the underlying technology changes, such tests break.</p>
<p>Before anyone starts writing an angry comment about the technical level being the only thing that works, I want to say: <i>Yes, we do need the third level</i>. It is where the automation really happens and where the test exercises our web site. But there are serious benefits to not having <i>only the third level</i>.</p>
<p>The stability in acceptance tests comes from the fact that business rules don&#8217;t change as much as technical implementations. Technology moves much faster than business. The closer your acceptance tests are to the business rules, the more stable they are. Note that this doesn&#8217;t necessarily mean that these tests won&#8217;t be executed through the user interface &#8211; just that they are defined in a way that is not bound to a particular user interface. </p>
<p>The idea of thinking about these different levels is good because it allows us to write UI-level tests that are easy to understand, efficient to write and relatively inexpensive to maintain. This is because there is a natural hierarchy of concepts on these three levels. Checking that delivery is available for two books involves putting a book in a shopping cart. Putting a book in a shopping cart involves a sequence of technical steps. Entering address details does as well. Breaking things down like that and combining lower level concepts into higher level concepts reduces the cognitive load and promotes reuse.</p>
<h2>Easy to understand</h2>
<p>From the bottom up, the clarity of the test increases. At the technical activity level, tests are very technical and full of clutter &#8211; it&#8217;s hard to see the forest for the trees. At the user interface workflow level, tests describe how something is done, which is easier to understand but still has too much detail to efficiently describe several possibilities. At the business rule level, the intention of the test is described in a relatively terse form. We can use that level to effectively communicate all different possibilities in important example cases. It is much more efficient to give another example as &#8220;Free delivery is not offered to customers who have one book&#8221; than to talk about logging in, putting only a single book in a cart, checking out etc. I&#8217;m not even going to mention how much cognitive overload a description of that same thing would require if we were to talk about clicking check-boxes and links.</p>
<h2>Efficient to write</h2>
<p>From the bottom up, the technical level of tests decreases. At the technical activity level, you need people who understand the design of a system, HTTP calls, DOM and such to write the test. To write tests at the user interface workflow level, you only need to understand the web site workflow. At the business rule level, you need to understand what the business rule is. Given a set of third-level components (eg login, adding a book), testers who are not automation specialists and business users can happily write the definition of second level steps. This allows them to engage more efficiently during development and reduce the automation load on developers. </p>
<p>More importantly, the business rule and the workflow level can be written before the UI is actually there. Tests at these levels can be written before the development starts, and be used as guidelines for development and as acceptance criteria to verify the output. </p>
<h2>Relatively inexpensive to maintain</h2>
<p>The business rule level isn&#8217;t tied to any particular web site design or activity flow, so it remains stable and unchanged during most web user interface changes, be it layout or workflow improvements. The user interface workflow level is tied to the activity workflow, so when the flow for a particular action changes we need to rewrite only that action. The technical level is tied to the layout of the pages, so when the layout changes we need to rewrite or re-record only the implementation of particular second-level steps affected by that (without changing the description of the test at the business or the workflow level). </p>
<p>To continue with the free delivery example from above, if the login form was suddenly changed not to have a button but an image, we only need to re-write the &#8220;login&#8221; action at the technical level. From my experience, it is the technical level where changes happen most frequently &#8211; layout, not the activity workflow. So by breaking up the implementation into this hierarchy, we&#8217;re creating several layers of insulation and limiting the propagation of changes. This reduces the cost of maintenance significantly.</p>
<h2>Implementing this in practice</h2>
<p>There are many good ways to implement this idea in practice. Most test automation tools provide one or two levels of indirection that can be used for this. In fact, this is why I think Cucumber found such a sweet spot for browser based user interface testing. With Cucumber, step definitions implemented in a programming language naturally sit with developers and this is where the technical activity level UI can be described. These step definition can then be reused to create scenarios (user interface workflow level), and <a href="http://gojko.net/2010/01/05/bdd-in-net-with-cucumber-part-3-scenario-outlines-and-tabular-templates/">scenario outlines</a> can be used to efficiently describe tests at the business rule level.</p>
<p>New SLIM test runner for FitNesse provides similar levels of isolation. The bottom fixture layer sits naturally with the technical activity level. Scenario definitions can be used to describe workflows at the activity level. Scenario tables then present a nice, concise view at the business rule level. </p>
<p><a href="http://gojko.net/2009/05/28/robot-framework-review/">Robot Framework</a> uses &#8220;keywords&#8221; to describe tests, and allows us to define keywords either directly in code (which becomes the technical level) or by combining existing keywords (which becomes the workflow and business rule level).</p>
<p>The <a href="http://code.google.com/p/webdriver/wiki/PageObjects">Page Object</a> idea from Selenium and WebDriver is a good start, but stops short of finishing the job. It requires us to encapsulate the technical activity level into higher level &#8220;page&#8221; functionality. These can then be used to describe business workflows. It lacks the consolidation of workflows into the top business rule level &mdash; so make sure to do create this level yourself in the code. (Antony Marcano also raised a valid point that users <a href="http://gojko.net/2009/10/06/putting-selenium-in-the-right-place/">think about business activities, not page functionality</a> during CITCON Europe 09, so page objects might not be the best way to go anyway).</p>
<p>TextTest works with <a href="http://texttest.carmen.se/index.php?page=concepts&#038;n=xusecase">xUseCase recorders</a>, an interesting twist on this concept that allows you to record the technical level of step definitions without having to program it manually. This might be interesting for thick-client UIs where automation scripts are not as developed as in the web browser space.</p>
<p>With <a href="http://gojko.net/2010/04/06/twist-2-0-acceptance-testing-the-productive-way/">Twist</a>, you can record the technical level and it will create fixture definitions for you. Instead of using that directly in the test, you can use &#8220;abstract concepts&#8221; to combine steps into workflow activities and then use that for business level testing. Or you can add fixture methods to produce workflow activities in code. </p>
<h2>Beware of programming in text</h2>
<p>Looking at UI tests at these three levels is I think generally a good practice. Responsibility for automation at the user interface level is something that each team needs to decide depending on their circumstances. </p>
<p>Implementing the workflow level in plain text test scripts (Robot Framework higher level keywords, Twist abstract concepts, SLIM scenario tables) allows business people and testers who aren&#8217;t automation specialists to write and maintain them. For some teams, this is a nice benefit because developers can then focus on other things and testers can engage earlier. That does mean, however, that there is no automated refactoring, syntax checking or anything like that at the user interface automation level. </p>
<p>Implementing the workflow level in code enables better integration and reuse, also giving you the possibility of implementing things below the UI when that is easier, without disrupting the higher level descriptions. It does, however, require people with programming knowledge to automate that level.</p>
<p>An interesting approach that one team I interviewed had is to train testers to write code enough to be able to implement the user activity level in code as well. This doesn&#8217;t require advanced programming knowledge, and developers are there anyway to help if someone gets stuck. </p>
<h2>Things to remember</h2>
<p>To avoid shooting yourself in the foot with UI tests, remember these things:</p>
<ul>
<li>Think about UI test automation at three levels: business rules, user interface workflow and technical activity</li>
<li>Even if the user interface workflow automation gets implemented in plain text, make sure to put one level of abstraction above it and describe business rules directly. Don&#8217;t describe rules as workflows (unless they genuinely deal with workflow decisions &#8211; and even then it&#8217;s often good to describe individual decisions as state machines).</li>
<li>Even if the user interface workflow automation gets implemented in code, make sure to separate technical activities required to fulfil a step into a separate layer. Reuse these step definitions to get stability and easy maintenance later.</li>
<li>Beware of programming in plain text.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2010/04/13/how-to-implement-ui-testing-without-shooting-yourself-in-the-foot-2/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>FIT vs SLIM</title>
		<link>http://gojko.net/2010/03/12/fit-vs-slim/</link>
		<comments>http://gojko.net/2010/03/12/fit-vs-slim/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 07:59:33 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[fit]]></category>
		<category><![CDATA[fitnesse]]></category>
		<category><![CDATA[slim]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=1631</guid>
		<description><![CDATA[I got this question from a blog reader recently: I just wanted your opinion on SLIM as opposed to standard FIT/Fitnesse. Are there things that can only be done via the FIT/Fitnesse route that cannot be done via SLIM? So for acceptance tests and integration tests can I just use SLIM? We want to exploit [...]]]></description>
			<content:encoded><![CDATA[<p>I got this question from a blog reader recently:</p>
<blockquote><p>I just wanted your opinion on SLIM as opposed to standard FIT/Fitnesse. Are there things that can only be done via the FIT/Fitnesse route that cannot be done via SLIM? So for acceptance tests and integration tests can I just use SLIM?</p>
<p>We want to exploit the BDD abilities of Scenario tables in SLIM. Ideally I would like to use SLIM to undertake all kinds of tests. I assume it has all the same capabilities? Are there any issues? </p></blockquote>
<p> <span id="more-1631"></span></p>
<p>On the face of it, SLIM seems to be the preferred way forward for new FitNesse implementations as it is being actively developed and maintained by the same folks who develop FitNesse. FIT is a bit of an orphan at the moment, Rick Mugridge and I were talking about taking over that integration and enhancing it.</p>
<p>In terms of features, SLIM gives you better compatibility across platforms because a lot of the test system responsibility has been taken over by FitNesse itself (parsing HTML, deciding how to interpret a table, storing and reading symbol values). <a href="http://gojko.net/2009/04/17/slim-and-the-future-of-fitnesse-video/">Watch this video for more information about the differences in responsibilities</a>.</p>
<p>On the other hand, because of the way SLIM works, fitlibrary flow-mode interaction is practically impossible. Most of my clients still use flow mode tests as that is a great way to write and maintain a very thin fixture layer for complex tests.</p>
<p>SLIM also allows you to use Scenario tables, as you mentioned. Scenario tables give testers a lot more power as they can script multi-step execution and compose lower level fixtures into higher level tables, without involving developers to do the same in fixtures. Depending on your environment and team, this might or might not make sense. For covering and existing system with regression tests, it probably does. For using acceptance tests as a guide for development, beware of overdoing it. I am very concerned about long-term maintenance costs of such tests. What happens in this case is that people are effectively programming with tables &#8211; doing the same in code would allow you to benefit from IDE support for refactoring, file management and all sorts of other things that make IDEs useful. You lose all that by using scenario tables in order to make testers a bit more independent. I would rather suggest training the testers some basic coding skills so that they can write fixtures. </p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2010/03/12/fit-vs-slim/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Acceptance testing best practices</title>
		<link>http://gojko.net/2010/03/03/acceptance-testing-best-practices/</link>
		<comments>http://gojko.net/2010/03/03/acceptance-testing-best-practices/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 19:50:14 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[acceptance testing]]></category>
		<category><![CDATA[fitnesse]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=1655</guid>
		<description><![CDATA[Here&#8217;s a video from a joint workshop that David Evans, Mike Scott and I organised yesterday at Skills Matter. We talked about strategies to get the most out of acceptance tests (especially with FitNesse) and organised a group workshop to review some good and bad examples of acceptance tests &#8211; taken from my Hands On [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a video from a joint workshop that David Evans,  Mike Scott and I organised yesterday at Skills Matter. We talked about strategies to get the most out of acceptance tests (especially with FitNesse) and organised a group workshop to review some good and bad examples of acceptance tests &#8211; taken from my <a href="http://neuri.co.uk/training">Hands On Acceptance Testing</a> workshop.</p>
<p><object width="300px" height="279px"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9877071&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9877071&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="300px" height="279px"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2010/03/03/acceptance-testing-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FitNesse clinic, March 2nd, London</title>
		<link>http://gojko.net/2010/02/12/fitnesse-clinic-march-2nd-london/</link>
		<comments>http://gojko.net/2010/02/12/fitnesse-clinic-march-2nd-london/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 19:13:14 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[fitnesse]]></category>

		<guid isPermaLink="false">http://gojko.net/2010/02/12/fitnesse-clinic-march-2nd-london/</guid>
		<description><![CDATA[On March 2nd, Dave Evans and I are running a FitNesse clinic in central London starting at 6:30 PM. This is a unique opportunity to get your FitNesse tests reviewed for free and get help with writing and maintaining FitNesse tests and suites. Dave and I will discuss some of the common pitfalls faced by [...]]]></description>
			<content:encoded><![CDATA[<p>On March 2nd, Dave Evans and I are running a FitNesse clinic in central London starting at 6:30 PM. This is a unique opportunity to get your FitNesse tests reviewed for free and get help with writing and maintaining FitNesse tests and suites. </p>
<p>Dave and I will discuss some of the common pitfalls faced by teams in getting to grips with Fitnesse. We will show examples of good and bad acceptance tests, illustrating how different styles of fixtures lend themselves to different types of tests. We also highlight some of the features of Fitnesse that allow you to keep your tests expressive, useful and easy to maintain.</p>
<p>Make this interactive and bring your own test examples to be discussed, critiqued and improved upon in a group workshop.</p>
<p>For more information and to register, see<br />
<a href="http://skillsmatter.com/podcast/agile-testing/david-evans-gojko-adzic-interactive-agile-acceptance-testing-clinic">http://skillsmatter.com/podcast/agile-testing/david-evans-gojko-adzic-interactive-agile-acceptance-testing-clinic</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2010/02/12/fitnesse-clinic-march-2nd-london/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
