<?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>Agile Insider &#187; test first</title>
	<atom:link href="http://www.agileinsider.org/tag/test-first/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.agileinsider.org</link>
	<description>reality bytes...</description>
	<lastBuildDate>Wed, 22 Feb 2012 21:43:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Top Tips &#8211; Advanced Acceptance Test Driven Development</title>
		<link>http://www.agileinsider.org/2012/02/top-tips-advanced-acceptance-test-driven-development/</link>
		<comments>http://www.agileinsider.org/2012/02/top-tips-advanced-acceptance-test-driven-development/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 19:09:56 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[acceptance tests]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[enterprise]]></category>
		<category><![CDATA[test driven]]></category>
		<category><![CDATA[atdd]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[test first]]></category>

		<guid isPermaLink="false">http://www.agileinsider.org/?p=509</guid>
		<description><![CDATA[Over the course of my career I've had the pleasure of working with some great agile teams. I've also had some bitter disappointments working with great developers, testers and BAs who just don't get it... Many of the teams that get it didn't actually use natural language to create executable acceptance tests, however they did [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_514" class="wp-caption alignleft" style="width: 310px"><a href="http://www.agileinsider.org/2012/02/top-tips-advanced-acceptance-test-driven-development/10445006_m/" rel="attachment wp-att-514"><img class="size-medium wp-image-514" title="Focus on Success" src="http://www.agileinsider.org/wp-content/uploads/2012/02/10445006_m-300x265.jpg" alt="" width="300" height="265" /></a><p class="wp-caption-text">Focus on Success</p></div>
<p>Over the course of my career I've had the pleasure of working with some great agile teams. I've also had some bitter disappointments working with great developers, testers and BAs who just don't get it...</p>
<p>Many of the teams that get it didn't actually <a title="“Natural Language” Automated Acceptance Testing" href="http://www.agileinsider.org/2010/04/natural-language-automated-acceptance-testing/">use natural language to create executable acceptance tests</a>, however they did have extensive suites of automated acceptance tests, usually written by the business analysts or developers but in a language and style that is not normal for the non agile developers I have encountered. So in an attempt to try to capture the difference I'm going to try to provide some useful tips and techniques to challenge those attempting to adopt acceptance test driven development within a corporate environment.</p>
<p>I will begin by recommending the various <a href="http://www.youtube.com/results?q=gtac" target="_blank">conference videos from GTA</a>C. I'm not saying google are doing it perfect (I just don't know), but I am happy to believe they are probably doing lots of things right...</p>
<p>And most important, if we are going to go to the bother of creating executable acceptance tests, <a title="Why Bother with Automated Acceptance Tests" href="http://www.agileinsider.org/2012/01/why-bother-with-automated-acceptance-tests/" target="_blank">think carefully about who is accepting these</a>. If the only person who will accept these (and I mean really accept, as in understand and even be happy to take ownership of it) is the developer, then use the most appropriate tool.</p>
<p>So the tips and techniques...</p>
<ol>
<li>Make sure the story is the right story... If you have a story that is purely technical, then it's possibly better to test these using developer tests, it's unlikely to be something the business "really" care about... If the story isn't for a paying customer but for an internal user, try to find out what benefit that internal user is going to provide for the customer and reword the story from the end user perspective.</li>
<li>Don't clean up after tests... More importantly for acceptance testing is ensuring you know the state of the environment at the beginning of the test and that the test can run based on that state. Leaving the data created by the test can help immensely when issues are found. Given the amount and complexity of changes an acceptance test can inflict on an environment combined with the number of points at which an acceptance test can fail makes cleaning up extremely complex and error prone and does not provide the same level of ROI as unit tests. This has the added benefit of building a business case for better, more flexible environments and continuous delivery...</li>
<li>Create unique contexts for each test... To prevent tests stepping on each other's toes if they are run in parallel, create a unique context for the test, this could be as simple as creating a user with a unique id for that test or might require creating a collection of unique items you plan to use (e.g. instruments in a trading app, pages in a cms, articles for a blog)</li>
<li>Don't wait for something, make it happen... Where you come across a situation where you need to wait for something, prod the system to make it happen and use a spin loop so that in an environment where you can't prod the test still passes.</li>
<li>Question everything, even the test framework... As you develop your acceptance tests, the supporting test framework and ultimately the application continually ask yourself what would happen if you replaced x with y. For a web based application, the questions you might ask could be what would happen if we wanted to make this available on an android device or iphone, does my acceptance test still hold true? Can my test framework support this easily without visiting all the fixtures? What if change the test framework I use?</li>
<li>Use the<a title="“Natural Language” Automated Acceptance Testing" href="http://www.agileinsider.org/2010/04/natural-language-automated-acceptance-testing/" target="_blank"> english language</a> to drive the domain model... Good acceptance tests usually make it explicit the domain model needed to support the testing, and more often than not this drives the actual domain model needed within the application.</li>
<li>Use the real application code if at all possible... Rather than completely decouple your tests from the implementation, use the real implementation at the appropriate layer. This adds the benefit that changes to the implementation require no changes to the tests. To achieve this requires a suitably layered test framework to prevent these implementation changes rippling too far up resulting in broken tests. The best candidates for reuse are typically the domain models, data access components and service interfaces.</li>
<li>Assume you are running everything on your own machine until you can't... Start with the assumption that everything you need is running on your local development machine, since ultimately the goal is you can actually run these tests locally to test the functionality works. Once you have a test running and passing locally, you know the functionality is working and are then in a better place to refactor the test to support different environments.</li>
<li>Keep the tests isolated... Don't try to optimise tests by adding additional verifications or steps to existing stories. Create new tests. This might expose problems running the tests quickly but explore the other solutions to this rather than create huge tests that test too much. And imagine how the business will react when you say you are running 500 business tests and are getting 100% pass rate but can't test their new features because you don't have enough kit...</li>
<li>Don't write the test at all... If the story doesn't have much value, or the the systems you are using are not in your control and are not test friendly then stop just short of automating it... <a title="The Real Value of Test First is the Thought Process" href="http://www.agileinsider.org/2009/06/real-value-of-test-first/" target="_blank">Work out how you might automate it</a>, the exercise will highlight the blockers and drive a better story and clearer acceptance criteria, but weight up the cost of writing, maintaining and executing the test against the value of the story and the true cost/likelihood should a defect occur in that story...</li>
</ol>
<p>I'm sure a few of these will feel a little controversial or sit uncomfortably dependent on your experience. I'm also sure some appear on the face of it to conflict with others. For those who reach nirvana, you will end up with a suite of extremely robust acceptance tests (owned and fully understood by, the business), which a developer can run locally before committing code and which are then run again in a virtual production like cloud.</p>
<div id="spreadx">&nbsp;<a href="http://digg.com/submit?phase=2&url=http://www.agileinsider.org/2012/02/top-tips-advanced-acceptance-test-driven-development/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/digg.gif" alt="Digg" border="0" /></a>&nbsp;&nbsp;<a href="http://www.stumbleupon.com/submit?url=http://www.agileinsider.org/2012/02/top-tips-advanced-acceptance-test-driven-development/&title=Top+Tips+%26%238211%3B+Advanced+Acceptance+Test+Driven+Development" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/stumble.gif" alt="StumbleUpon" border="0" /></a>&nbsp;&nbsp;<a href="http://technorati.com/faves?add=http://www.agileinsider.org/2012/02/top-tips-advanced-acceptance-test-driven-development/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/technorati.gif" alt="Technorati" border="0" /></a>&nbsp;&nbsp;<a href="http://del.icio.us/post?url=http://www.agileinsider.org/2012/02/top-tips-advanced-acceptance-test-driven-development/&title=Top+Tips+%26%238211%3B+Advanced+Acceptance+Test+Driven+Development" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/delicious.gif" alt="Deli.cio.us" border="0" /></a>&nbsp;&nbsp;<a href="http://slashdot.org/submit.pl?url=http://www.agileinsider.org/2012/02/top-tips-advanced-acceptance-test-driven-development/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/slashdot.gif" alt="Slashdot" border="0" /></a>&nbsp;&nbsp;<a href="http://www.dzone.com/links/add.html?url=http://www.agileinsider.org/2012/02/top-tips-advanced-acceptance-test-driven-development/&title=Top+Tips+%26%238211%3B+Advanced+Acceptance+Test+Driven+Development" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/dzone.gif" alt="DZone" border="0" /></a>&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.agileinsider.org/2012/02/top-tips-advanced-acceptance-test-driven-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Concordion Plus</title>
		<link>http://www.agileinsider.org/2011/04/concordion-plus/</link>
		<comments>http://www.agileinsider.org/2011/04/concordion-plus/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 19:00:02 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[acceptance tests]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[test driven]]></category>
		<category><![CDATA[user stories]]></category>
		<category><![CDATA[acceptance criteria]]></category>
		<category><![CDATA[atdd]]></category>
		<category><![CDATA[communication]]></category>
		<category><![CDATA[feedback]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[test first]]></category>

		<guid isPermaLink="false">http://www.agileinsider.org/?p=299</guid>
		<description><![CDATA[I've written in the past about Using English to write Acceptance Tests and the tool I choose/advocate is without doubt Concordion.  Customers love seeing their stories come alive, but I've found developers can sometimes struggle to differentiate these from JUnit tests, particularly since JUnit is used to provide the execution mechanism. I've also found that [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.agileinsider.org/concordion-plus/"><img class="alignleft size-medium wp-image-300" title="Concordion Plus" src="http://www.agileinsider.org/wp-content/uploads/2011/04/concordion-plus-header-300x63.png" alt="Concordion Plus" width="300" height="63" /></a>I've written in the past about <a title="“Natural Language” Automated Acceptance Testing" href="http://www.agileinsider.org/2010/04/natural-language-automated-acceptance-testing/">Using English to write Acceptance Tests</a> and the tool I choose/advocate is without doubt <a title="Concordion" href="http://www.concordion.org/" target="_blank">Concordion</a>.  Customers love seeing their stories come alive, but I've found developers can sometimes struggle to differentiate these from <a title="JUnit" href="http://www.junit.org" target="_blank">JUnit</a> tests, particularly since JUnit is used to provide the execution mechanism.</p>
<p>I've also found that in many of the situations/organisations where I have introduced <a title="Concordion" href="http://www.concordion.org/" target="_blank">Concordion</a>, a single story has required several tests and although the Concordion guide does present some excellent <a title="Techniques" href="http://www.concordion.org/Technique.html" target="_blank">techniques</a> to deal with this, teams new to writing acceptance tests will be uncomfortable capturing stories in this format and customers might not be happy that all their acceptance criteria are being met.  I am therefore pleased to be releasing <a title="Concordion Plus at Google Code" href="http://concordion-plus.googlecode.com/" target="_blank">Concordion+</a> to the wild.  At the moment it is a simple extension to Concordion which allows developers to create individual scenarios (or test cases) within a single story and also to ignore the scenarios they are actively working on.  In addition, a new JUnit runner captures the state of each of these scenarios independently and reports them in the common IDEs while also allowing developers to use the JUnit @Before and @After annotations.  This should simplify adoption by developers since they now have a JUnit lifecycle they understand.</p>
<p>I have to send a huge thank you to <a title="Nigel Charman" href="http://tutansblog.blogspot.com/" target="_blank">Nigel Charman</a> for the <a title="Concordion Extensions" href="http://code.google.com/p/concordion-extensions/" target="_blank">concordion-extensions</a> project which helped immensely with my development.  And of course I can't dare not mention the excellent work by <a title="David Peterson" href="http://blog.davidpeterson.co.uk/" target="_blank">David Peterson</a> on Concordion itself and particularly the facility to <a title="Concordion Extensions" href="http://blog.davidpeterson.co.uk/2011/01/concordion-extensions.html" target="_blank">write extensions</a> <img src='http://www.agileinsider.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I hope you enjoy using it as much as I enjoyed creating it...</p>
<div id="spreadx">&nbsp;<a href="http://digg.com/submit?phase=2&url=http://www.agileinsider.org/2011/04/concordion-plus/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/digg.gif" alt="Digg" border="0" /></a>&nbsp;&nbsp;<a href="http://www.stumbleupon.com/submit?url=http://www.agileinsider.org/2011/04/concordion-plus/&title=Concordion+Plus" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/stumble.gif" alt="StumbleUpon" border="0" /></a>&nbsp;&nbsp;<a href="http://technorati.com/faves?add=http://www.agileinsider.org/2011/04/concordion-plus/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/technorati.gif" alt="Technorati" border="0" /></a>&nbsp;&nbsp;<a href="http://del.icio.us/post?url=http://www.agileinsider.org/2011/04/concordion-plus/&title=Concordion+Plus" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/delicious.gif" alt="Deli.cio.us" border="0" /></a>&nbsp;&nbsp;<a href="http://slashdot.org/submit.pl?url=http://www.agileinsider.org/2011/04/concordion-plus/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/slashdot.gif" alt="Slashdot" border="0" /></a>&nbsp;&nbsp;<a href="http://www.dzone.com/links/add.html?url=http://www.agileinsider.org/2011/04/concordion-plus/&title=Concordion+Plus" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/dzone.gif" alt="DZone" border="0" /></a>&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.agileinsider.org/2011/04/concordion-plus/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Keeping It Simple &#8211; Regression vs Acceptance Testing</title>
		<link>http://www.agileinsider.org/2010/04/keeping-it-simple-regression-vs-acceptance-testing/</link>
		<comments>http://www.agileinsider.org/2010/04/keeping-it-simple-regression-vs-acceptance-testing/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 15:42:33 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[acceptance tests]]></category>
		<category><![CDATA[test driven]]></category>
		<category><![CDATA[atdd]]></category>
		<category><![CDATA[simplicity]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[test first]]></category>

		<guid isPermaLink="false">http://www.agileinsider.org/?p=232</guid>
		<description><![CDATA[Another emergn coach asked me the other day how I distinguished between an acceptance test and regression tests.  For me there is a very simple rule... If I write the test before I write any code, it's an acceptance test. If I write the test after I've written the code, it's a regression test. If [...]]]></description>
			<content:encoded><![CDATA[<p>Another <a href="http://www.agileinsider.org/emergn" target="_blank">emergn</a> coach asked me the other day how I distinguished between an acceptance test and regression tests.  For me there is a very simple rule...</p>
<ul>
<li>If I write the test before I write any code, it's an acceptance test.</li>
<li>If I write the test after I've written the code, it's a regression test.</li>
<li>If I write code to make an acceptance test pass, it is now a regression test.</li>
</ul>
<p>Keeping it as simple as this keeps you out of trouble, I've seen so many people try to retro-fit acceptance tests after they've written code only to write a test which is based on what they've written rather than what they should have written.  It's a subtle but important point that writing a test for stuff you've written (which might be wrong since you haven't got an acceptance test) means you are potentially writing a test that the system always does the wrong thing...</p>
<div id="spreadx">&nbsp;<a href="http://digg.com/submit?phase=2&url=http://www.agileinsider.org/2010/04/keeping-it-simple-regression-vs-acceptance-testing/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/digg.gif" alt="Digg" border="0" /></a>&nbsp;&nbsp;<a href="http://www.stumbleupon.com/submit?url=http://www.agileinsider.org/2010/04/keeping-it-simple-regression-vs-acceptance-testing/&title=Keeping+It+Simple+%26%238211%3B+Regression+vs+Acceptance+Testing" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/stumble.gif" alt="StumbleUpon" border="0" /></a>&nbsp;&nbsp;<a href="http://technorati.com/faves?add=http://www.agileinsider.org/2010/04/keeping-it-simple-regression-vs-acceptance-testing/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/technorati.gif" alt="Technorati" border="0" /></a>&nbsp;&nbsp;<a href="http://del.icio.us/post?url=http://www.agileinsider.org/2010/04/keeping-it-simple-regression-vs-acceptance-testing/&title=Keeping+It+Simple+%26%238211%3B+Regression+vs+Acceptance+Testing" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/delicious.gif" alt="Deli.cio.us" border="0" /></a>&nbsp;&nbsp;<a href="http://slashdot.org/submit.pl?url=http://www.agileinsider.org/2010/04/keeping-it-simple-regression-vs-acceptance-testing/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/slashdot.gif" alt="Slashdot" border="0" /></a>&nbsp;&nbsp;<a href="http://www.dzone.com/links/add.html?url=http://www.agileinsider.org/2010/04/keeping-it-simple-regression-vs-acceptance-testing/&title=Keeping+It+Simple+%26%238211%3B+Regression+vs+Acceptance+Testing" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/dzone.gif" alt="DZone" border="0" /></a>&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.agileinsider.org/2010/04/keeping-it-simple-regression-vs-acceptance-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top Tips &#8211; User Centred Automated Acceptance Tests</title>
		<link>http://www.agileinsider.org/2010/04/top-tips-user-centred-automated-acceptance-tests/</link>
		<comments>http://www.agileinsider.org/2010/04/top-tips-user-centred-automated-acceptance-tests/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 13:10:50 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[acceptance tests]]></category>
		<category><![CDATA[test driven]]></category>
		<category><![CDATA[user stories]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[atdd]]></category>
		<category><![CDATA[methodology]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[test first]]></category>

		<guid isPermaLink="false">http://www.agileinsider.org/?p=217</guid>
		<description><![CDATA[Following on from my previous article, I thought I would share some top tips for creating automated acceptance tests for projects using user centred design.  There is nothing inherent in user centred design which prevents an agile approach being adopted and indeed agile adds huge value to user centred design by reducing the feedback loops [...]]]></description>
			<content:encoded><![CDATA[<p>Following on from my <a href="/2010/04/natural-language-automated-acceptance-testing/" target="_self">previous article</a>, I thought I would share some top tips for creating automated acceptance tests for projects using user centred design.  There is nothing inherent in user centred design which prevents an agile approach being adopted and indeed agile adds huge value to user centred design by reducing the feedback loops during the "design".</p>
<p>The outputs from the "design" part of user centred design is usually a set of wireframes, sometimes highly graphical to be used for marketing and soliciting customer feedback.  Low fidelity wireframes, as produced by <a href="http://www.balsamiq.com/" target="_blank">balsamiq</a> are fantastic for exploring the solution space with minimal commitment and retain that back of a napkin look and feel which prevents misinterpretation by customers and business about how much work remains to be done making them real.  At some point, developers will get their hands on these wireframes and be tasked with "making them real".  Of course, if the developers can help create the wireframes, then so much better and what a great way to reduce that feedback loop <img src='http://www.agileinsider.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div id="attachment_218" class="wp-caption alignleft" style="width: 376px"><a href="http://www.agileinsider.org/wp-content/uploads/2010/04/community-forum.png"><img class="size-full wp-image-218  " title="community forum wireframe" src="http://www.agileinsider.org/wp-content/uploads/2010/04/community-forum.png" alt="" width="366" height="262" /></a><p class="wp-caption-text">An example wireframe...</p></div>
<p>So, we're a delivery team and we have the wireframes available which we want to use to start carving this up into stories (with a customer ideally), executable tests and working code.  Where to start...</p>
<p>First we want to express what we're seeing as stories so we can assign value to the stories and prioritise based on ROI.  Depending on the technology choices, these wireframes also help to perform an initial design of the application in terms of data, services, components, etc.</p>
<p>The stories we write can be high level stories capturing the user experience as they navigate through the site, or they can be as low level as which fields are visible within a given area of the site.</p>
<p>My preferred approach is to write stories and tests at the high level and as we uncover the detail capture these as smaller stories and more detailed tests.  This seems to fit naturally with user centred design and allows planning and release activities to focus on the high level stories around the user experience (which is probably why they chose to do user centred design in the first place) and allow the development and build activities to focus on delivering the smaller stories.</p>
<p><strong>My top tips would be...</strong></p>
<ul>
<li>Write your stories and tests based on what you see in the wireframes
<ul>
<li>e.g. When a user (who is not logged in) visits the homepage they can see the "News" in the main area.  Notice that the wireframe has a single article, but this could be many articles in the future.  There is also no reason to assume this is the "Latest News", "Featured News", "Breaking News" or anything else.</li>
</ul>
</li>
<li>Be constantly aware of the context (explicit or not) within the wireframe when writing your test
<ul>
<li>e.g. In the latest news section, we may see a "Read More" link and assume that we can simply fnid this "Read More" link on the page.  Of course, in the future, there may be more than one news article (so we want to find the "Read More" link related to a particular article) and indeed there be more sections that contain "Read More" links such as user comments (so when we implement a test around the news, we want to ensure that we are finding the correct "Read More", which means we look for it in the news section and in relation to the article(s) of interest).</li>
</ul>
</li>
<li>Don't assume the wireframe is what the final implementation will be so think in abstract terms
<ul>
<li>e.g. if there is a button in the wireframe, this may be a clickable image later, or a tab panel.  So word your tests not on the button, but on the capability the button provides, so instead of "...and the user can click &lt;Help&gt;" we might have "..and the user is able to obtain &lt;Help&gt;".</li>
</ul>
</li>
<li>Envisage alternative implementations while writing the tests and validate your test would still be valid
<ul>
<li>e.g. If I change this from being a form to being editable inline, does the test still work?</li>
</ul>
</li>
<li>Try to be discrete in your tests, it is better to have lots of small, simple tests than a small number of tests that test too many things.
<ul>
<li>e.g.
<ul>
<li>when... can they see today's weather</li>
<li>when... can they see today's temperature</li>
<li>when... can they see tomorrow's weather</li>
</ul>
</li>
</ul>
</li>
<li>Use "<a href="http://blog.dannorth.net/introducing-bdd/" target="_blank">Given, When, Then</a>... and" to <strong>think about </strong>the scenarios you need, but try expressing them in natural english.
<ul>
<li>e.g.  When someone is viewing the school holidays calendar (Given) and they enter their postcode (When), the calendar should only display holidays for schools within the catchment radius (Then) and the user should be able to remove the filter (And).</li>
<li>I like to think of "Thens" as being the assertions, and with UCD this is the stuff I want to see on the screen as a result of me doing something.</li>
<li>The "Ands", which are an extension to Dan North's, I like to think of as the stuff I can now do in addition and in UCD this usually relates to new functionality which has been exposed or links that have appeared.</li>
</ul>
</li>
<li>Refer to the <a href="http://www.concordion.org/Technique.html" target="_blank">Concordion Techniques</a> page for some great examples of how to write robust tests in natural language.</li>
<li>Separate site aspects (navigation, login) from functional or contextual tests</li>
<li>Refactor your tests as you go to evolve a testing DSL to simplify writing future tests</li>
<li>Use <a href="http://www.agilemodeling.com/artifacts/personas.htm" target="_blank">personas </a>(or metaphors) to encapsulate data
<ul>
<li>Bring your personas to life
<ul>
<li>Write them a CV, or post their key characteristics on the team wall.</li>
</ul>
</li>
<li>You can validate key aspects of your persona within your test (in the "Given" section) to provide better tests by clarifying what aspects of the persona you are actually testing
<ul>
<li>e.g. "When Joe (who is on legal aid) views the list of local lawyers, the lawyers who provide legal aid are highlighted".  Notice that highlighted could mean anything, from promoting them to the top, changing colour, or adding a nice icon...</li>
</ul>
</li>
</ul>
</li>
<li>Don't create too many personas
<ul>
<li>Personas are very powerful, but when abused become difficult to manage.  To test functional aspects related to simple data variations use dynamic personas (e.g. when someone, who has not yet entered their postcode, accesses their profile...)</li>
</ul>
</li>
<li>Think like a customer
<ul>
<li>Ask yourself how much money you would pay for a given feature or piece of functionality</li>
</ul>
</li>
</ul>
<p>I'm sure that I'll refine this example in the future and therefore watch this space...</p>
<div id="spreadx">&nbsp;<a href="http://digg.com/submit?phase=2&url=http://www.agileinsider.org/2010/04/top-tips-user-centred-automated-acceptance-tests/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/digg.gif" alt="Digg" border="0" /></a>&nbsp;&nbsp;<a href="http://www.stumbleupon.com/submit?url=http://www.agileinsider.org/2010/04/top-tips-user-centred-automated-acceptance-tests/&title=Top+Tips+%26%238211%3B+User+Centred+Automated+Acceptance+Tests" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/stumble.gif" alt="StumbleUpon" border="0" /></a>&nbsp;&nbsp;<a href="http://technorati.com/faves?add=http://www.agileinsider.org/2010/04/top-tips-user-centred-automated-acceptance-tests/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/technorati.gif" alt="Technorati" border="0" /></a>&nbsp;&nbsp;<a href="http://del.icio.us/post?url=http://www.agileinsider.org/2010/04/top-tips-user-centred-automated-acceptance-tests/&title=Top+Tips+%26%238211%3B+User+Centred+Automated+Acceptance+Tests" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/delicious.gif" alt="Deli.cio.us" border="0" /></a>&nbsp;&nbsp;<a href="http://slashdot.org/submit.pl?url=http://www.agileinsider.org/2010/04/top-tips-user-centred-automated-acceptance-tests/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/slashdot.gif" alt="Slashdot" border="0" /></a>&nbsp;&nbsp;<a href="http://www.dzone.com/links/add.html?url=http://www.agileinsider.org/2010/04/top-tips-user-centred-automated-acceptance-tests/&title=Top+Tips+%26%238211%3B+User+Centred+Automated+Acceptance+Tests" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/dzone.gif" alt="DZone" border="0" /></a>&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.agileinsider.org/2010/04/top-tips-user-centred-automated-acceptance-tests/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#8220;Natural Language&#8221; Automated Acceptance Testing</title>
		<link>http://www.agileinsider.org/2010/04/natural-language-automated-acceptance-testing/</link>
		<comments>http://www.agileinsider.org/2010/04/natural-language-automated-acceptance-testing/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 09:00:38 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[acceptance tests]]></category>
		<category><![CDATA[coaching]]></category>
		<category><![CDATA[test driven]]></category>
		<category><![CDATA[atdd]]></category>
		<category><![CDATA[human nature]]></category>
		<category><![CDATA[test first]]></category>

		<guid isPermaLink="false">http://www.agileinsider.org/?p=209</guid>
		<description><![CDATA[I read with extreme interest James Shore's blog about FIT but was dismayed that he devalues automated acceptance testing.  To claim that FIT is a "natural language" is wrong, it is a developer language and this is possibly why customers don't get involved.  Concordion on the other hand is natural language and I think plays [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_212" class="wp-caption alignnone" style="width: 469px"><a href="http://www.agileinsider.org/wp-content/uploads/2010/04/no-comprende.png"><img class="size-full wp-image-212 " title="no-comprende" src="http://www.agileinsider.org/wp-content/uploads/2010/04/no-comprende.png" alt="I Don't Understand" width="459" height="196" /></a><p class="wp-caption-text">Do you speak FIT?</p></div>
<p>I read with extreme interest<a href="http://jamesshore.com/Blog/The-Problems-With-Acceptance-Testing.html" target="_blank"> James Shore's blog about FIT</a> but was dismayed that he devalues automated acceptance testing.  To claim that FIT is a "natural language" is wrong, it is a developer language and this is possibly why customers don't get involved.  Concordion on the other hand is natural language and I think plays much better in this arena.  In addition it is much more developer friendly.</p>
<p>I've written previously that for me the <a href="http://www.agileinsider.org/2009/06/real-value-of-test-first/" target="_self">value of test first is the thought processes</a> surrounding it, however,  where applicable converting these into automated tests, and in particular automated acceptance tests is a huge win.  I would love having a customer "own" the tests, but when this isn't possible (almost always) I will try to put my "customer" hat on and think like the customer and express what I'm about to do in their language (which will be English, not FITnese, or selenese, or rspec).  If the customer is happy with my specification, I can then use this directly as my test.</p>
<p>So for me, the lack of customer isn't the problem, but I agree with James on one point, there is a problem...</p>
<p>It's the people...  The majority of developers I've encountered can't think like the "Customer" and instead thrive on complexity.  They can't express the problem or solution correctly and write tests that become implementation specific.  This means they have written a test for a specific solution, where actually there could be a multitude of solutions, even in the same technology.  When they then 'implement' this solution and the customer doesn't like it, the test can't be reused and needs to be 'reworked' (I'm avoiding refactored, since the test was actually wrong, and therefore it should be fixed, not refactored).  This is the problem, the test may be rewritten many times at which point the customer will be thinking, this is now the n'th time I've asked for this exact same feature and I've seen five different versions of a test for the same thing, none of which are producing what I'm asking for.  If I was that customer would I want to own these "tests" which seem to be so difficult to change and can produce such a burden to tweak the implementation.</p>
<p>So for me, if I don't know what I'm doing, I won't do it and will ask for help from someone who does know what they're doing.  I would encourage all developers to have the courage to admit when they are out of their depth with a practise and seek advice rather than struggle on developing the wrong thing which ultimately ends up having little value.</p>
<p>I forever find myself coming back to the five values, and when I measure FIT against simplicity, communication and feedback it would come in at "Good, could do better"...</p>
<div id="spreadx">&nbsp;<a href="http://digg.com/submit?phase=2&url=http://www.agileinsider.org/2010/04/natural-language-automated-acceptance-testing/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/digg.gif" alt="Digg" border="0" /></a>&nbsp;&nbsp;<a href="http://www.stumbleupon.com/submit?url=http://www.agileinsider.org/2010/04/natural-language-automated-acceptance-testing/&title=%26%238220%3BNatural+Language%26%238221%3B+Automated+Acceptance+Testing" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/stumble.gif" alt="StumbleUpon" border="0" /></a>&nbsp;&nbsp;<a href="http://technorati.com/faves?add=http://www.agileinsider.org/2010/04/natural-language-automated-acceptance-testing/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/technorati.gif" alt="Technorati" border="0" /></a>&nbsp;&nbsp;<a href="http://del.icio.us/post?url=http://www.agileinsider.org/2010/04/natural-language-automated-acceptance-testing/&title=%26%238220%3BNatural+Language%26%238221%3B+Automated+Acceptance+Testing" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/delicious.gif" alt="Deli.cio.us" border="0" /></a>&nbsp;&nbsp;<a href="http://slashdot.org/submit.pl?url=http://www.agileinsider.org/2010/04/natural-language-automated-acceptance-testing/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/slashdot.gif" alt="Slashdot" border="0" /></a>&nbsp;&nbsp;<a href="http://www.dzone.com/links/add.html?url=http://www.agileinsider.org/2010/04/natural-language-automated-acceptance-testing/&title=%26%238220%3BNatural+Language%26%238221%3B+Automated+Acceptance+Testing" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/dzone.gif" alt="DZone" border="0" /></a>&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.agileinsider.org/2010/04/natural-language-automated-acceptance-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Real Value of Test First is the Thought Process</title>
		<link>http://www.agileinsider.org/2009/06/real-value-of-test-first/</link>
		<comments>http://www.agileinsider.org/2009/06/real-value-of-test-first/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 16:51:31 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[test driven]]></category>
		<category><![CDATA[acceptance tests]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[atdd]]></category>
		<category><![CDATA[just enough]]></category>
		<category><![CDATA[pragmatism]]></category>
		<category><![CDATA[simplicity]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[test first]]></category>

		<guid isPermaLink="false">http://www.agileinsider.org/?p=141</guid>
		<description><![CDATA[Thanks to a colleague at emergn I'm left questioning the real value of TDD.]]></description>
			<content:encoded><![CDATA[<div id="attachment_143" class="wp-caption alignleft" style="width: 310px"><img class="size-medium wp-image-143" title="A Bit Too Simple" src="http://www.agileinsider.org/wp-content/uploads/2009/06/simple_test-300x299.jpg" alt="TDD found the simple solution ;)" width="300" height="299" /><p class="wp-caption-text">TDD found the simple solution <img src='http://www.agileinsider.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p></div>
<p>Test Driven is a loaded term and means different things to different people.  I much prefer the term Test First which clearly states that the test comes before the implementation.  However, for me, the value is not necessarily in creating an executable test, but in the thought processes that Test First brings out.</p>
<p>One of my colleagues at <a href="http://www.agileinsider.org/emergn" target="_blank">emergn</a> is constantly reminding me that when presented with a solution you need to ask yourself what is the problem. This is what lead me to question TDD and it's variants.  If you search the web for Test Driven Development, you'll uncover a wealth of information from many of the authors in my BlogRoll, as well as many variants on a theme. I think the <a href="http://en.wikipedia.org/wiki/Test-driven_development" target="_blank">wikipedia entry</a> is a particularly good summary of Test Driven as it is currently understood by the community but for the real meat and bones you need to look at the articles from the thought leaders behind the practises.</p>
<p>However, when I look at this wealth of information, I'm now faced with the question...  OK, these are all solutions, but what is the fundamental problem they are solving?  Is it</p>
<ul>
<li>Code quality/design is poor</li>
<li>Code is overly complex/difficult to test</li>
<li>Unused functionality within the code</li>
<li>Too many bugs</li>
</ul>
<p>It is only when we understand the underlying problem fully that we can then evaluate the applicability/suitability of a particular approach.  Indeed, it is this lack of a clearly defined problem which makes it impossible to determine which approach is best, since we can't define any tests up front...  This is actually a little bit of a paradox, but highlights for me one of the most important points about TDD.  TDD is a solution to too many problems and in certain cases is not a very good solution.</p>
<p>Testing should be about proving functionality, but unfortunately we too often see TDD trying to address non testing issues like design and code quality.  Of course, code needs to be testable, but it is not the responsibility of the Testing to enforce this, it is the responsibility of the design, but this is (unfortunately IMHO) the missing piece in most methodologies...  Indeed, the approach of writing the "Simplest Possible Thing" to pass a test is possibly my biggest bug-bear with TDD.  This approach often means you can <strong>pass tests with no functionality</strong> other than hard coded return values, now that has to be the biggest process smell ever.</p>
<p>I'm going to stop using TDD, or Test Driven now and use instead the term I prefer which is Test First.  For me, this means that before I do anything, I will <strong>determine</strong> ahead of time how I <strong>would</strong> test it.  The immediate benefit (a.k.a value) I get from determining how to test something is I'm also starting to think about (dare I suggest design) things like apis/design/interaction/responsibilities.  This is not the same as BDUF (big design up front), instead it is just enough thought at just the right moment to (hopefully)  prevent a disaster.  I can then apply some cost/benefit analysis with a pinch of risk analysis to assign a value to actually writing all the tests that TDD would have forced you to write, or just a small percentage to cover the important or more complex functionality.</p>
<p>Of course, in many cases I will actually create executable tests for many of those uncovered during this thought exercise, but will I go through the whole Red/Green/Refactor cycle, possibly not.  For me the Red/Green/Refactor is like micro context switching.  I prefer a slightly longer period of focus and therefore I may write quite a few tests at the same time before applying that context switch to go into coding mode.  This of course is my personal preference and undoubtedly would be scorned upon by the dogmatic TDD zealots, but if this is what makes me more productive, and without a baseline problem statement I challenge them to prove that this is not the best way to do your testing.</p>
<p>Test First allows me to</p>
<ul>
<li>Understand the problem I'm trying to solve</li>
<li>Think about how I will solve it (just enough design)</li>
<li>Uncover any unknowns or risks hidden in the initial problem statement</li>
<li>Produce high quality code which has just enough tests</li>
</ul>
<p>Many of the Test Driven approaches do indeed address many of the initial problems stated earlier, but are they the only solution to these problems?  Indeed, are these problems actually just symptoms of even deeper problems?  If the problem is simply that your code is very tightly coupled and difficult to test then the best ROI will probably come not from TDD but from up-skilling your development team on fundamental design principles (unskilled developers was the <strong>real problem</strong> in the first place and TDD can't solve that).</p>
<p>Resources:</p>
<ul>
<li>Wikipedia entry for Test Driven Development:  <a href="http://en.wikipedia.org/wiki/Test-driven_development" target="_blank">http://en.wikipedia.org/wiki/Test-driven_development</a></li>
<li>Introducing BDD by Dan North: <a href="http://dannorth.net/introducing-bdd" target="_blank">http://dannorth.net/introducing-bdd</a> (highly recommended reading)</li>
<li>C2 wiki entry for Test Driven: <a href="http://c2.com/cgi/wiki?TestDriven" target="_blank">http://c2.com/cgi/wiki?TestDriven</a></li>
</ul>
<div id="spreadx">&nbsp;<a href="http://digg.com/submit?phase=2&url=http://www.agileinsider.org/2009/06/real-value-of-test-first/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/digg.gif" alt="Digg" border="0" /></a>&nbsp;&nbsp;<a href="http://www.stumbleupon.com/submit?url=http://www.agileinsider.org/2009/06/real-value-of-test-first/&title=The+Real+Value+of+Test+First+is+the+Thought+Process" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/stumble.gif" alt="StumbleUpon" border="0" /></a>&nbsp;&nbsp;<a href="http://technorati.com/faves?add=http://www.agileinsider.org/2009/06/real-value-of-test-first/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/technorati.gif" alt="Technorati" border="0" /></a>&nbsp;&nbsp;<a href="http://del.icio.us/post?url=http://www.agileinsider.org/2009/06/real-value-of-test-first/&title=The+Real+Value+of+Test+First+is+the+Thought+Process" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/delicious.gif" alt="Deli.cio.us" border="0" /></a>&nbsp;&nbsp;<a href="http://slashdot.org/submit.pl?url=http://www.agileinsider.org/2009/06/real-value-of-test-first/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/slashdot.gif" alt="Slashdot" border="0" /></a>&nbsp;&nbsp;<a href="http://www.dzone.com/links/add.html?url=http://www.agileinsider.org/2009/06/real-value-of-test-first/&title=The+Real+Value+of+Test+First+is+the+Thought+Process" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/dzone.gif" alt="DZone" border="0" /></a>&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.agileinsider.org/2009/06/real-value-of-test-first/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple isn&#8217;t Easy</title>
		<link>http://www.agileinsider.org/2009/05/simple-isnt-easy/</link>
		<comments>http://www.agileinsider.org/2009/05/simple-isnt-easy/#comments</comments>
		<pubDate>Thu, 21 May 2009 22:15:10 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[human nature]]></category>
		<category><![CDATA[psychology]]></category>
		<category><![CDATA[simplicity]]></category>
		<category><![CDATA[test first]]></category>

		<guid isPermaLink="false">http://www.agileinsider.org/?p=55</guid>
		<description><![CDATA[After 2 days coaching on test first development within a legacy code-base (lots and lots of refactoring) it really hit home just how difficult it can be to do something simple.]]></description>
			<content:encoded><![CDATA[<p>After 2 days coaching on test first development within a legacy code-base (lots and lots of refactoring) it really hit home just how difficult it can be to do something simple. The English language doesn't help, because simple implies it should be easy, but in reality simplicity is extremely challenging.  I suspect this holds true in many fields (physics springs to mind, how long did it take for e=mc²).</p>
<p>I'm left wondering whether it is something inherent in human nature that leads us to strive complexity or whether it is actually the way we are educated.  Certainly, with regards to software engineering the majority of the agile techniques and practises appear to contradict what is being taught in universities.  The comment I hear most often when coaching Test First Development is that the difficulty is in thinking backwards, suggesting that the practise itself isn't difficult per se, but it's the way we think that needs rewired.</p>
<p>Of course, not knowing what the problem is makes it difficult to formulate a solution - now there''s a real challenge for agile <img src='http://www.agileinsider.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div id="spreadx">&nbsp;<a href="http://digg.com/submit?phase=2&url=http://www.agileinsider.org/2009/05/simple-isnt-easy/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/digg.gif" alt="Digg" border="0" /></a>&nbsp;&nbsp;<a href="http://www.stumbleupon.com/submit?url=http://www.agileinsider.org/2009/05/simple-isnt-easy/&title=Simple+isn%26%238217%3Bt+Easy" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/stumble.gif" alt="StumbleUpon" border="0" /></a>&nbsp;&nbsp;<a href="http://technorati.com/faves?add=http://www.agileinsider.org/2009/05/simple-isnt-easy/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/technorati.gif" alt="Technorati" border="0" /></a>&nbsp;&nbsp;<a href="http://del.icio.us/post?url=http://www.agileinsider.org/2009/05/simple-isnt-easy/&title=Simple+isn%26%238217%3Bt+Easy" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/delicious.gif" alt="Deli.cio.us" border="0" /></a>&nbsp;&nbsp;<a href="http://slashdot.org/submit.pl?url=http://www.agileinsider.org/2009/05/simple-isnt-easy/" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/slashdot.gif" alt="Slashdot" border="0" /></a>&nbsp;&nbsp;<a href="http://www.dzone.com/links/add.html?url=http://www.agileinsider.org/2009/05/simple-isnt-easy/&title=Simple+isn%26%238217%3Bt+Easy" target="_new"><img src="http://www.agileinsider.org/wp-content/plugins/spreadx/images/dzone.gif" alt="DZone" border="0" /></a>&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.agileinsider.org/2009/05/simple-isnt-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

