<?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>Elegant Code &#187; BDD</title>
	<atom:link href="http://elegantcode.com/tag/bdd/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com</link>
	<description></description>
	<lastBuildDate>Sun, 12 Feb 2012 04:40:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>BDD Test Naming Experiment</title>
		<link>http://elegantcode.com/2008/09/08/bdd-test-naming-experiment/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=bdd-test-naming-experiment</link>
		<comments>http://elegantcode.com/2008/09/08/bdd-test-naming-experiment/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 06:25:16 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/09/08/bdd-test-naming-experiment/</guid>
		<description><![CDATA[Of course, I am not the first person to do this, but gosh, isn’t it cool? This is the test suite from a project I am working on and I decided to move the BDD naming convention into the syntax: (class name) + (method name) = behavioral sentence This library has 100% code coverage and [...]]]></description>
			<content:encoded><![CDATA[<p>Of course, I am not the first person to do this, but gosh, isn’t it cool? </p>
<p>This is the test suite from a project I am working on and I decided to move the BDD naming convention into the syntax:   <br />(class name) + (method name) = behavioral sentence </p>
<p>This library has 100% code coverage and tests the sad path pretty well, in my opinion.</p>
<p>Click the image to get a bigger view.</p>
<p><a href="http://elegantcode.com/wp-content/uploads/2008/09/image2.png"><img title="Click the image to get a bigger view." style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="313" alt="Click the image to get a bigger view." src="http://elegantcode.com/wp-content/uploads/2008/09/image-thumb2.png" width="400" border="0" /></a></p>
<p>What’s your opinion? Is this easy to read to understand intent? Does this document my code for the next developer? Or is it just too much?</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/09/08/bdd-test-naming-experiment/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Indi Young on Mental Models</title>
		<link>http://elegantcode.com/2008/06/17/indi-young-on-mental-models/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=indi-young-on-mental-models</link>
		<comments>http://elegantcode.com/2008/06/17/indi-young-on-mental-models/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 01:19:10 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[DDD]]></category>
		<category><![CDATA[Modeling]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/17/indi-young-on-mental-models/</guid>
		<description><![CDATA[I was fortunate to sit in a lecture today by Indi Young, co-founder of Adaptive Path and author of the recently published Mental Models, Aligning Design Strategy with Human Behavior. Ms. Young described her framework for constructing Mental Models, which are models representing a user’s thought process as they interact with a system. A Mental [...]]]></description>
			<content:encoded><![CDATA[<p>I was fortunate to sit in a lecture today by <a href="http://www.adaptivepath.com/aboutus/indi.php" target="_blank">Indi Young</a>, co-founder of <a href="http://www.adaptivepath.com/" target="_blank">Adaptive Path</a> and author of the recently published <em><a href="http://www.rosenfeldmedia.com/books/mental-models/" target="_blank">Mental Models, Aligning Design Strategy with Human Behavior</a></em>. Ms. Young described her framework for constructing Mental Models, which are models representing a user’s thought process as they interact with a system. A Mental Model endeavors to give designers and application developers a usable way to see the system under development through the eyes of a user.</p>
<p>It is an interesting idea and an obvious compliment <a href="http://en.wikipedia.org/wiki/Domain_driven_design" target="_blank">Domain Driven Design</a> and <a href="http://en.wikipedia.org/wiki/Behavior_driven_development" target="_blank">Behavior Driven Design</a>. The intent of the Mental Model is to allow designers to envision a user’s thought process and although it isn’t out-of-the-box simple, it is inherently useful.</p>
<p>She had some great feedback for our teams on creating more effective <a href="http://en.wikipedia.org/wiki/Personas" target="_blank">personas</a> and <a href="http://en.wikipedia.org/wiki/Behavior_driven_development#Scenarios.2C_or_Application_Examples" target="_blank">user scenarios</a>. Specifically, keep the personas behavior focused. For instance, I don’t need to know that Harold is a 38 year old fat guy, but I do need to know that he struggles to find content he is after on the web. Make sense?</p>
<p>At any rate, I have every good intention of reading her book and look forward to augmenting my toolbox with Mental Modeling.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/17/indi-young-on-mental-models/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Thanks to BDD</title>
		<link>http://elegantcode.com/2008/05/01/thanks-to-bdd/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=thanks-to-bdd</link>
		<comments>http://elegantcode.com/2008/05/01/thanks-to-bdd/#comments</comments>
		<pubDate>Thu, 01 May 2008 18:49:48 +0000</pubDate>
		<dc:creator>Alex Mueller</dc:creator>
				<category><![CDATA[Architecture and Design]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[Testing/QA]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/05/01/thanks-to-bdd/</guid>
		<description><![CDATA[I have been doing code reviews frequently this past week and have been remarking on the naming conventions of test methods. In a effort to try and find the rules of BDD naming conventions, I came across Dan North&#8217;s introduction to BDD, which is a great starting point, and a blog post by David Laribee [...]]]></description>
			<content:encoded><![CDATA[<p>I have been doing code reviews frequently this past week and have been remarking on the naming conventions of test methods. In a effort to try and find the rules of BDD naming conventions, I came across <a title="Dan North&#39;s introduction to BDD" href="http://dannorth.net/introducing-bdd" target="_blank">Dan North&#8217;s introduction to BDD</a>, which is a great starting point, and a blog post by <a title="David Laribee" href="http://codebetter.com/blogs/david_laribee/archive/2007/12/17/approaching-bdd.aspx" target="_blank">David Laribee</a> that has made a good impression on me. You can read up on BDD to learn more, this post will not go into detail about it. </p>
<p>From what I gathered from David Laribee&#8217;s <a title="article" href="http://codebetter.com/blogs/david_laribee/archive/2007/12/17/approaching-bdd.aspx" target="_blank">article</a>, I like this. I REALLY like this. </p>
<p><img src="http://codebetter.com/blogs/david_laribee/WindowsLiveWriter/ApproachingBDD_AED1/resharper-specs_3.jpg" /> </p>
<p>By changing namespace, class, and method names, the behavior of each spec (test) is clearly revealed. In a larger suite of tests, if there are failures, I can more easily see what is failing and what trends, if any, are resulting in my failures. Before, I would name my test method names to describe a behavior, &quot;Some concept should do this when given that.&quot; Getting the namespace and class name involved provides a more legible test result. </p>
<p>While reviewing a test case for a peer, I took this approach and arrived at the following scenario. I am changing the names of the methods to hide details. The original test method was &quot;FilterToEndPointTestReport.&quot; Making this more readable, using my previous approach, we arrived at &quot;FilterShouldUpdateStatusOnReportWhenDefaultFilterValueIsChanged.&quot; Great, that is better, but&#8230;</p>
<p>Applying the approach described in David&#8217;s post, I now have this.</p>
<div style="border-right: gray 1px solid; padding-right: 4px; padding-left: 4px; font-size: 8pt; border-top: gray 1px solid; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">namespace</span> Specs_for_Filters</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>   <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> When_default_filter_value_is_changed : FilterTestFixture</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>   {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>     [Test]</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> Endpoint_should_be_updated_on_report {}</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>     </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>     [Test]</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> Endpoint_should_be_updated_on_grid {}</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>     </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span>     [Test]</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  12:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> Endpoint_should_be_updated_on_chart {}</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  13:</span>   }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  14:</span>   </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  15:</span>   <span style="color: #0000ff">public</span> <span style="color: #0000ff">abstract</span> <span style="color: #0000ff">class</span> FilterTestFixture</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  16:</span>   {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  17:</span>     <span style="color: #008000">// provide common functionality that will be used </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  18:</span>     <span style="color: #008000">// among behavior-driven filter test classes.</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  19:</span>   }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  20:</span> }</pre>
</p></div>
</div>
<p>When my tests run, their resulting output is more legible. This approach helps me to think about my tests in terms of behavior rather than implementation. In my opinion, my test cases are now more abstract and more succinct. </p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/05/01/thanks-to-bdd/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

