<?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; specification by example</title>
	<atom:link href="http://gojko.net/tag/specification-by-example/feed/" rel="self" type="application/rss+xml" />
	<link>http://gojko.net</link>
	<description>Building software that matters</description>
	<lastBuildDate>Tue, 22 May 2012 19:12:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Designing good Cucumber feature files</title>
		<link>http://gojko.net/2011/05/18/designing-good-cucumber-feature-files/</link>
		<comments>http://gojko.net/2011/05/18/designing-good-cucumber-feature-files/#comments</comments>
		<pubDate>Wed, 18 May 2011 23:43:14 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[atdd]]></category>
		<category><![CDATA[bdd]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[specification by example]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=2430</guid>
		<description><![CDATA[Alister Scott wrote a really nice paper on designing good specifications with examples/bdd scenarios/acceptance tests &#8211; focused on Cucumber, but applicable to other tools as well. He captured how to evolve horrible scripts into something quite useful. I strongly recommend reading it, especially if you&#8217;re working with UI tests. Now...]]></description>
			<content:encoded><![CDATA[<p>Alister Scott wrote a really nice paper on designing good specifications with examples/bdd scenarios/acceptance tests &#8211; focused on Cucumber, but applicable to other tools as well.  He captured how to evolve horrible scripts into something quite useful. I strongly recommend reading it, especially if you&#8217;re working with UI tests.</p>
<p>Now go to <a href="http://watirmelon.com/2011/05/18/specification-by-example-a-love-story/">http://watirmelon.com/2011/05/18/specification-by-example-a-love-story/</a> and enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2011/05/18/designing-good-cucumber-feature-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A fresh perspective on the specification/script problem</title>
		<link>http://gojko.net/2011/05/10/a-fresh-perspective-on-the-specificationscript-problem/</link>
		<comments>http://gojko.net/2011/05/10/a-fresh-perspective-on-the-specificationscript-problem/#comments</comments>
		<pubDate>Tue, 10 May 2011 01:56:59 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[specification by example]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=2414</guid>
		<description><![CDATA[I&#8217;ve been ranting, writing and teaching about the danger of using scripts as specifications for a while. This is one of the top reasons why teams fail with specification by example. I&#8217;m by no means the first or the only one to warn about this. Ward Cunningham and Rick Mugridge...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been ranting, writing and teaching about the danger of using scripts as specifications for a while. This is one of <a href="http://gojko.net/2009/09/24/top-10-reasons-why-teams-fail-with-acceptance-testing/">the top reasons why teams fail</a> with  specification by example. I&#8217;m by no means the first or the only one to warn about this. Ward Cunningham and <a href="http://www.rimuresearch.com/" target="_blank">Rick Mugridge</a> wrote against that in <a href="http://www.amazon.com/gp/product/0321269349/ref=as_li_ss_tl?ie=UTF8&#038;tag=swingwiki-20&#038;linkCode=as2&#038;camp=217145&#038;creative=399349&#038;creativeASIN=0321269349">FIT for developing software</a>. David Peterson wrote about that in <a target="_blank" href="http://www.concordion.org/Technique.html"  target="_blank">Concordion Technique</a>. Dan North recently wrote about that in <a href="http://dannorth.net/2011/01/31/whose-domain-is-it-anyway/" target="_blank">Whose Domain is it Anyway</a>. We all presented different heuristics to determine whether examples in a specification are at the right level of abstraction or not, mostly focusing on the difference between a series of steps that explain <i>how</i> something is done and a more direct explanation of <i>what</i> a system needs to do. But a relative novice was able to look at this with a fresh pair of eyes and come up with a much better way to explain it. <span id="more-2414"></span></p>
<p>It is truly amazing how much clarity a fresh perspective, uninhibited by lots of background knowledge, can offer. During a recent workshop in Oslo, while we were discussing the difference between scripts and specifications, <a href="http://jishervik.blogspot.com/">John Inge</a> asked:</p>
<blockquote><p>So if I summarise something and I use different words, then it is not a good specification?</p></blockquote>
<p>In this question, he formulated a fantastically simple yet powerful way to decide whether we need to refine a specification with examples further or not. If I try to summarise a set of examples and use different concepts, skip over parts and explain them differently, then the examples will probably be hard to understand later. It might also point out to unnecessary details or duplication, which means that the examples are not at the right level of abstraction.  This also means that the names, concepts and relationships in the mental model of the person explaining a specification aren&#8217;t directly represented in the examples. If the person explaining examples is a business user, this is a failure from the point of aligning business and software models, regardless of whether the examples illustrate a script composed of a series of steps or not.</p>
<p>If a summary of examples only requires the use of the concepts, names and relationships mentioned in the examples, that probably means that those examples are very direct and cannot be simplified further. But it also means that the examples are aligned with the mental model of the person explaining them, which is a good start for the application of ubiquitous language.</p>
<p>John wrote a <a href="http://jishervik.blogspot.com/2011/04/specification-by-example.html">blog post</a> about this, summarising the idea:</p>
<blockquote><p>
To see if you have captured <i>what</i> in your examples/tests you can use these criteria: </p>
<ol>
<li>You are using keywords from the examples to summarize them</li>
<li>You can’t summarize the examples in more simple terms.</li>
</ol>
</blockquote>
<p>Try it now, for example on the two sets of payroll examples in <a href="http://gojko.net/2010/06/16/anatomy-of-a-good-acceptance-test/">this post</a>. They both represent the same thing, so you can summarise or explain the examples for both cases in the same way (the header of the second version is probably a good summary). In the first case, many of the concepts and relationships from the summary are not directly expressed in the examples and the examples contain a lot of additional cruft. In the second case, the summary and examples are completely aligned. </p>
<p>To me, this looks as a very simple but powerful heuristic. How does it work when you try it on your examples?</p>
<p><i>If you&#8217;re interested in good practices for ATDD/BDD/Specification by example, learn how successful teams apply that in lots of different contexts in my <a href="http://specificationbyexample-blog.eventbrite.com">upcoming half-day workshop</a></i></p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2011/05/10/a-fresh-perspective-on-the-specificationscript-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Specification by example: Executive Summary</title>
		<link>http://gojko.net/2011/01/05/specification-by-example-executive-summary/</link>
		<comments>http://gojko.net/2011/01/05/specification-by-example-executive-summary/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 15:20:28 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[bdd]]></category>
		<category><![CDATA[specification by example]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=2154</guid>
		<description><![CDATA[I&#8217;m running a half-day seminar on Specification by Example in London on 2nd of February. The seminar covers an introduction to Specification by Example and the most important results of the research I&#8217;ve conducted for my new book on how 50+ teams, from small web startups to teams working for...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m running a half-day seminar on Specification by Example in London on 2nd of February. The seminar covers an introduction to Specification by Example and the most important results of the research I&#8217;ve conducted for my new book on how 50+ teams, from small web startups to teams working for large investment banks, got big pay-offs from BDD, agile acceptance testing, specification by example and related techniques. </p>
<p>The seminar should specifically fit people who are too busy to attend training otherwise, such as team leaders, managers and senior technical people.  <a href="http://specificationbyexample-gojko.eventbrite.com/">Click here for more information and to register</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2011/01/05/specification-by-example-executive-summary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The principle of symmetric change</title>
		<link>http://gojko.net/2010/12/02/the-principle-of-symmetric-change/</link>
		<comments>http://gojko.net/2010/12/02/the-principle-of-symmetric-change/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 12:29:39 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[agile testing]]></category>
		<category><![CDATA[bdd]]></category>
		<category><![CDATA[specification by example]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=2143</guid>
		<description><![CDATA[One of the most important lessons that I&#8217;ve learned as the result of the research conducted for my upcoming book Specification by Example is that many of the most common problems people have with implementing BDD or agile acceptance testing come from a misalignment of conceptual models. By changing our...]]></description>
			<content:encoded><![CDATA[<p>One of the most important lessons that I&#8217;ve learned as the result of the research conducted for my upcoming book <a href="http://specificationbyexample.com">Specification by Example</a> is that many of the most common problems people have with implementing BDD or agile acceptance testing come from a misalignment of conceptual models. By changing our view at the specifications/tests we can make most of those issues go away instantly.<span id="more-2143"></span></p>
<p>The most useful software models are the ones where the technical view of the world is aligned with the relevant business domain model. This ensures that one small change in the business domain (new requirements or changes to existing features) results in one small change in software. This is one of the key ideas of Domain Driven Design. The alignment of the technical and the business models ensures that software evolves nicely with the business and that we never get into a position where a small report change requires a rewrite of the entire system or six months to implement.</p>
<p>The same is true for the other artefacts produced for software &mdash; especially tests and documentation. When the conceptual model used in the tests is aligned with the business domain model, one small change in business will result in one small change in tests, making the tests easy to maintain. This applies to the language used in the tests, the abstractions used to describe features and the way that the tests are organised. So I propose the following principle to get good executable specifications/acceptance tests/bdd scenarios/feature files/fitnesse pages or whatever you call them:</p>
<blockquote><p><b>The principle of symmetric change</b><br />
One small change in a business model should require one small change to executable specifications.
</p></blockquote>
<p>To achieve this, ensure that:</p>
<ul>
<li>each specification should be focused on a single concept of the business domain model (which might be a business rule, step in a flow, or something higher such as the overall definition of a business process)</li>
<li>the concepts used in key examples in a specification are closely aligned with the business domain model and reflected in underlying software domain model. this includes naming (concepts are described in the business domain language) but also the relationships between them.</li>
<li>the (automated) validation procedure is clearly separated from the specification of key examples</li>
<li>the specifications are organised into a living documentation system according to the conceptual relationships that exist in the business domain model</li>
</ul>
<p>Thinking about aligning key examples and specifications with the business domain model instantly solves many of <a href="http://gojko.net/2009/09/24/top-10-reasons-why-teams-fail-with-acceptance-testing/">classic acceptance testing/bdd problems we identified during a CITCON workshop in Paris last year</a>.  For example, &#8220;Focusing on How, not What&#8221; is a sure way to write tests that are very hard to maintain but lots of teams still do it. By thinking about aligning the language and abstraction concepts in the specifications with the business domain model, we force ourselves to describe what the software should do, not how it does it. This separates the specification (what) from the validation procedure (how can we check it in software). The validation procedure can then be automated using a tool. This is a classic problem that Ward Cunningham and Rick Mugridge have identified in Fit For Developing Software nand advised readers not to automate flows. But that is an overly generalised statement &#8211; it confuses people who deal with genuine workflows,  for example in payment systems where business workflows are everything. David Peterson advised people to focus on specification over scripting, which is less generalised but still not directly to the point. Flows or scripts aren&#8217;t the real problem &#8211; it is mixing the business definition of a function with the validation procedure. </p>
<p>Thinking about specifications and tests in this way also prevents people from falling into the trap of <a href="http://gojko.net/2010/07/29/the-sine-of-death-by-ui-test-automation/">The Sine of Death by UI Test Automation</a>. Tests described with low level technical detail, in the language of technical UI interactions, are everything but aligned with a business model. If anything, they are aligned with the current design and layout of user interfaces. A small change in business requirements can have a huge impact on such tests, requiring hours of updates to tests after just a few minutes of changes to the code, which then fails the symmetric change principle. </p>
<p>Ensuring that the specifications are aligned with the business model and in the business language, organised according to the relationships the underlying concepts have in the business model solves all the reasons behind the &#8220;Tests unusable as live documentation&#8221; family of problems, and ensuring that the previous documents are still aligned with the new model resolves most of the issues we described as &#8220;Test code not maintained with love&#8221;.    </p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2010/12/02/the-principle-of-symmetric-change/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Specification by Example &#8211; First few chapters available</title>
		<link>http://gojko.net/2010/11/03/specification-by-example-first-few-chapters-available/</link>
		<comments>http://gojko.net/2010/11/03/specification-by-example-first-few-chapters-available/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 01:32:04 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[specification by example]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=2068</guid>
		<description><![CDATA[The first few chapters of my upcoming book Specification by Example are now available through the Manning Early Access Program. Use the promotional code specbyex50 to get a 50% discount on the list price until December 1st. The book is a collection of 50+ case studies of teams that got...]]></description>
			<content:encoded><![CDATA[<p>The first few chapters of my upcoming book <a href="http://specificationbyexample.com">Specification by Example</a> are now available through the <a href="http://affiliate.manning.com/idevaffiliate.php?id=1153_239">Manning Early Access Program</a>. Use the promotional code <b>specbyex50</b> to get a 50% discount on the list price until December 1st. </p>
<p>The book is a collection of 50+ case studies of teams that got big payoffs from specification by example, behaviour driven development and agile acceptance testing. </p>
<p>We&#8217;ll update the early access shortly with more chapters and a draft of the entire book should be available relatively soon. I&#8217;d love to hear your comments. </p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2010/11/03/specification-by-example-first-few-chapters-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

