<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: BDD style unit test names</title>
	<atom:link href="http://www.markhneedham.com/blog/2008/09/04/bdd-style-unit-test-names/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markhneedham.com/blog/2008/09/04/bdd-style-unit-test-names/</link>
	<description>Thoughts on Software Development</description>
	<lastBuildDate>Sat, 11 Feb 2012 23:17:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Book Club: The Readability of Tests - Growing Object Oriented Software (Steve Freeman/Nat Pryce) at Mark Needham</title>
		<link>http://www.markhneedham.com/blog/2008/09/04/bdd-style-unit-test-names/comment-page-1/#comment-18908</link>
		<dc:creator>Book Club: The Readability of Tests - Growing Object Oriented Software (Steve Freeman/Nat Pryce) at Mark Needham</dc:creator>
		<pubDate>Sat, 20 Jun 2009 01:28:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=304#comment-18908</guid>
		<description>[...] found it interesting that there wasn&#039;t any mention of the BDD style of test naming whereby the name of the test begins with &#039;should&#8230;&#039;. I&#039;ve been using these style of naming for [...]</description>
		<content:encoded><![CDATA[<p>[...] found it interesting that there wasn&#8217;t any mention of the BDD style of test naming whereby the name of the test begins with &#8216;should&#8230;&#8217;. I&#8217;ve been using these style of naming for [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Productive Programmer: Book Review at Mark Needham</title>
		<link>http://www.markhneedham.com/blog/2008/09/04/bdd-style-unit-test-names/comment-page-1/#comment-201</link>
		<dc:creator>The Productive Programmer: Book Review at Mark Needham</dc:creator>
		<pubDate>Thu, 04 Sep 2008 23:16:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=304#comment-201</guid>
		<description>[...] Neal reminds you of things that you probably know but need reiterating. The &#039;angry monkeys&#039; story is a particular stand out with regards to this. This covers the idea of always challenging why things are being done a certain way and not accepting &#039;because this is how it&#039;s always done&#039; as an acceptable answer. There is an interesting example used with regards to using underscores in test names as suggested here. [...]</description>
		<content:encoded><![CDATA[<p>[...] Neal reminds you of things that you probably know but need reiterating. The &#8216;angry monkeys&#8217; story is a particular stand out with regards to this. This covers the idea of always challenging why things are being done a certain way and not accepting &#8216;because this is how it&#8217;s always done&#8217; as an acceptable answer. There is an interesting example used with regards to using underscores in test names as suggested here. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Torbjörn Gyllebring</title>
		<link>http://www.markhneedham.com/blog/2008/09/04/bdd-style-unit-test-names/comment-page-1/#comment-191</link>
		<dc:creator>Torbjörn Gyllebring</dc:creator>
		<pubDate>Thu, 04 Sep 2008 09:34:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=304#comment-191</guid>
		<description>Another thing with using_underscores is that it makes it a tad easier for me, in situations like.

ToStringShouldReturnSomething -&gt; ToString_should_return_something

basicly it let me writes tests that can contain methods, properties and classes in their description without having to re-parse CamelCaseing to know what&#039;s the description and what is an actual type like:

ShouldCallIDoStuffDoStuff -&gt; should_call_IDoStuff_DoStuff

Just a personal oppionion, on the &quot;name after test&quot; thing I have a bit of the same pattern for designing my tests, in my case it goes something like:

1: Try to formulate test name.
2: Write assert.
3: Write the code to get to (2)

If I get stuck on any one of theese and lacking a pair (Yes I know that it&#039;s hard to belive but some of us have to live under circumstances like that) to help me out I skip to the next step and hope that I can get some clarity by doing that. Then when I (3) and (2) most of the time a good name will materialize, if not, I go take a coffee and restart the process.</description>
		<content:encoded><![CDATA[<p>Another thing with using_underscores is that it makes it a tad easier for me, in situations like.</p>
<p>ToStringShouldReturnSomething -&gt; ToString_should_return_something</p>
<p>basicly it let me writes tests that can contain methods, properties and classes in their description without having to re-parse CamelCaseing to know what&#8217;s the description and what is an actual type like:</p>
<p>ShouldCallIDoStuffDoStuff -&gt; should_call_IDoStuff_DoStuff</p>
<p>Just a personal oppionion, on the &#8220;name after test&#8221; thing I have a bit of the same pattern for designing my tests, in my case it goes something like:</p>
<p>1: Try to formulate test name.<br />
2: Write assert.<br />
3: Write the code to get to (2)</p>
<p>If I get stuck on any one of theese and lacking a pair (Yes I know that it&#8217;s hard to belive but some of us have to live under circumstances like that) to help me out I skip to the next step and hope that I can get some clarity by doing that. Then when I (3) and (2) most of the time a good name will materialize, if not, I go take a coffee and restart the process.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Needham</title>
		<link>http://www.markhneedham.com/blog/2008/09/04/bdd-style-unit-test-names/comment-page-1/#comment-190</link>
		<dc:creator>Mark Needham</dc:creator>
		<pubDate>Thu, 04 Sep 2008 08:11:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=304#comment-190</guid>
		<description>@Sarah I was actually thinking that I was writing that line actually! I&#039;m absolutely with you in terms of testing the behaviour of something rather than what it is meant to do.

There have been times when myself and a pair have been almost sure what we want to test but we&#039;re not quite sure how to phrase it - I guess those are the times when I write the test name at the end. Maybe we should have spent more time thinking of exactly what we want to test first although I don&#039;t think it hurt us too much writing the test name last in those cases.

Thanks for the link to Pat&#039;s post.

@Torbjörn I was reading about that naming convention in Neal Ford&#039;s The Productive Programmer. I never really had a problem reading camel case stuff myself, nice idea though.</description>
		<content:encoded><![CDATA[<p>@Sarah I was actually thinking that I was writing that line actually! I&#8217;m absolutely with you in terms of testing the behaviour of something rather than what it is meant to do.</p>
<p>There have been times when myself and a pair have been almost sure what we want to test but we&#8217;re not quite sure how to phrase it &#8211; I guess those are the times when I write the test name at the end. Maybe we should have spent more time thinking of exactly what we want to test first although I don&#8217;t think it hurt us too much writing the test name last in those cases.</p>
<p>Thanks for the link to Pat&#8217;s post.</p>
<p>@Torbjörn I was reading about that naming convention in Neal Ford&#8217;s The Productive Programmer. I never really had a problem reading camel case stuff myself, nice idea though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reflective Perspective - Chris Alcock &#187; The Morning Brew #172</title>
		<link>http://www.markhneedham.com/blog/2008/09/04/bdd-style-unit-test-names/comment-page-1/#comment-189</link>
		<dc:creator>Reflective Perspective - Chris Alcock &#187; The Morning Brew #172</dc:creator>
		<pubDate>Thu, 04 Sep 2008 07:20:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=304#comment-189</guid>
		<description>[...] BDD style unit test names - Mark Needham talks about his naming convention for tests. [...]</description>
		<content:encoded><![CDATA[<p>[...] BDD style unit test names &#8211; Mark Needham talks about his naming convention for tests. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarah Taraporewalla</title>
		<link>http://www.markhneedham.com/blog/2008/09/04/bdd-style-unit-test-names/comment-page-1/#comment-187</link>
		<dc:creator>Sarah Taraporewalla</dc:creator>
		<pubDate>Thu, 04 Sep 2008 06:17:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=304#comment-187</guid>
		<description>Hey Mark,
As I commented on Chris&#039;s post:

Perhaps if you don’t know how you want the code to behave, then you haven’t thought through the design of your story enough. I find if you test the behaviour, rather than what it is meant to do, then you usually know what you want to happen. Sometimes, I decide to push implementation down to other services, helpers, or lower down the stack, but I keep the original test inplace, and also have the test at the required unit level.

Of course, there are always going to be those times when you really don’t know how the code will hang together. Pat Kua call these times experimentation http://www.thekua.com/atwork/2008/02/05/if-you-do-test-driven-development-all-the-time-youre-doing-something-wrong/. Take his advice - use TDD when you are focused on the problem, and know how to solve it; use experimentation to find out how to solve it (and then quite possibly, revert all your changes and begin TDD)</description>
		<content:encoded><![CDATA[<p>Hey Mark,<br />
As I commented on Chris&#8217;s post:</p>
<p>Perhaps if you don’t know how you want the code to behave, then you haven’t thought through the design of your story enough. I find if you test the behaviour, rather than what it is meant to do, then you usually know what you want to happen. Sometimes, I decide to push implementation down to other services, helpers, or lower down the stack, but I keep the original test inplace, and also have the test at the required unit level.</p>
<p>Of course, there are always going to be those times when you really don’t know how the code will hang together. Pat Kua call these times experimentation <a href="http://www.thekua.com/atwork/2008/02/05/if-you-do-test-driven-development-all-the-time-youre-doing-something-wrong/" rel="nofollow">http://www.thekua.com/atwork/2008/02/05/if-you-do-test-driven-development-all-the-time-youre-doing-something-wrong/</a>. Take his advice &#8211; use TDD when you are focused on the problem, and know how to solve it; use experimentation to find out how to solve it (and then quite possibly, revert all your changes and begin TDD)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Torbjörn Gyllebring</title>
		<link>http://www.markhneedham.com/blog/2008/09/04/bdd-style-unit-test-names/comment-page-1/#comment-186</link>
		<dc:creator>Torbjörn Gyllebring</dc:creator>
		<pubDate>Thu, 04 Sep 2008 06:16:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=304#comment-186</guid>
		<description>Being a &quot;Should&quot; infected C# developer myself I just recently started casing tests like &quot;should_do_something&quot; instead of proper camelcasing them, this has the benefit of looking prettier in test runners it also help highlight any helper functions in test classes, overall I belive it&#039;s an improvement, it helps me focus on &quot;this is a test it follows a slightly diffrent set of rules&quot; (i.e. can be a bit &quot;moist&quot; etc). 

Also if you like TestDox maybe http://code.google.com/p/troy/ can be of intrest.</description>
		<content:encoded><![CDATA[<p>Being a &#8220;Should&#8221; infected C# developer myself I just recently started casing tests like &#8220;should_do_something&#8221; instead of proper camelcasing them, this has the benefit of looking prettier in test runners it also help highlight any helper functions in test classes, overall I belive it&#8217;s an improvement, it helps me focus on &#8220;this is a test it follows a slightly diffrent set of rules&#8221; (i.e. can be a bit &#8220;moist&#8221; etc). </p>
<p>Also if you like TestDox maybe <a href="http://code.google.com/p/troy/" rel="nofollow">http://code.google.com/p/troy/</a> can be of intrest.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

