<?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>Liz Keogh&#039;s blog &#187; bdd</title>
	<atom:link href="http://lizkeogh.com/category/bdd/feed/" rel="self" type="application/rss+xml" />
	<link>http://lizkeogh.com</link>
	<description>Software, Training, Coaching, Writing</description>
	<lastBuildDate>Thu, 17 May 2012 18:05:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The Myth of &#8220;What&#8221; and &#8220;How&#8221;</title>
		<link>http://lizkeogh.com/2012/03/05/the-myth-of-what-and-how/</link>
		<comments>http://lizkeogh.com/2012/03/05/the-myth-of-what-and-how/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 21:19:30 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[bdd]]></category>
		<category><![CDATA[business value]]></category>
		<category><![CDATA[stories]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=754</guid>
		<description><![CDATA[I often hear things like, &#8220;Tell the team what to build, but don&#8217;t tell them how to build it.&#8221;
Or, &#8220;A feature is what you&#8217;re building. A story is how you&#8217;re going to build it.&#8221;
Or, &#8220;When you&#8217;re doing TDD, don&#8217;t worry about the internals of the class. The API is what it does. The internals are [...]]]></description>
			<content:encoded><![CDATA[<p>I often hear things like, &#8220;Tell the team what to build, but don&#8217;t tell them how to build it.&#8221;</p>
<p>Or, &#8220;A feature is what you&#8217;re building. A story is how you&#8217;re going to build it.&#8221;</p>
<p>Or, &#8220;When you&#8217;re doing TDD, don&#8217;t worry about the internals of the class. The API is what it does. The internals are how it does it.&#8221;</p>
<p>Here&#8217;s the thing. When we write code, that&#8217;s how we&#8217;re creating a story or a feature. It&#8217;s also how we&#8217;re implementing the architecture. It&#8217;s how we&#8217;re managing security and providing an audit trail and doing a bunch of other stuff.</p>
<p>And that&#8217;s how we&#8217;re selling more goods. And how we&#8217;re keeping things maintainable for the future. And how we&#8217;re preventing data theft. And how we&#8217;re correcting our mistakes.</p>
<p>And that&#8217;s how we&#8217;re staying in business. And how we&#8217;ll be able to react in the future. And how we&#8217;re able to sleep at night. And how we learn.</p>
<ul>
<li>The code is how we deliver a story.</li>
<li>The story is how we deliver a feature.</li>
<li>The feature is how we give the users the capability to do something.</li>
<li>The users&#8217; capabilities are how they deliver a business goal.</li>
<li>The business goals are how stakeholders implement a vision.</li>
<li>The vision is an idea of how to make money, save money or protect revenue.</li>
<li>And we could keep going if we wanted to&#8230;</li>
</ul>
<p>Every goal, no matter how big or small, is the <em>how</em> for someone&#8217;s <em>what</em>. (The <em>how</em> and the <em>what</em> may come from the same person, but the interesting stuff happens when they&#8217;re different people. Or behave like they are.)</p>
<p>If only life worked by being able to divide a bigger <em>what</em> up into smaller pieces and manage them appropriately, then it would all be fine! Unfortunately the code has to work <em>with other code</em> to deliver its value. The features have to work <em>with other features</em>. The system has to work with other systems, users have to work with other users and the goals of one stakeholder have to align with the goals of another.</p>
<p>This is why we have root cause analysis and the &#8220;5 Whys&#8221; &#8211; because when we can see the higher-level goals and deeper-rooted problems, we can understand better how our own actions fit into them, and what they deliver &#8211; for better or worse. This is also true for other domains than software.</p>
<p>It doesn&#8217;t really matter much whether we call them features, stories or tasks, as long we appreciate that they&#8217;re <em>how</em> we&#8217;re delivering to those higher-level <em>whats</em>, and we have a pretty good understanding of the <em>whats</em> and how to test that we&#8217;ve achieved them, even (especially!) if the <em>what</em> is a learning or exploratory goal.</p>
<p>Of course, we&#8217;ll get the <em>how</em> wrong occasionally and fail to deliver the <em>what</em>. But that&#8217;s what feedback, in its many forms, is for.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2012/03/05/the-myth-of-what-and-how/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>It&#8217;s about the examples you can&#8217;t find, not the ones you can</title>
		<link>http://lizkeogh.com/2012/02/20/its-about-the-examples-you-cant-find-not-the-ones-you-can/</link>
		<comments>http://lizkeogh.com/2012/02/20/its-about-the-examples-you-cant-find-not-the-ones-you-can/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 17:50:22 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[bdd]]></category>
		<category><![CDATA[breaking models]]></category>
		<category><![CDATA[feedback]]></category>
		<category><![CDATA[learning]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=795</guid>
		<description><![CDATA[A long time ago, I was toying with the idea of starting my test methods with &#8220;will&#8221;, instead of &#8220;should&#8221;.
Dan explained to me, &#8220;If you start with the word &#8216;will&#8217;, you&#8217;re already making the assumption that you understand what you&#8217;re doing. Using &#8217;should&#8217; allows you to question whether you understand or not.&#8221;
For me, that was [...]]]></description>
			<content:encoded><![CDATA[<p>A long time ago, I was <a href="http://lizkeogh.com/2005/03/09/six-ugly-words/">toying with the idea</a> of starting my test methods with &#8220;will&#8221;, instead of &#8220;should&#8221;.</p>
<p><a href="http://dannorth.net">Dan</a> explained to me, &#8220;If you start with the word &#8216;will&#8217;, you&#8217;re already making the assumption that you understand what you&#8217;re doing. Using &#8217;should&#8217; allows you to question whether you understand or not.&#8221;</p>
<p>For me, that was the moment that I suddenly <em>got it</em>. BDD and TDD aren&#8217;t actually about making sure that something works well. They&#8217;re about uncovering the parts you don&#8217;t understand; the parts that are hard, and the gaps. <a href="http://dannorth.net/2010/08/30/introducing-deliberate-discovery/">Dan&#8217;s post introducing &#8220;Deliberate Discovery&#8221;</a> takes this idea even further, but it started here: replacing the word &#8220;test&#8221; with the word &#8220;should&#8221;.</p>
<p>This is why I find it more useful to look for the gaps in the examples; scenarios we haven&#8217;t thought of, or don&#8217;t know what to do. Chris Matts calls this, &#8220;Breaking the model&#8221;. Often whatever we do here is wrong, so we need to write down our suggestions and then get feedback on them.</p>
<p>If you do anything which starts suggesting to people that these examples are correct and complete &#8211; like, for instance, automating them or referring to them as &#8220;specifications&#8221; &#8211; then you may find yourself running into trouble. Automation is a commitment, specification can be seen as one, and we know by now that <a href="http://www.infoq.com/articles/real-options-enhance-agility">we never commit early unless we know why</a>.</p>
<p>You might also want to keep a small record of the looser requirements or behaviour that spawned the examples &#8211; for instance, as blurb in a scenario or as a method name &#8211; just so that you can give yourself a chance of spotting those gaps later. You won&#8217;t always get it right first time, and that should be OK.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2012/02/20/its-about-the-examples-you-cant-find-not-the-ones-you-can/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Conversational patterns in BDD</title>
		<link>http://lizkeogh.com/2011/09/22/conversational-patterns-in-bdd/</link>
		<comments>http://lizkeogh.com/2011/09/22/conversational-patterns-in-bdd/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 14:32:56 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[bdd]]></category>
		<category><![CDATA[breaking models]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=735</guid>
		<description><![CDATA[BDD isn&#8217;t about the tools. It&#8217;s about the conversations you have, exploring examples (or scenarios) of an application&#8217;s behaviour, to see if everyone has the right understanding.
Of course, we don&#8217;t know what we don&#8217;t know, so feedback is still important. We&#8217;ve got a good chance of discovering what someone else knows, and has perhaps forgotten [...]]]></description>
			<content:encoded><![CDATA[<p>BDD isn&#8217;t about the tools. It&#8217;s about the conversations you have, exploring examples (or scenarios) of an application&#8217;s behaviour, to see if everyone has the right understanding.</p>
<p>Of course, <a href="http://dannorth.net/2010/08/30/introducing-deliberate-discovery/">we don&#8217;t know what we don&#8217;t know</a>, so feedback is still important. We&#8217;ve got a good chance of discovering what <em>someone else</em> knows, and has perhaps forgotten to tell us, if we start questioning the ways in which our understanding might be wrong.</p>
<p>These are two patterns which I commonly use. You&#8217;ll notice that they follow from the typical BDD scenario template:</p>
<blockquote><p>
<strong>Given</strong> a context<br />
<strong>When</strong> an event happens<br />
<strong>Then</strong> an outcome should occur.</p></blockquote>
<h3>Context Questioning</h3>
<p>We can ask, &#8220;Is there any other context which, when this event happens, will produce a different outcome?&#8221;</p>
<p>It might be an additional context, or a context which occurs instead of the one(s) we&#8217;re considering. We can ask this question, or we can think of contexts ourselves and ask about those. For instance:</p>
<blockquote><p>
Given a client manager, Fred, has two clients, George and Henry<br />
When Fred uses the application<br />
Then Fred should only be able to see George and Henry&#8217;s accounts.
</p></blockquote>
<p>I ask, &#8220;Given I have no client managers, what happens then?&#8221; (I&#8217;m thinking of handling empty lists, because I&#8217;m a developer.)</p>
<p>The head of Client Management says, &#8220;What? Who cares? Why are you even using the application? Get on the phone and get some clients already!&#8221; (He&#8217;s thinking of his failing business.)</p>
<p>You can sometimes learn a lot about a business domain this way, even if the behaviour of the application isn&#8217;t going to change immediately!</p>
<h3>Outcome Questioning</h3>
<p>This is similar to Context Questioning, but instead, we ask,</p>
<blockquote><p>&#8220;Given this context, when this event happens, is there another outcome that&#8217;s important? Something we missed, perhaps?&#8221;</p></blockquote>
<p>Another way I like to ask this is, &#8220;If pixies were doing this instead of software, would it be enough? Or do they need to do something else, too?&#8221;</p>
<p>For instance:</p>
<blockquote><p>
Given the legacy system has a problem<br />
When a trader stores a trade<br />
Then the trader should be told about the problem.</p></blockquote>
<p>I ask, &#8220;Is that all that should happen? I&#8217;d be pretty upset if I were a trader and this happened a lot.&#8221;</p>
<p>My business analyst (by which I mean, someone who can analyse the business) says, &#8220;Well, we&#8217;ll still have the details in the system, so you&#8217;ll be able to do it again later. Oh, yes! We need to store the trade in our system still, too, but make sure it doesn&#8217;t have a legacy system ID so that we can tell it didn&#8217;t go through.&#8221;</p>
<h3>And that&#8217;s it.</h3>
<p>There are lots of other ways to have conversations around behaviour. They&#8217;ll usually be trying to find missing contexts and outcomes &#8211; places where a new piece of behaviour happens. These also tend to be the things which business users, familiar with their domains to the point where they don&#8217;t think about it, forget to talk about. Developers are pretty good at spotting this, because they&#8217;re usually thinking through how they&#8217;re going to implement the problem, and wondering what goes on the other side of the &#8220;if&#8230; else&#8230;&#8221; statement (even if we&#8217;re not meant to be implementing yet, we already are in our heads). Testers are also very good, because they&#8217;re used to the kind of things people get wrong when they produce software.</p>
<p>This is why getting all three people &#8211; a tester, a developer and a business analyst &#8211; is so useful when we&#8217;re discussing scenarios. It&#8217;s also why it&#8217;s so important to have the conversations &#8211; because<em> if you&#8217;re not having conversations, you&#8217;re not doing BDD</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2011/09/22/conversational-patterns-in-bdd/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Deliberate Discovery &#8211; a &#8220;Sonnet&#8221;</title>
		<link>http://lizkeogh.com/2011/06/30/deliberate-discovery-a-sonnet/</link>
		<comments>http://lizkeogh.com/2011/06/30/deliberate-discovery-a-sonnet/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 20:17:19 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[bdd]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[metathinking]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=700</guid>
		<description><![CDATA[Uncertainty&#8217;s the muse of all that&#8217;s new,
And ignorance the space in which she plays;
A year&#8217;s enough to prove a vision true,
But we could prove it false in only days.
We dream, and chase our dream, and never fear
To fail, and fail. Up, up! And on again,
But ask us to pursue another&#8217;s goals
And failure makes us mice [...]]]></description>
			<content:encoded><![CDATA[<p>Uncertainty&#8217;s the muse of all that&#8217;s new,<br />
And ignorance the space in which she plays;<br />
A year&#8217;s enough to prove a vision true,<br />
But we could prove it false in only days.<br />
We dream, and chase our dream, and never fear<br />
To fail, and fail. Up, up! And on again,<br />
But ask us to pursue another&#8217;s goals<br />
And failure makes us mice where we were men.<br />
Ah, best laid plans! Where were you at the end<br />
Who chained us and constrained us from the start?<br />
We knew you made a fickle, fragile friend;<br />
You tricked us when you claimed you had a heart!<br />
We thought less travelled roads would see us winning<br />
In places other fools had feared to stray -<br />
If only we had known from the beginning<br />
The ignorance we found along the way.<br />
And yet, a list of dangers and disasters<br />
Filled out, and scanned, and added to some more<br />
Would still have left out some of what we mastered -<br />
We didn&#8217;t know we didn&#8217;t know before.</p>
<p>We planned our way with maps we&#8217;d made already<br />
Assuming the terrain would be the same,<br />
Expecting well-paved roads to keep us steady<br />
And any local creatures to be tame.<br />
We loaded up our caravans and wagons<br />
With good advice, best practices and tools<br />
But didn&#8217;t spot the legend &#8211; &#8220;Here be dragons!&#8221;<br />
So we got burnt, again. They say that fools<br />
Rush in, and yet we count ourselves as wise,<br />
We praise each other&#8217;s skill and raise a glass<br />
To intellect &#8211; ignoring the demise<br />
Of expeditions just as skilled as ours.<br />
When they return, worn out, their pride in shreds,<br />
We laugh and say, &#8220;A death march! You expect<br />
Such things to fail.&#8221; And in our clever heads<br />
It&#8217;s obvious &#8211; at least in retrospect.<br />
The dragons of our ignorance will slay us<br />
If we don&#8217;t slay them first. We could be brave<br />
And work for kings who don&#8217;t refuse to pay us<br />
When we&#8217;re delayed because we found their cave.</p>
<p>They say that matter cannot be created,<br />
A fundamental principle and law,<br />
While dragons keep emerging, unabated;<br />
As many as you slay, there&#8217;s still one more.<br />
Our ignorance is limitless &#8211; be grateful,<br />
Or else we&#8217;d find we&#8217;ve nothing left to learn;<br />
To be surprised by dragons may be fateful,<br />
But truth be told, it&#8217;s best laid plans that burn.<br />
We could seek out the dragons in their dungeons<br />
And tread there softly, ready to retreat;<br />
We could seek other roads, postponing large ones,<br />
And only fight the ones we might defeat.<br />
The world could be a world of dragon slayers<br />
And stand as men and women, not as mice;<br />
The joy that comes from learning more should sway us;<br />
The fiercest dragons won&#8217;t surprise us twice.<br />
Discover tiny dragons, be they few,<br />
And all the mightiest, with equal praise -<br />
Uncertainty&#8217;s our muse of all that&#8217;s new,<br />
And ignorance the space in which she plays.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2011/06/30/deliberate-discovery-a-sonnet/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>ATDD vs. BDD, and a potted history of some related stuff</title>
		<link>http://lizkeogh.com/2011/06/27/atdd-vs-bdd-and-a-potted-history-of-some-related-stuff/</link>
		<comments>http://lizkeogh.com/2011/06/27/atdd-vs-bdd-and-a-potted-history-of-some-related-stuff/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 20:03:27 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[bdd]]></category>
		<category><![CDATA[business value]]></category>
		<category><![CDATA[stories]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=679</guid>
		<description><![CDATA[Another question that people often ask around or to me is, &#8220;What&#8217;s the difference between Acceptance Test Driven Development and Behavior Driven Development?&#8221;
To explain, I&#8217;ll go back to the time when I first learnt BDD.
BDD started at a unit or class level
Dan North started doing BDD at a unit or class level, as a replacement [...]]]></description>
			<content:encoded><![CDATA[<p>Another question that people often ask around or to me is, &#8220;What&#8217;s the difference between Acceptance Test Driven Development and Behavior Driven Development?&#8221;</p>
<p>To explain, I&#8217;ll go back to the time when I first learnt BDD.</p>
<h3>BDD started at a unit or class level</h3>
<p>Dan North <a href="http://dannorth.net/introducing-bdd/">started doing BDD at a unit or class level</a>, as a replacement for TDD &#8211; a mechanism for describing the behaviour of code and providing examples, without using the word &#8220;test&#8221;, because it turned out that this clarified a lot of the confusion (and I still find it much easier to teach TDD if I avoid the word &#8220;test&#8221;, whatever I subsequently call it).</p>
<p>It was only when Chris Matts said, &#8220;That looks quite a lot like analysis,&#8221; that Dan began taking it out to describe the behaviour of whole systems of code.</p>
<h3>ATDD practices at the time weren&#8217;t all that solid</h3>
<p>When I came across BDD (late 2004), I was working on a project which had been driven quite heavily with ATDD &#8211; at least to start with.</p>
<p>This project had 160 acceptance tests. They all consisted of lists of text boxes, button clicks, locating more text boxes and repeating until a particular outcome was reached. They were lengthy. They were rigorous. Unfortunately, at some point someone had introduced a dialog box into the flow, disrupting about 30% of these tests. There were another 10% also failing, possibly for similar reasons.</p>
<p>It took a couple of days for two of us to work through them, fixing the tests. We got most of them working, but not enough for anyone to actually care about them. The acceptance tests were making things hard to change.</p>
<h3>BDD changed the landscape</h3>
<p>Dan has since said that JBehave was &#8220;just a thought experiment&#8221;, and he didn&#8217;t really expect anyone to use it. (That&#8217;s good, because it JBehave 1.0 was pretty unusable, at least at a scenario level). It worked as a thought experiment, though, and lots of people started doing ATDD in a very different way &#8211; creating examples of how their system worked, and using those examples to explore the scope of their systems as well as the responsibility of their classes. Lots of people started working <em>outside-in</em>, from the UIs through which users experienced the system&#8217;s behaviour, to the controllers, the domain models, the utility classes, services, repositories, etc., until they finally had working software that tended to matter more to the stakeholders of the project than software had before.</p>
<p><a href="http://blog.davidchelimsky.net/2007/10/21/story-runner-in-plain-english/">Dave Chelimsky&#8217;s movement over to plain text</a> really helped this movement to take off. When people think of &#8220;BDD&#8221; they often think of the frameworks which have copied this (<a href="http://cukes.info/">Cucumber</a> and <a href="http://jbehave.org">JBehave 2.0</a> amongst them), even though <a href="http://lizkeogh.com/2011/03/04/step-away-from-the-tools/">this isn&#8217;t the complete story</a>. They have certainly encouraged developers &#8211; famous for their introverted natures &#8211; to boldly go into the analysis space.</p>
<h3>BDD enabled conversation</h3>
<p>Whether through frameworks, DSLs or just conversation, the biggest difference between BDD and ATDD was the way in which BDD enabled a common language between users and business stakeholders, because it <a href="http://domaindrivendesign.org/library/north_keogh_gitlevich_2007">supports Domain Driven Design&#8217;s &#8220;ubiquitous language&#8221;</a> (forgive the rabbit-in-the-headlights look, it was my first ever video!), and provides its own ubiquitous language for software development &#8211; the language of examples and behaviour, rather than tests and acceptance criteria.</p>
<p>The second difference was the reusability of steps. This is something which a lot of BDDers are still struggling with, so we&#8217;ve still got a way to go here. (More on steps and business / system capabilities some other time).</p>
<h3>BDD doesn&#8217;t just stop at scenarios, it goes all the way to the project vision</h3>
<p>Finally, Chris Matts introduced <a href="http://www.infoq.com/articles/pulling-power">Feature Injection</a>, which takes BDD&#8217;s patterns all the way into the analysis space.</p>
<p>(I consider Feature Injection and BDD to be children of <a href="http://dannorth.net/">Deliberate Discovery</a> (even though they preceded it), which is itself a child of <a href="http://www.infoq.com/articles/real-options-enhance-agility">Real Options</a>. I summarise Deliberate Discovery as the act of wilfully addressing ignorance. Both Deliberate Discovery and Real Options have implications and uses beyond software development, and I heartily recommend coaches and managers to go read up on them. In fact, everyone who lives a life of any kind of uncertainty should go and read up on them. And if your life is staid and comfortable, maybe it will help you to step into those challenging spaces. Go do it anyway.)</p>
<h3>Or at least, this used to be the difference&#8230;</h3>
<p>So that&#8217;s the past. What about now?</p>
<p>Well, most people who do ATDD nowadays use the Given-When-Then template which Chris introduced (shout-out to <a href="http://gojko.net/">Gojko Adzic</a> for his work in this space). They use domain language in conversation with the business. They&#8217;re interested in discussing what software would actually make a difference, then capturing that and sometimes automating it, with a focus on working out the software which would matter.</p>
<p>I&#8217;m guided by <a href="http://groups.google.com/group/behaviordrivendevelopment/msg/ee750a218b514946">Dan&#8217;s words to the BDD Google Group</a>, which apply both to TDD and ATDD:</p>
<blockquote><p>I think you can over-think these things.<br />
I&#8217;d like to avoid &#8220;BDD is better than TDD because&#8230;&#8221; or even &#8220;BDD is<br />
different from TDD (as originally envisioned) because&#8230;&#8221; </p>
<p>TDD is amazing. Its initial conception was to solve exactly what I&#8217;ve been<br />
trying to do with BDD. Originally it was described as variable scope (i.e.<br />
covering both the space of modern day TDD-in-the-small and what the ATDD/SBE<br />
folks are doing in the functional testing space). It&#8217;s not the *only* way to<br />
come up with good design, and neither is BDD. They&#8217;re just both useful to<br />
have in your back pocket as you go around trying to write decent software to<br />
solve useful problems. </p></blockquote>
<h3>They&#8217;re called different things</h3>
<p>The difference is that one is called Behaviour Driven Development &#8211; and some people find that wording useful &#8211; and one (or two) is called (Acceptance) Test Driven Development &#8211; and some people find that wording useful in a different way.</p>
<h3>And that&#8217;s it.</h3>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2011/06/27/atdd-vs-bdd-and-a-potted-history-of-some-related-stuff/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Acceptance Criteria vs. Scenarios</title>
		<link>http://lizkeogh.com/2011/06/20/acceptance-criteria-vs-scenarios/</link>
		<comments>http://lizkeogh.com/2011/06/20/acceptance-criteria-vs-scenarios/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 08:49:57 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[bdd]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=675</guid>
		<description><![CDATA[Some common confusion I&#8217;ve come across recently involves the difference between a Scenario and Acceptance Criteria.
I&#8217;ll start by defining these two things as I understand them.

A scenario is an example of the system&#8217;s behavior from one or more users&#8217; perspectives.
Acceptance criteria are a set of rules which cover aspects of a system&#8217;s behavior, and from [...]]]></description>
			<content:encoded><![CDATA[<p>Some common confusion I&#8217;ve come across recently involves the difference between a Scenario and Acceptance Criteria.</p>
<p>I&#8217;ll start by defining these two things as I understand them.</p>
<ul>
<li>A scenario is an example of the system&#8217;s behavior from one or more users&#8217; perspectives.</li>
<li>Acceptance criteria are a set of rules which cover aspects of a system&#8217;s behavior, and from which scenarios can be derived.</li>
</ul>
<p>Here&#8217;s a scenario from the pet shop I use in my BDD tutorials.</p>
<p><code><br />
Given a rabbit called Fluffy who is 1 1/2 months old<br />
When we try to sell Fluffy<br />
Then we should be told Fluffy is too young.<br />
</code></p>
<p>This is an <em>example</em> of the kind of thing a pet shop employee might encounter in the till software. It&#8217;s quite specific, containing actual data, and illustrates our domain nicely. We can tell quite a lot from this: that pets have names, that there are rules around the sale of pets, the units in which we measure the age of young pets, etc.</p>
<p>We can&#8217;t tell, though, what age we <em>would</em> be allowed to sell the pets. Is it fixed? For all pets? Let&#8217;s look at something else:</p>
<p><code><br />
Given a baby animal is younger than its recommended selling age<br />
When we try to sell it<br />
Then we should be told it's too young.<br />
</code></p>
<p>Despite the Given, When and Then, this is <em>not</em> a scenario. It&#8217;s acceptance criteria &#8211; a full specification of this aspect of behavior &#8211; phrased in scenario form. A lot of the time, I see people write criteria like this, then become confused when they can&#8217;t treat it like a real scenario &#8211; discussing it in detail, deriving further edge cases, automating it, etc.</p>
<p>Talking through scenarios is, for me, the most important aspect of BDD. That&#8217;s how we discover whether we have a shared understanding or not; by using specific examples to illustrate our understanding or discover our ignorance.</p>
<p>When we&#8217;re discussing the scenarios, it isn&#8217;t always necessary to write scenarios for all the acceptance criteria. As long as the acceptance criteria are clear enough to derive the relevant scenarios easily, I recommend leaving it as acceptance criteria until the point where it needs to be automated. You can tell if the scenarios can be derived in just a few seconds of conversation. You don&#8217;t need to write down <em>everything</em>.</p>
<p>It&#8217;s also possible to phrase acceptance criteria in other ways:</p>
<p><code><br />
We should be prevented from selling animals younger than the recommended age.<br />
</code></p>
<p>Now you can talk through the scenarios, and see potential other criteria which you missed:</p>
<p><code><br />
Customers should be encouraged to return when the animal is old enough to sell.<br />
</code></p>
<p>As you&#8217;re talking through the scenarios, the information we need for automation will emerge, and a better understanding of the domain spreads amongst the people involved in those discussions (usually a dev, BD and tester):</p>
<p><code><br />
Given rabbits can't be sold before they're 2 months old<br />
Given Fluffy the rabbit is 1 1/2 months old<br />
When we try to sell Fluffy<br />
Then we should be prompted to tell the customer, "This pet is too young. Please come back in 15 days to collect your pet."<br />
</code></p>
<p>By talking about both acceptance criteria and scenarios, asking why, and using scenarios to illustrate the criteria, we find out more about our domain. We can also automate them later on, where they&#8217;ll help to provide living documentation and act as regression tests.</p>
<p>There&#8217;s one other difference between a Scenario and Acceptance Criteria or even an Acceptance Test. You can ask your business stakeholders, &#8220;Can you give me a scenario where that happens?&#8221; or &#8220;Can you give me an example?&#8221; I&#8217;ve found this often draws out more useful discussions than, &#8220;Can you give me acceptance criteria for this?&#8221; or &#8220;Can you help me work out how to test this?&#8221;</p>
<p>The language of BDD, and particularly its vocabulary, provide a <a href="http://dannorth.net/introducing-bdd/">ubiquitous language</a> for analysis and development.</p>
<p><em>Now</em> we&#8217;re talking.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2011/06/20/acceptance-criteria-vs-scenarios/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Questions on BDD</title>
		<link>http://lizkeogh.com/2011/05/24/questions-on-bdd/</link>
		<comments>http://lizkeogh.com/2011/05/24/questions-on-bdd/#comments</comments>
		<pubDate>Tue, 24 May 2011 19:36:27 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[bdd]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=668</guid>
		<description><![CDATA[After my BDD tutorial at XP 2011, some attendees asked if I could write up a list of the review questions I asked afterwards. I asked them because they reflected on the things that I hoped the attendees learned, and to get feedback in case they hadn&#8217;t. As it was, they answered these questions very [...]]]></description>
			<content:encoded><![CDATA[<p>After my BDD tutorial at XP 2011, some attendees asked if I could write up a list of the review questions I asked afterwards. I asked them because they reflected on the things that I hoped the attendees learned, and to get feedback in case they hadn&#8217;t. As it was, they answered these questions very well!</p>
<p>I&#8217;ve rephrased these questions slightly because the attendees had more context&#8230; and included some which I wish I had asked!</p>
<ul>
<li>Why is BDD not focused on testing? What is it focused on instead?</li>
<li>How do we typically phrase scenarios?</li>
<li>Why do we focus on user and system capabilities in scenarios?</li>
<li>What&#8217;s more important than writing down or automating scenarios?</li>
<li>What&#8217;s the difference between a &#8216;Given&#8217; and a &#8216;When&#8217;?</li>
<li>Why do we split features into stories?</li>
<li>Why don&#8217;t we create scenarios for every user story up front?</li>
<li>What are the different granularities of requirements in Feature Injection and BDD?</li>
<li>Why do scenarios, of all the granularities, get so much attention in BDD?</li>
<li>How do the principles of Real Options play into BDD?</li>
<li>What single word was important to the start of BDD, and why?</li>
<li>Who should meet up to talk through scenarios before implementing the code?</li>
<li>Why do we want to get feedback quickly?</li>
<li>Can you give me an example of a stakeholder that isn&#8217;t a user?</li>
<li>What&#8217;s Context Questioning?</li>
<li>What&#8217;s Outcome Questioning?</li>
</ul>
<p>If you&#8217;d like to know more about how I answer these questions, I&#8217;ll be running introductory BDD tutorials later in the year at a few conferences, including <a href="http://agile2011.agilealliance.org">Agile 2011</a> (August, USA) and <a href="http://www.agiletestingdays.com/">Agile Testing Days 2011</a> (November, Europe). The tutorials include aspects of Real Options, Deliberate Discovery and Feature Injection, and focus on analysis, conversations and creating useful scenarios far more than on the tools.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2011/05/24/questions-on-bdd/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Step Away from the Tools</title>
		<link>http://lizkeogh.com/2011/03/04/step-away-from-the-tools/</link>
		<comments>http://lizkeogh.com/2011/03/04/step-away-from-the-tools/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 14:51:36 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[bdd]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=649</guid>
		<description><![CDATA[This may seem odd coming from someone who spent months coding a BDD tool, but seriously&#8230; put it down.
Step away.
BDD has taken off in the last few years, and lots of people have approached me for help. Many of the questions I get are along these lines:

These don&#8217;t seem worded quite right. What do you [...]]]></description>
			<content:encoded><![CDATA[<p>This may seem odd coming from someone who spent months coding a BDD tool, but seriously&#8230; put it down.</p>
<p>Step away.</p>
<p>BDD has taken off in the last few years, and lots of people have approached me for help. Many of the questions I get are along these lines:</p>
<ul>
<li>These don&#8217;t seem worded quite right. What do you think?</li>
<li>How can we stop these scenarios being so brittle?</li>
<li>How do we use our BDD tool to do &lt;this kind of testing&gt;?</li>
<li>We&#8217;re using a BDD tool. How do we get our analysts to help us?</li>
<li>How can we avoid all this duplication in our scenarios?</li>
<li>What do we do if the business aren&#8217;t interested in BDD?</li>
</ul>
<p>Don&#8217;t start with BDD, and definitely don&#8217;t start with the tools.</p>
<p>Start by having conversations, engaging both testers and business stakeholders or their proxies (analysts are good here). If you can&#8217;t have those conversations, stop. You can&#8217;t do BDD. You might be able to write some scenarios or some acceptance tests, but they&#8217;re likely to be brittle and it&#8217;s unlikely that anyone will be interested. Here&#8217;s why.</p>
<h3>BDD is focused on discovery.</h3>
<p>Dan wrote a <a href="http://dannorth.net/2010/08/30/introducing-deliberate-discovery/">blog post</a> introducing Deliberate Discovery some time ago. This philosophy is at the heart of BDD. There are things about your domain that you don&#8217;t know, or you&#8217;ve misunderstood, or that nobody&#8217;s thought of yet. By talking through examples in groups, the chances of uncovering these gaps and misunderstandings is increased. BDD provides a language &#8211; &#8220;Given &lt;a context&gt;, when &lt;an event happens&gt; then &lt;an outcome should occur&gt;&#8221; &#8211; which helps to prompt questions around whether the scenarios are accurate. It&#8217;s meant to help you have conversations, not replace those conversations entirely.</p>
<h3>Conversations help us discover things.</h3>
<p>You don&#8217;t have to stick to the BDD format to have those conversations. The language is a guide, and serves well for automation. Chances are that if you can&#8217;t phrase your discoveries in that way, you won&#8217;t be able to test the understanding later (though you might be able to explore some more). This is because tests start from a particular context, perform some events and verify some outcomes.</p>
<p>There are other things than scenarios which you can discover through conversations, though. You can listen to the language which your business stakeholders use. You can ask questions about the words they use and gain an understanding of the domain, which may not be used right now but will help you design your code in a way which allows changes to be made more easily, later.</p>
<p>The conversations often help to engender trust between stakeholders and the development team. When someone indicates that he wants to understand me, and plays back that understanding to check its accuracy, I am reassured that he genuinely cares. I tend to be more patient in my explanations, more likely to come join him in his place, wherever it is, and more likely to check back later to see how he&#8217;s doing.</p>
<p>Business stakeholders are just the same, only busier, and harder to get hold of. But that&#8217;s why they call it business.</p>
<h3>BDD isn&#8217;t the only way to do testing.</h3>
<p>In fact, BDD isn&#8217;t even really about testing. It&#8217;s just a way of capturing those conversations which happens to provide some tests, and lifts some of the burden on the testers. If you want to run additional performance tests, exploratory tests, or even record some tests, it doesn&#8217;t have to come under the BDD banner. It&#8217;s perfectly OK to do BDD <em>and</em> test things as well.</p>
<h3>BDD isn&#8217;t about the tools.</h3>
<p>You don&#8217;t need BDD tools to do BDD. A few of the projects I&#8217;ve been on now have run up a small DSL which they found perfectly easy to maintain. The only reason to use English-language BDD tools is because it helps to engage people who can&#8217;t read code (and I&#8217;ve seen senior business stakeholders perfectly happy with code-based DSLs before).</p>
<p>Natural-language BDD tools introduce another level of abstraction. They make scenarios harder to maintain. They can introduce ambiguity. If they don&#8217;t have auto-completion, it&#8217;s hard to see what steps are already in play. It&#8217;s even harder to see what steps can be deleted, and don&#8217;t need to be maintained. Don&#8217;t use natural-language BDD tools unless they give you significant other benefits. You can capture scenarios from conversations just as easily on an index card.</p>
<h3>Write fewer scenarios.</h3>
<p>Most of your code will be covered by just a few scenarios along the lines of, &#8220;Normally everything works like this, and then in this context it behaves unexpectedly, like <em>this</em>.&#8221; Use those tricky scenarios to cover the normal behaviour wherever possible, and focus on making sure that the code is well-designed.</p>
<p>Another way to make scenarios maintainable is to make sure that the steps are phrased at a very high level.</p>
<p>Higher than that.</p>
<p>If your scenario starts with &#8220;When the user enters &#8216;Smurf&#8217; into &#8216;Search&#8217; text box&#8230;&#8221; then that&#8217;s far too low-level. However, even &#8220;When the user adds &#8216;Smurf&#8217; to his basket, then goes to the checkout, then pays for the goods&#8221; is also too low-level.</p>
<p>Think about the capabilities of your business. What does it allow your users to do? What value do the stakeholders get from it? How does it actually make money?</p>
<p>You&#8217;re looking for something like, &#8220;When the user buys a Smurf.&#8221; Now you&#8217;ve got the money, what differentiates your business from everyone else&#8217;s? Do you advertise other Smurf-related products? Find everyone who&#8217;s bought a Smurf and show what else they bought? Offer discounts for Smurf holidays?</p>
<p>By thinking about the capabilities of the system and the goals of the business stakeholders, you&#8217;ll find ways to phrase scenarios which keep them maintainable, no matter how the GUI changes. The conversations you have will help you to identify those capabilities and goals.</p>
<p>The rest of scenario maintainability is mostly about removing duplication. Separate steps into particular concerns, like &#8220;admin&#8221;, &#8220;browsing&#8221; or &#8220;purchasing&#8221;. Put screens or pages into their own objects (thank you Simon Stewart and <a href="http://google-opensource.blogspot.com/2009/05/introducing-webdriver.html">WebDriver</a>). If you find your scenarios are getting unmaintainable, pay them the same kind of love you&#8217;d pay your code. They&#8217;ll probably be around longer.</p>
<h3>Assume you got it wrong.</h3>
<p>Part of the Deliberate Discovery ethos is that there is always something we don&#8217;t know we don&#8217;t know &#8211; second order ignorance. No matter how many scenarios we have, our understanding can <em>still</em> be wrong. The only way to discover this is to get feedback. Showcase what you&#8217;ve produced. Ask people to use the system and see how it feels. The earlier you can do this, the quicker you&#8217;ll discover that there&#8217;s no silver bullet. You will never get everything right &#8211; even if you analyse everything up-front, Waterfall style &#8211; and BDD is no exception.</p>
<p>Have enough conversations to know how to get started. Find out where the riskiest bits are, and where the system behaves unusually. Chat. Discuss. Discover. Work out how, and when, you&#8217;re going to get feedback on the work you&#8217;re about to do.</p>
<p>Then, and only then, reach for the tools.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2011/03/04/step-away-from-the-tools/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Giving effective feedback: How to change your Code&#8217;s behaviour</title>
		<link>http://lizkeogh.com/2010/12/02/giving-effective-feedback-how-to-change-your-codes-behaviour/</link>
		<comments>http://lizkeogh.com/2010/12/02/giving-effective-feedback-how-to-change-your-codes-behaviour/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 16:52:19 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[bdd]]></category>
		<category><![CDATA[humour]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=617</guid>
		<description><![CDATA[Have you ever wanted to change the behaviour of some code that you work with?
I&#8217;d like to share a few techniques with you which have helped me to change the behaviour of code I&#8217;ve worked with, with little conflict, great success and positivity all round.
Imagine a legacy system who&#8217;s been in the job for five [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to change the behaviour of some code that you work with?</p>
<p>I&#8217;d like to share a few techniques with you which have helped me to change the behaviour of code I&#8217;ve worked with, with little conflict, great success and positivity all round.</p>
<p>Imagine a legacy system who&#8217;s been in the job for five years and can&#8217;t see the problem with the way he&#8217;s behaving.</p>
<p>Imagine a class, who feels like he needs to be in control of everything, and can&#8217;t delegate or trust other classes effectively.</p>
<p>Imagine a service who&#8217;s overloaded, doing the job of three systems that no longer perform, but who just heroically accepts all the work and never gives any signal that he&#8217;s about to collapse, again.</p>
<p>We&#8217;ve successfully used these techniques to help change our codebases, our systems, our services and our applications, as well as our people. I&#8217;d like to share these simple guidelines with you, based on the sandwich model of feedback. They are:</p>
<ul>
<li> Start with the right mindset </li>
<li> Anchor the things you value </li>
<li> Avoid labelling </li>
<li> Use examples </li>
<li> Work towards a bright future </li>
</ul>
<h3>Start with the right mindset</h3>
<p>There are lots of reasons we might want to change our code. I&#8217;ve seen people work on code</p>
<ul>
<li>because it doesn&#8217;t work the way they expect</li>
<li>because it&#8217;s annoying</li>
<li>because it refuses to do something which isn&#8217;t really its responsibility anyway</li>
<li>because it&#8217;s fun and powerful to change code for the sake of it.</li>
</ul>
<p>I believe there are only two good reasons to change code:</p>
<ul>
<li>to reinforce valuable behaviour</li>
<li>to increase effectiveness.</li>
</ul>
<p>If you&#8217;re not approaching the code with one of these mindsets, stop. How much do you actually respect the code you&#8217;re about to change? All code wants to do a job effectively. No code is perfect. Remember that time when you first wrote code? You were learning, too. If you can approach the code with an appreciation for the things it does right, and build on those, you&#8217;re more likely to meet with success.</p>
<p>As an example, I had one piece of code which controlled the registration of pets. I really wanted this controller to broadcast a pet&#8217;s registration, but instead of communicating asynchronously, the controller was insisting that anyone who requested the registration of a pet hung around, waiting.</p>
<p>Unfortunately, one of the people who requested pets was the GUI &#8211; an extremely important class with a lot of other jobs to do too!</p>
<p>The code was frustrating me so much that I almost got rid of him and replaced him with someone else&#8230; but then I thought about it, and remembered that apart from the fractious relationship with the GUI, the controller had been doing his job very well. This respect allowed me to change the code&#8217;s behaviour instead of replacing him.</p>
<h3>Anchor the things you value</h3>
<p>Once you have an appreciation of the value of the code, make sure that the code knows. Reinforce this. You can call out specific examples of times when the code has done something well.</p>
<p>I told my controller, &#8220;I appreciate the way in which you register pets, and the effective way you delegate to the repository. Here&#8217;s an example. I registered a new rabbit, Snowy. I gave you his date of birth, his breeder and the price I wanted to sell him for, and when I verified it with the repository later, I found that you&#8217;d passed the information on very well. This is important to me.&#8221;</p>
<p>I tend to use a unit testing framework and perhaps a mocking framework &#8211; Moq or mockito &#8211; to translate these conversations into the language of the code.</p>
<p>If it&#8217;s a whole team whose behaviour needs to change &#8211; perhaps an entire application &#8211; then I&#8217;ll get everyone together and talk about the things that the entire team does well. For this, I use scenarios, either with a DSL or perhaps a BDD tool like Cucumber or JBehave. Automation tools like Selenium or WiPFlash let me translate my feedback into something they understand.</p>
<p>By anchoring the things that I value about the code, I can change his behaviour without fear that he&#8217;ll change in ways I <em>didn&#8217;t</em> want.</p>
<h3>Avoid labelling</h3>
<p>There are two types of labelling that I avoid: negative labelling, and pattern labelling.</p>
<p>Once I was judging a competition in which a coder announced, &#8220;This code is shite!&#8221; I marked him down. &#8220;If any other coder hears you say that,&#8221; I said, &#8220;they&#8217;ll either be wary of trying things out or they&#8217;ll think it&#8217;s OK to start devaluing other people&#8217;s code.&#8221; Labelling code negatively this way can be damaging for everyone involved in the project, <em>even if you wrote the code</em>.</p>
<p>Labelling code by calling out the patterns of behaviour can also be unhelpful. I remember one piece of code that got labelled as a &#8220;Visitor&#8221;. From then on, everyone expected it to behave like a Visitor. No matter what its responsibilities were, coders expected it to behave like a Visitor and encouraged the other classes in the system to do the same. Eventually the code broke down so badly that we had to replace it altogether, just because we had labelled it badly.</p>
<h3>Use examples</h3>
<p>We already looked at how to use examples to anchor positive behaviour instead. We can also use examples to show the difference between the behaviour we want, and the behaviour we&#8217;ve actually got.</p>
<p>&#8220;Instead of watching the repository,&#8221; I told the controller, &#8220;I&#8217;d like you to listen to him instead, and trust him more. Sometimes the repository might give you a message. I&#8217;d like you to respond to that message.&#8221;</p>
<p>&#8220;How long do you want me to wait after saving to get the message?&#8221; the controller asked.</p>
<p>&#8220;Don&#8217;t wait,&#8221; I told him. &#8220;Instead of telling me it&#8217;s done, I&#8217;d like you to tell me that it&#8217;s in progress instead. Let&#8217;s say that the repository takes five seconds. You should be responding in less than one.&#8221; We used some threading to illustrate how the repository might go off and do its job, and talked through the example in the controller&#8217;s language until I knew he understood.</p>
<h3>Work towards a bright future</h3>
<p>By focusing on the positive goals we want to achieve, we don&#8217;t really have to spend much time on the negative aspects of the code&#8217;s behaviour. After the examples were written, the controller was able to verify that his behaviour had changed appropriately, with as little fuss as possible. What&#8217;s more, he had those tests available to him going forward, so his behaviour <em>stayed</em> fixed. Eventually he became one of the most important classes in the system, responsible for the interactions of ten other imports &#8211; but he never got overwhelmed by the job.</p>
<p>We can do the same thing with scenarios and applications, or performance tests and whole systems. The ability to define the behaviour we want is one of the most important aspects of changing the behaviour which exists.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2010/12/02/giving-effective-feedback-how-to-change-your-codes-behaviour/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What not to test</title>
		<link>http://lizkeogh.com/2010/07/23/what-not-to-test/</link>
		<comments>http://lizkeogh.com/2010/07/23/what-not-to-test/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 21:27:03 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[bdd]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=590</guid>
		<description><![CDATA[A couple of people have recently written asking for advice on how to start writing scenarios. In both instances, they have started by logging in, because &#8220;that&#8217;s what the users do first&#8221;.
If you&#8217;re doing BDD, may I suggest starting not with the scenario that describes the entire user journey, but instead, the scenario that describes [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of people have recently written asking for advice on how to start writing scenarios. In both instances, they have started by logging in, because &#8220;that&#8217;s what the users do first&#8221;.</p>
<p>If you&#8217;re doing BDD, may I suggest starting not with the scenario that describes the entire user journey, but instead, the scenario that describes the <em>riskiest</em> bits of the journey?</p>
<p>Assume that whichever user has access to the system is already logged in. Logging in isn&#8217;t exactly risky. It&#8217;s been done 15,000 times before.</p>
<p>Hard-code the data to start with. Getting data out of a database isn&#8217;t very risky either. You can code this later without affecting the scenarios, if you can get some realistic examples of data.</p>
<p>Work out which bits of the system you know least about. Create the scenarios and have conversations around those bits of the system. You don&#8217;t have to grow the system from the beginning &#8211; you can pick any point you like! Which bits of the system make you most uncomfortable? Which bits make your stakeholders most uncomfortable?</p>
<p>Those are probably the bits which will cause your project to succeed or fail. Logging in can come later, and by the time you come to code it, you&#8217;ll have some real value that people want to log in <em>for</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2010/07/23/what-not-to-test/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

