<?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; acceptance testing</title>
	<atom:link href="http://gojko.net/tag/acceptance-testing/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>Let&#8217;s change the tune</title>
		<link>http://gojko.net/2010/08/04/lets-change-the-tune/</link>
		<comments>http://gojko.net/2010/08/04/lets-change-the-tune/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 11:13:21 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[acceptance testing]]></category>
		<category><![CDATA[agile testing]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=1983</guid>
		<description><![CDATA[As a community, we&#8217;re very guilty of using technical terms and confusing business users. If we want to get them more involved, we have to use the right names for the right things and stop confusing people. This lesson is obvious in acceptance tests and we know that we need to keep the naming consistent [...]]]></description>
			<content:encoded><![CDATA[<p>As a community, we&#8217;re very guilty of using technical terms and confusing business users. If we want to get them more involved, we have to use the right names for the right things and stop confusing people. This lesson is obvious in acceptance tests and we know that we need to keep the naming consistent and avoid misleading terms, but we don&#8217;t do this when we talk about the process. For example, when we say continuous integration in the context of agile acceptance testing, we don&#8217;t really mean running integration tests. So why use that term, and then have to explain how acceptance tests are different from integration tests? Until I started using Specification Workshops as the name for a collaborative meeting about acceptance tests, it was very hard to convince business users to participate. But a simple change in naming made the problem go away. <span id="more-1983"></span></p>
<p>By using better names, we can avoid a lot of completely meaningless discussions and get people started on the right path straight away. So here is what I propose:</p>
<p>One of the biggest issues teams have with acceptance testing is who should write what and when. So we need to come up with a good name for the start of the process that clearly says that everyone should be involved, and that this needs to happen before developers start developing and testers start testing, because we want to use acceptance tests as a target for development. Test first is a good technical name for it, but business users don&#8217;t get it. I propose we talk about <b>Specifying Collaboratively</b> instead of test first or writing acceptance tests.</p>
<p>It sounds quite normal to put every single numerical possibility into an automated functional test, why wouldn&#8217;t you do it if it is automated. But such complex tests are unusable as a communication tool. So instead of writing functional tests, let&#8217;s talk about <b>Illustrating with Examples</b> (thanks, Dave) and expect the output of that to be <b>Key Examples</b> to point out that we only want enough to explain the context properly.</p>
<p>Key examples are raw material, but if we just talk about acceptance testing then why not just dump all those complicated 50-column 100-row tables into an acceptance test without any explanation, it&#8217;s going to be tested by a machine anyway. But these tests are for humans as well for machines, so let&#8217;s talk about a whole new step after this, about the process of extracting the minimal set of attributes and examples to specify a business rule, and about adding a title, description and so on. I propose we call this <b>Distilling the specification</b>.</p>
<p>I just don&#8217;t want to spend any more arguing with people who already paid a license for QTP that it is completely unusable for acceptance tests. As long as we talk about test automation, there is always going to be a push to use whatever horrible contraption testers already use for automation, because it&#8217;s logical to use a single tool. Acceptance testing tools don&#8217;t compete with QTP or things like that, they address a completely different problem. Instead of talking about test automation, let&#8217;s talk about automating a specification without distorting any information &#8211; <b>Literal Automation</b>. Literal automation also avoids the whole scripting horror and using technical libraries directly in test specifications. If it&#8217;s literal, it should look as it looked on the whiteboard, it should not be translated to selenium commands.</p>
<p>After Literal Automation, we get a specification that can be checked against the code automatically, an <b>Executable Specification</b>.</p>
<p>We want to run all the acceptance tests frequently to make sure that the system still does what it is supposed to do (and equally more important to check that the specification still says what the system does). If we call this regression testing, it&#8217;s very hard to explain to testers why they should not go and add five million other test cases to a previously nice, small and focused specification. If we talk about continuous integration, then we get into the trouble of explaining why these tests should not always be end-to-end and run the whole system. On the top of that, for some legacy systems we need to run acceptance tests against a live, deployed environment. Technical integration tests run before deployment. So let&#8217;s not talk about regression testing or continuous integration, let&#8217;s talk about<br />
<b>Continuous Validation</b> (or even <b>Frequent Validation</b>). </p>
<p>The long term pay-off from agile acceptance testing is having a reference on what the system does that is as relevant as the code itself, but much easier to read. That makes development much more efficient long term, facilitates collaboration with business users, leads to an alignment of software design and business models and just makes everyone&#8217;s life much easier. But to do this, the reference really has to be relevant, it has to be maintained, it has to be consistent with itself and with code. we should not have silos of tests that use terms we had three years ago, and those we used a year ago, and so on. Going back and updating tests is a very hard thing to sell to teams who are busy, but going back to update documentation after a big change is expected. So let&#8217;s not talk about folders filled with hundreds of tests, let&#8217;s talk about a <b>Living Documentation</b> system. That makes it much easier to explain why things should be self-explanatory, why business users need access to this as well and why it has to be nicely organised so that things are easy to find.</p>
<p>What do you think about this? Does it make sense? Will it help? Do you have a better name for one of these concepts, that explains it more clearly?</p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2010/08/04/lets-change-the-tune/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Stop automating manual test scripts!</title>
		<link>http://gojko.net/2010/07/19/stop-automating-manual-test-scripts/</link>
		<comments>http://gojko.net/2010/07/19/stop-automating-manual-test-scripts/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 10:54:41 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[acceptance testing]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[agile testing]]></category>
		<category><![CDATA[specification by example]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=1917</guid>
		<description><![CDATA[Creating an Executable Specification from existing manual test scripts might seem as a logical thing to do when starting out with Specification by Example and Agile Acceptance Testing. Such scripts already describe what the system does, and the testers are running them anyway, so automation will surely help. Not really &#8212; this is in fact [...]]]></description>
			<content:encoded><![CDATA[<p>Creating an <a href="http://www.acceptancetesting.info/key-ideas/executable-specifications/">Executable Specification</a> from existing manual test scripts might seem as a logical thing to do when starting out with Specification by Example and Agile Acceptance Testing. Such scripts already describe what the system does, and the testers are running them anyway, so automation will surely help. Not really &mdash; this is in fact one of the most common failure patterns.<span id="more-1917"></span></p>
<p>The problem is that manual and automated checks are affected by a completely different set of constraints. With manual testing, the time spent preparing the context is often a key bottleneck. With automated testing, people spend most time on understanding what is wrong when a test fails.</p>
<p>For example, to prepare for a manual test that checks user account management rules, you might have to log on to an administrative application, create a user, log on as that new user to the client application, and change the password after first use. To avoid doing this several times during the test, manual scripts often reuse the context. So you would create the user once, block that account and verify that the user cannot log on, reset the password to verify that it is re-enabled, then set some user preferences and verify they change the home page correctly. This approach helps a tester run through the script quicker.</p>
<p>With automated testing, time spent on setting up the user is no longer a problem. Automated tests generally go through many more cases than manual tests, and when they run correctly nobody is really looking at them. Once a test fails, someone has to go in and understand what went wrong. If a test is described as a sequence of interdependent steps, it will be very hard to understand what exactly caused the problem, because the context changes throughout the script. The fact that a single script is checking ten different things also makes it more probable that the test will fail because it is affected by lots of different areas of code. In the previous example with user account management, if the password reset function stops working, we won&#8217;t be able to set the user preferences correctly.  If we had ten different, smaller, focused and independent tests instead of one big script, a bug in the password reset function won&#8217;t affect the test results for user preferences. That makes tests more resilient to change and reduces the cost of maintenance. It also helps us pin-point the problems quicker.  </p>
<p>Instead of plainly automating manual test scripts, think about what the script is testing and describe that with a group of independent, focused tests. This will significantly reduce the automation overhead and maintenance costs.</p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2010/07/19/stop-automating-manual-test-scripts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Anatomy of a good acceptance test</title>
		<link>http://gojko.net/2010/06/16/anatomy-of-a-good-acceptance-test/</link>
		<comments>http://gojko.net/2010/06/16/anatomy-of-a-good-acceptance-test/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 02:50:00 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[acceptance testing]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[agile testing]]></category>
		<category><![CDATA[live documentation]]></category>
		<category><![CDATA[specification by example]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=1891</guid>
		<description><![CDATA[The long term benefits of agile acceptance testing come from live documentation – a description of the system functionality which is reliable, easily accessible and much easier to read and understand than the code. In order to be effective as live specification, acceptance tests have to be written in a way that enables others to [...]]]></description>
			<content:encoded><![CDATA[<p>The long term benefits of agile acceptance testing come from <a href="http://www.acceptancetesting.info/key-ideas/live-documentation/">live documentation</a> – a description of the system functionality which is reliable, easily accessible and much easier to read and understand than the code. In order to be effective as live specification, acceptance tests have to be written in a way that enables others to pick them up months or even years later and easily understand what they do, why they are there and what they describe. Here are some simple heuristics that will help you measure and improve your tests to make them better as a live specification.<span id="more-1891"></span></p>
<p>The five most important things to think about are:</p>
<ul>
<li>It needs to be self explanatory</li>
<li>It needs to be focused</li>
<li>It needs to be a specification, not a script</li>
<li>It needs to be in domain language</li>
<li>It needs to be about business functionality, not about software design</li>
</ul>
<p>Here is a really good example:</p>
<p><img src="http://gojko.s3.amazonaws.com/offer2.png" width="500" /></p>
<p>It has all the elements listed above. Whenever I&#8217;ve shown it to people in the workshops, I did not have to use a single word to explain it. The title and the introductory paragraph explain the structure of the test data enough that readers don&#8217;t need to work back from the data to understand the rule. But the examples are there to make it actually testable and explain the behaviour in edge cases. It is focused on a very particular rule of free delivery availability, does not explain how the books are purchased but just what the available delivery mechanism is, and does not try to talk about any implementation specifics.</p>
<p>Here is a really bad example (taken from <a href="http://fitnesse.org/FitNesse.UserGuide.PayrollTests.AddAndPayTest">http://fitnesse.org/FitNesse.UserGuide.PayrollTests.AddAndPayTest</a>)</p>
<p><img src="http://gojko.s3.amazonaws.com/bad_example_acceptance_test.png" /></p>
<p>This test has so many bad things in it that it is actually a good example to demonstrate what happens when people don&#8217;t take care about writing good tests. </p>
<p>First of all, although it has a title and some text around the tables to seemingly explain what&#8217;s going on, the effect of that is marginal. Why is this test &#8220;simple&#8221;, and what exactly in payroll is it checking? It fails straight away on the self-explanatory litmus-test.</p>
<p>Second, it&#8217;s not really clear what this test is checking. We need to work backwards. It seems to verify that the cheques are printed with unique numbers, starting from the next available number that&#8217;s configurable in the system. It also seems to validate the data printed on each cheque. And that there is one cheque printed per employee (I&#8217;ll come back to this later).</p>
<p>There is a lot of seemingly incidental complexity there &#8211; names and addresses aren&#8217;t really used anywhere in the test apart from setting up the employees. There are some database IDs there which are completely irrelevant for the business rules, but they are used to match up employees and the paycheck inspector. </p>
<p>Paycheck inspector is obviously an invented thing just for testing. No company is going to have Peter Sellers in a Clouseau outfit inspecting cheques as they go out. If you have enough employees to have to print cheques, you don&#8217;t want to inspect them manually. That&#8217;s what this test is about, anyway.</p>
<p>There is also a very interesting issue of those blank cells in the assertion part of the test, and the two Paycheck inspector tables which seem unrelated. Blank cells in Fitnesse are used to print test results for debugging and troubleshooting, they don&#8217;t check anything. So this is an automated test that a human has to look over &mdash; pretty much defeating the purpose of automation. Blank cells are typically a sign of instability in tests (more on this a bit later) and they are often a signal that you&#8217;re missing something &#8211; either testing in the wrong place or missing a rule that would help make the system process repeatable and testable.</p>
<p>The language is inconsistent, which makes it hard to make a connection between inputs and outputs at first. What is the 1001 value in the table below? The column header tells us that it is a number &#8211; well thanks for that, I though it was a sausage. There is a &#8220;cheque number&#8221; above, but what kind of a cheque number is that? What is the relationship between these two things?</p>
<p>So this test is very very bad. </p>
<p>Presuming that the addresses are there because cheques are printed as part of a statement with an address ready for automated envelope packaging, this test fails to check at least one very important thing (and I&#8217;ll come back to this later as well): that the right people got paid the right amounts. If the first person got both cheques, this test would happily pass. If they both got each-others salaries, this test would pass. If a date far in the future was printed on the cheque, our employees might not be able to cash it in but the test would still pass. The reason these cells are blank is because there is another hidden rule there: ordering of cheques coming out. There is nothing specifying that. So a technical workaround for a functional gap is to create a test that gives us loads of false positives.</p>
<p>Is this test checking one thing or many things? Without the context information it&#8217;s hard to tell. If the cheque printing system is used for anything else, I&#8217;d pull out the fact that cheque numbers are unique and start from a configured number into a separate page. If we only ever print salary cheques, it&#8217;s probably part of a single thing (salary cheque printing).</p>
<p>Now, let&#8217;s clean it up. Let&#8217;s try to work back and drop all the incidental stuff. Let&#8217;s use a nice descriptive title, such as &#8220;Payroll Cheque Printing&#8221;. And let&#8217;s add a paragraph that explains the structure of the test.</p>
<p>A cheque has the payee name, amount, payment date. A cheque does not have a name and a salary. If the cheque is printed on a statement, it also has an address that will be used for automatic envelope packaging. A combination of a name and address should be enough for us to match the employee with his cheque &mdash; we don&#8217;t really need the database IDs. We can make the system more testable by agreeing on an ordering rule, whatever it is. For example, alphabetic by name.</p>
<p>Let&#8217;s also pull the context to the start of the test. Our context is the payroll date and the next available cheque number, along with employee salary data. Let&#8217;s make it explicit what the number is for, so that the readers don&#8217;t have to figure this out for themselves in the future. We can also make this block stick out visually to show that it is about the context.</p>
<p>The action that gets kicked off doesn&#8217;t necessarily need to be listed in the test. A payroll run can be executed implicitly by the table that checks payroll results. This is an example of focusing on what&#8217;s being tested instead of how it is being checked. There is no need to have a separate step that says &#8220;Next we pay them&#8221;.</p>
<p>Let&#8217;s also rename that paycheck inspector to something that makes more sense. Because we want whoever automates this to ensure that we check for all cheques printed, let&#8217;s put that in the header. Otherwise, someone might use subset matching and the system might print every cheque twice and we won&#8217;t notice.</p>
<p>And here is the cleaned version. </p>
<p><img src="http://gojko.s3.amazonaws.com/fixed_acceptance_test.png" width="500" /></p>
<p>Much easier to understand, without all that incidental stuff.  And now comes the punchline. When we look at the test like this, without database IDs, without all the unnecessary clutter, we can have a nice shot at answering the question &#8220;Are we missing something?&#8221;. What are the edge cases that might break this? We don&#8217;t really need to ensure validity of employee data, hopefully that&#8217;s done in another part of the system. But is there any kind of valid employee data that would be an edge case for this test &#8211; can we play with the numbers to make this illogical in some way?</p>
<p>An obvious answer to that is &#8211; what happens if an employee has a salary of 0? Do we still print the cheque? The rule as we described it says &#8220;One cheque per employee&#8221; &#8211; so any employees that have been fired years ago and no longer receive salaries would still get cheques printed, with zeroes on them. We could then have a discussion with the business on making this rule stronger and ensuring that cheques don&#8217;t go out when they don&#8217;t need to do.</p>
<p>FitNesse gets a lot of bad reputation because of this kind of broken tests. Concordion was built as an answer. Some people at my recent workshop on this example pointed out that Given-When-Then structure of Cucumber would be better at preventing some of these problems.  I don&#8217;t think so. It&#8217;s not about the tools &#8211; people can do this kind of bad test design with any tool, and likewise they could do nice and clean tests with FitNesse. I guess the fact that the basic examples coming with FitNesse are so bad doesn&#8217;t help, but the problem is not in the tool. It&#8217;s about the process and effort put into making the tests easy to understand. The funny thing is it doesn&#8217;t take a lot more effort to make the test nice and clean, but it brings a lot more value that way.   </p>
<p><i>If you found this article helpful, you&#8217;ll love my <a href="http://neuri.co.uk/training/hands-on-agile-acceptance-testing/">three day workshop on effective specification by example and agile acceptance testing</a></i></p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2010/06/16/anatomy-of-a-good-acceptance-test/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>The perfect agile test management tool</title>
		<link>http://gojko.net/2010/05/04/the-perfect-agile-test-management-tool/</link>
		<comments>http://gojko.net/2010/05/04/the-perfect-agile-test-management-tool/#comments</comments>
		<pubDate>Tue, 04 May 2010 06:46:35 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[acceptance testing]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[agile testing]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=1815</guid>
		<description><![CDATA[David Evans and I facilitated a session on designing a killer agile test management tool last week at the UK Test Management Forum, with the goal of learning what are the biggest currently unsolved problems for agile teams in the area of testing at the moment. So for any tool vendors our there, here are [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://gojko.s3.amazonaws.com/tmf-april-02.jpg" align="left" width="300" style="margin:5px 5px 5px 5px" /> <a href="http://www.computerworlduk.com/community/blogs/index.cfm?blogid=20">David Evans</a> and I facilitated a session on designing a killer agile test management tool last week at the <a href="http://uktmf.com/">UK Test Management Forum</a>, with the goal of learning what are the biggest currently unsolved problems for agile teams in the area of testing at the moment. So for any tool vendors our there, here are the ideas. </p>
<p>We ran a variant of the <a href="http://innovationgames.com/product-box/">Product Box game</a>, described by Luke Hohmann in <a href="http://www.amazon.co.uk/gp/product/0321437292?ie=UTF8&#038;tag=swingwiki-21&#038;linkCode=as2&#038;camp=1634&#038;creative=19450&#038;creativeASIN=0321437292">Innovation Games: Creating Breakthrough Products and Services</a><img src="http://www.assoc-amazon.co.uk/e/ir?t=swingwiki-21&#038;l=as2&#038;o=2&#038;a=0321437292" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />, with five teams competing to design the best agile test management tool. They gave their products the following names: Silver Bullet, Agile Manager, Perfect 10, Nimble and FleXT. <span id="more-1815"></span></p>
<p>Getting all kinds of different tools to talk to each other seems to be the biggest problem in the community at the moment. Instead of a monolithic all-in-one solution, all groups went for integration with other tools. Perfect 10 has &#8220;extensive integration with unit test tools, build tools, source code repositories&#8221;. Agile manager is able to &#8220;pull the requirements from whatever the requirements management tool you are using&#8221;. FleXT even integrates with third party defect management systems. The ability to pull the data out of a management tool also seemed very important, with FleXT offering REST and MS office interfaces and Nimble having a &#8220;unique universal adapter&#8221;. With such a wide range of integrated collaborators, the main feature of these tools seems to be rich reporting. Agile Manager automatically offers traceability to requirements and allows you to &#8220;dig in, find out the whole trend analysis, what the developers are doing, whether it&#8217;s working, whether it&#8217;s not working, who&#8217;s working hard and who is not&#8221;. FleXT also has coverage management &#8211; other teams didn&#8217;t seem to think that this was a key feature.</p>
<p>Improved collaboration was an interesting topic as well. Agile Manager offers continuous integration and analysis: &#8220;While developers are running the code we are telling them whether it is going to work or not. We&#8217;re going to put red squiggly lines below the code.&#8221; Nimble allows people to &#8220;block and tackle any problem&#8221;. It also performs continuous testing and has a &#8220;soft wall for code review&#8221;. FleXT has a virtual story board with virtual sticky notes.</p>
<p><img src="http://gojko.s3.amazonaws.com/tmf-april-01.jpg" align="right" width="400" style="margin:5px 5px 5px 5px" /> A very surprising outcome of this workshop for me was that most tools seemed to provide a holistic view at a range of projects instead of focusing on managing tests. Many of them were more about story management than tests or defects. Perfect 10, for example, has a product catalogue and, given the priorities, works out automatically which sprint a feature will go into and automatically produces velocity and burndown charts. It has a current sprint view with a quick status overview of the requirements and tests for an on-going iteration. It also has a product catalogue dashboard, with a quick overview of several projects and the ability to drill down to identify problems. Nimble has &#8220;cross-project control, resource monitoring, defect tracking, task progress and graphical dashboards&#8221; and &#8220;shows you exactly where you are and where you want to be&#8221;. Agile Manager goes even further to produce a &#8220;a cost/benefit analysis model &#8211; how you&#8217;re moving against your budget&#8221; and predicts what the implications might be if someone comes in and changes one of the requirements, integrated with the cost benefit model. &#8220;if you put that feature in, that&#8217;s great but it&#8217;s going to set the project back this by this much time and it&#8217;s going to cost this amount of money&#8221;. </p>
<p>Coming back from the future into present time, many of these features already exist in a bunch of different tools, but the workshop suggested that we are lacking a universal aggregator for all the data that provides a holistic view at the whole product range. <a href="http://www.sonarsource.org/">Sonar</a> seems to be the closest thing to an universal integrator I&#8217;ve seen so far &#8211; it provides heuristics and analytics on code coverage, unit testing and code quality with a plug-in extension model. So we could easily extend it to pull in functional test statistics and defect management metrics as well.</p>
<p>I wouldn&#8217;t be surprised if many story management features mentioned exist in one of the popular agile project management tools, but what those tools are probably lacking at the moment is the holistic approach. </p>
<p>Photos: <a href="http://www.nathanbain.co.uk/">Nathan Bain</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2010/05/04/the-perfect-agile-test-management-tool/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Acceptance tests are not a by-product of development</title>
		<link>http://gojko.net/2010/04/28/acceptance-tests-are-not-a-by-product-of-development/</link>
		<comments>http://gojko.net/2010/04/28/acceptance-tests-are-not-a-by-product-of-development/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 12:02:46 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[acceptance testing]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[openvolcano10]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=1802</guid>
		<description><![CDATA[Long term maintenance cost is one of the biggest issues that teams face today when implementing agile acceptance testing. Tests that are just written and automated without any long term planning are guaranteed to cost you more than they are worth. But then again, a properly designed testing framework saves a lot of money, time [...]]]></description>
			<content:encoded><![CDATA[<p>Long term maintenance cost is one of the biggest issues that teams face today when implementing agile acceptance testing. Tests that are just written and automated without any long term planning are guaranteed to cost you more than they are worth. But then again, a properly designed testing framework saves a lot of money, time and effort in the long run.  It seems that the community is now going through the same learning cycle as we went through with unit tests, with people writing any crap code in unit tests at first, then learning that testing code maintenance hurts as much as it would hurt for normal code, and cleaning up their act. The ongoing research for my new book has helped me understand that, in the case of acceptance tests, the problem is much deeper. <span id="more-1802"></span></p>
<p>At the recent open space session on the future of acceptance testing at <a href="http://gojko.net/tag/openvolcano10/">Open Volcano 10</a>, we discussed treating test code as second class as one of the biggest problems with agile acceptance testing implementation and one of the biggest challenges for teams in the future. It also appeared on the <a href="http://gojko.net/2009/09/24/top-10-reasons-why-teams-fail-with-acceptance-testing/">top 10 reasons why teams fail with acceptance testing</a> at <a href="http://gojko.net/tag/citcon/">CITCON Europe 09</a>. Long term test maintenance costs also sparked a recent discussion on tools in the blogosphere (see <a href="http://jamesshore.com/Blog/The-Problems-With-Acceptance-Testing.html">Jim Shore&#8217;s original article</a> and responses from <a href="http://blog.gdinwiddie.com/2010/03/01/the-reality-of-automated-acceptance-testing/">George Dinwiddie</a>, <a href="http://xprogramming.com/xpmag/problems-with-acceptance-testing">Ron Jeffries</a> and <a href="http://gojko.net/2010/03/01/are-tools-necessary-for-acceptance-testing-or-are-they-just-evil/">my reply</a> and comments on those posts). I now believe that most of these issues come from the same problem.</p>
<h2>An acceptance testing framework is a product on its own</h2>
<p>Although most of them don&#8217;t realise it themselves, the most successful teams I interviewed actually treat their acceptance testing framework as a product in its own right. I&#8217;m not talking about the automation tool &#8211; though some of the teams have developed their own tools or extended opensource tools significantly &#8211; but about the test specifications, the infrastructure around them and the integration layer for automation (fixtures, step definitions, keyword implementations). </p>
<p>Many teams have ended up designing a domain specific language for specifications and tests (implemented using FIT, Cucumber, Robot Framework or even directly in code), structuring their acceptance tests around it to keep them consistent, easy to understand and minimise long term maintenance costs. When retrofitting acceptance testing into already existing products, they often had to make the system and the architecture more testable, which required senior people to plan and implement serious design changes. Implementing agile acceptance testing successfully, and getting the most benefits out of it, requires a significant investment in all of this. It requires structure, design and planning. It requires thinking about how to maximise the return on investment in the framework. It requires on-going cultivation and maintenance. </p>
<p>If we think about tests as by-products of the development process, this investment is very hard to justify because it doesn&#8217;t give direct value to any of the project stakeholders. The stakeholders of the framework, however, aren&#8217;t the customers or the business users. They are the members of the development teams (and maintenance teams if separate). Many teams I interviewed have at some point ripped out the heart of their system and replaced it, or rewritten the entire system, while keeping their acceptance tests and using them to guide the whole effort. This is where the investment in <a href='http://www.acceptancetesting.info/key-ideas/live-documentation/'>live documentation</a> really pays off. Such a framework is genuinely a separate product, with a different lifecycle and a different group of stakeholders. </p>
<p>Understanding that the acceptance testing framework is actually a product resolves a ton of things I&#8217;ve considered genuine problems in the past, but now look at them as just symptoms of this deeper issue. For example, once you start thinking about the framework as a product, the question of whether to put the tests in a version control system or not goes away immediately. Cleaning up “test code” no longer requires a separate explanation. Working on enhancing the structure or clarity of tests is no longer something to put on the technical debt list – it is part of a backlog for a completely separate product. The flaw in delegating the work on acceptance tests to junior developers and testers suddenly becomes obvious. On the other side of this equation, looking at the testing framework as a separate product also prevents teams from falling into the trap of goldplating the tests at the expense of the primary product.</p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2010/04/28/acceptance-tests-are-not-a-by-product-of-development/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
