<?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"
	>
<channel>
	<title>Comments for Fabio Pereira</title>
	<atom:link href="http://fabiopereira.me/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://fabiopereira.me/blog</link>
	<description>My thoughts and ideas on Software Development  - Agile, XP, Scrum, Lean, Java, Ruby on Rails</description>
	<pubDate>Sat, 31 Jul 2010 13:01:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>Comment on The Fable of the Roasted Pigs and the Certified Anemotechnicians by RM</title>
		<link>http://fabiopereira.me/blog/2010/06/23/the-fable-of-the-roasted-pigs-and-the-certified-anemotechnicians/#comment-7149</link>
		<dc:creator>RM</dc:creator>
		<pubDate>Thu, 01 Jul 2010 22:32:46 +0000</pubDate>
		<guid isPermaLink="false">http://fabiopereira.me/blog/2010/06/23/the-fable-of-the-roasted-pigs-and-the-certified-anemotechnicians/#comment-7149</guid>
		<description>Sadly so true... Although, economically speaking, if everyone had listened to John it would probably spark a major recession through high unemployment. This would see a period of plenty of roast pig but no-one with enough money to buy any :P</description>
		<content:encoded><![CDATA[<p>Sadly so true&#8230; Although, economically speaking, if everyone had listened to John it would probably spark a major recession through high unemployment. This would see a period of plenty of roast pig but no-one with enough money to buy any <img src='http://fabiopereira.me/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Fable of the Roasted Pigs and the Certified Anemotechnicians by DCam</title>
		<link>http://fabiopereira.me/blog/2010/06/23/the-fable-of-the-roasted-pigs-and-the-certified-anemotechnicians/#comment-7128</link>
		<dc:creator>DCam</dc:creator>
		<pubDate>Wed, 30 Jun 2010 10:00:09 +0000</pubDate>
		<guid isPermaLink="false">http://fabiopereira.me/blog/2010/06/23/the-fable-of-the-roasted-pigs-and-the-certified-anemotechnicians/#comment-7128</guid>
		<description>So funny. And all too true in so many ways. Companies and politics.</description>
		<content:encoded><![CDATA[<p>So funny. And all too true in so many ways. Companies and politics.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on TTDD &#8211; Tautological Test Driven Development (Anti Pattern) by James Carr</title>
		<link>http://fabiopereira.me/blog/2010/05/27/ttdd-tautological-test-driven-development-anti-pattern/#comment-7014</link>
		<dc:creator>James Carr</dc:creator>
		<pubDate>Fri, 11 Jun 2010 20:12:24 +0000</pubDate>
		<guid isPermaLink="false">http://fabiopereira.me/blog/2010/05/25/ttdd-tautological-test-driven-development-anti-pattern/#comment-7014</guid>
		<description>Good post. This is a concept I often teach people as well and as a rule of thumb I tell them they should never do a verify against a stub. In your example, both collaborators are providing indirect inputs to the system and in your corrected test case you do the right thing, providing those indirect inputs and verifying the actual behavior of the system under test. 

Verifying a call to a collaborator that provides another indirect input to the system is BAD. I could easily take your first test and in the implementation still call the carService and return null. The code is broken in a horrible way but the test will always pass. Doh! :)</description>
		<content:encoded><![CDATA[<p>Good post. This is a concept I often teach people as well and as a rule of thumb I tell them they should never do a verify against a stub. In your example, both collaborators are providing indirect inputs to the system and in your corrected test case you do the right thing, providing those indirect inputs and verifying the actual behavior of the system under test. </p>
<p>Verifying a call to a collaborator that provides another indirect input to the system is BAD. I could easily take your first test and in the implementation still call the carService and return null. The code is broken in a horrible way but the test will always pass. Doh! <img src='http://fabiopereira.me/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Build Dashboard Radiator - (Old post, click below for new) by Powell</title>
		<link>http://fabiopereira.me/blog/2009/12/06/build-dashboard-radiator-your-build-light/#comment-7011</link>
		<dc:creator>Powell</dc:creator>
		<pubDate>Fri, 11 Jun 2010 16:27:30 +0000</pubDate>
		<guid isPermaLink="false">http://fabiopereira.me/blog/2009/12/06/build-dashboard-radiator-your-build-light/#comment-7011</guid>
		<description>We are more important than the Catholic religion.</description>
		<content:encoded><![CDATA[<p>We are more important than the Catholic religion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Future Retro Box by Retrospectives: Some thoughts at Mark Needham</title>
		<link>http://fabiopereira.me/blog/2009/11/15/future-retro-box/#comment-6997</link>
		<dc:creator>Retrospectives: Some thoughts at Mark Needham</dc:creator>
		<pubDate>Thu, 10 Jun 2010 07:23:37 +0000</pubDate>
		<guid isPermaLink="false">http://fabiopereira.me/blog/2009/11/15/future-retro-box/#comment-6997</guid>
		<description>[...] previously wrote about the idea of the future retrospective box to ensure that we don't forget anything that happened early on in an iteration when we come to a [...]</description>
		<content:encoded><![CDATA[<p>[...] previously wrote about the idea of the future retrospective box to ensure that we don&#8217;t forget anything that happened early on in an iteration when we come to a [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Consultancy is like riding a running horse by Roger Almeida</title>
		<link>http://fabiopereira.me/blog/2010/05/30/consultancy-is-like-riding-a-running-horse/#comment-6925</link>
		<dc:creator>Roger Almeida</dc:creator>
		<pubDate>Tue, 01 Jun 2010 14:36:21 +0000</pubDate>
		<guid isPermaLink="false">http://fabiopereira.me/blog/2010/05/30/consultancy-is-like-riding-a-running-horse/#comment-6925</guid>
		<description>Hey uncle.
Great post, have you read it http://www.amazon.com/How-Win-Friends-Influence-People/dp/1439167346/ref=sr_1_1?ie=UTF8&#38;s=books&#38;qid=1275402864&#38;sr=8-1 ?</description>
		<content:encoded><![CDATA[<p>Hey uncle.<br />
Great post, have you read it <a href="http://www.amazon.com/How-Win-Friends-Influence-People/dp/1439167346/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1275402864&amp;sr=8-1" rel="nofollow">http://www.amazon.com/How-Win-Friends-Influence-People/dp/1439167346/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1275402864&amp;sr=8-1</a> ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on TTDD &#8211; Tautological Test Driven Development (Anti Pattern) by Rafael Peixoto de Azevedo</title>
		<link>http://fabiopereira.me/blog/2010/05/27/ttdd-tautological-test-driven-development-anti-pattern/#comment-6917</link>
		<dc:creator>Rafael Peixoto de Azevedo</dc:creator>
		<pubDate>Mon, 31 May 2010 15:55:14 +0000</pubDate>
		<guid isPermaLink="false">http://fabiopereira.me/blog/2010/05/25/ttdd-tautological-test-driven-development-anti-pattern/#comment-6917</guid>
		<description>Great post about a fundamental testing issue, Fabio!

When the behaviour of an object under test depends on its context, the tests must provide controlled instances of the necessary contextual objects. I usually prefer to represent them using the simplest forms of double objects.

So, I use a mock object to represent a contextual object only when the precise way how the interactions proceed with the object under test is essential to its expected behaviour.

Otherwise the excessive accidental complexity can easily delude us into writing ineffective tests that are either devoid of relevant assertions or based on tautological thinking.

I think you have just nailed down the TTDD anti-pattern with a clear example and the perfect name.

Cheers, Rafael</description>
		<content:encoded><![CDATA[<p>Great post about a fundamental testing issue, Fabio!</p>
<p>When the behaviour of an object under test depends on its context, the tests must provide controlled instances of the necessary contextual objects. I usually prefer to represent them using the simplest forms of double objects.</p>
<p>So, I use a mock object to represent a contextual object only when the precise way how the interactions proceed with the object under test is essential to its expected behaviour.</p>
<p>Otherwise the excessive accidental complexity can easily delude us into writing ineffective tests that are either devoid of relevant assertions or based on tautological thinking.</p>
<p>I think you have just nailed down the TTDD anti-pattern with a clear example and the perfect name.</p>
<p>Cheers, Rafael</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on TTDD &#8211; Tautological Test Driven Development (Anti Pattern) by The Morning Brew - Chris Alcock &#187; The Morning Brew #610</title>
		<link>http://fabiopereira.me/blog/2010/05/27/ttdd-tautological-test-driven-development-anti-pattern/#comment-6877</link>
		<dc:creator>The Morning Brew - Chris Alcock &#187; The Morning Brew #610</dc:creator>
		<pubDate>Fri, 28 May 2010 07:38:24 +0000</pubDate>
		<guid isPermaLink="false">http://fabiopereira.me/blog/2010/05/25/ttdd-tautological-test-driven-development-anti-pattern/#comment-6877</guid>
		<description>[...] TTDD - Tautological Test Driven Development (Anti Pattern) - Fabio Pereira discusses an anti-pattern in testing where a test&#8217;s set up is very similar to a test&#8217;s asserts meaning that the asserts are a re-statement of the setup, which results in a lack of meaning to any result. [...]</description>
		<content:encoded><![CDATA[<p>[...] TTDD - Tautological Test Driven Development (Anti Pattern) - Fabio Pereira discusses an anti-pattern in testing where a test&#8217;s set up is very similar to a test&#8217;s asserts meaning that the asserts are a re-statement of the setup, which results in a lack of meaning to any result. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on TTDD &#8211; Tautological Test Driven Development (Anti Pattern) by Fabio Pereira</title>
		<link>http://fabiopereira.me/blog/2010/05/27/ttdd-tautological-test-driven-development-anti-pattern/#comment-6871</link>
		<dc:creator>Fabio Pereira</dc:creator>
		<pubDate>Thu, 27 May 2010 11:25:41 +0000</pubDate>
		<guid isPermaLink="false">http://fabiopereira.me/blog/2010/05/25/ttdd-tautological-test-driven-development-anti-pattern/#comment-6871</guid>
		<description>&lt;a href="#comment-6868" rel="nofollow"&gt;@isaiah&lt;/a&gt; 
Hi Isaiah, thanks for the feedback. 
You are right about the fact that there's not much happening in CarRepository, this example is didactic, in the real world this class would be more complex.
I quite liked your description of "light-weight fake implementation", I think that's what I called Stubs. I attached the code to the post if you could download, it'd be good to get some feedback from you if that's what I meant. Have a look at the classes: 
CarServiceStub and ServiceHeaderFactoryStub.
Cheers,</description>
		<content:encoded><![CDATA[<p><a href="#comment-6868" rel="nofollow">@isaiah</a><br />
Hi Isaiah, thanks for the feedback.<br />
You are right about the fact that there&#8217;s not much happening in CarRepository, this example is didactic, in the real world this class would be more complex.<br />
I quite liked your description of &#8220;light-weight fake implementation&#8221;, I think that&#8217;s what I called Stubs. I attached the code to the post if you could download, it&#8217;d be good to get some feedback from you if that&#8217;s what I meant. Have a look at the classes:<br />
CarServiceStub and ServiceHeaderFactoryStub.<br />
Cheers,</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on TTDD &#8211; Tautological Test Driven Development (Anti Pattern) by isaiah</title>
		<link>http://fabiopereira.me/blog/2010/05/27/ttdd-tautological-test-driven-development-anti-pattern/#comment-6868</link>
		<dc:creator>isaiah</dc:creator>
		<pubDate>Thu, 27 May 2010 09:16:20 +0000</pubDate>
		<guid isPermaLink="false">http://fabiopereira.me/blog/2010/05/25/ttdd-tautological-test-driven-development-anti-pattern/#comment-6868</guid>
		<description>good post, i find this is common test smell, where test code simply duplicates production code, this may also be a hint that your object is exposing its internal through it public api. I tend not to use mocks, if the the collaborator does not change the state of the environment but is just being queried by the object under test. In this case i use light-weight fake implementation which give back canned results for queries.
In your example i, there is not much else happening in the CarRepository apart from forwarding calls to the carService,  I would probably just write an integration-test to test the car repository</description>
		<content:encoded><![CDATA[<p>good post, i find this is common test smell, where test code simply duplicates production code, this may also be a hint that your object is exposing its internal through it public api. I tend not to use mocks, if the the collaborator does not change the state of the environment but is just being queried by the object under test. In this case i use light-weight fake implementation which give back canned results for queries.<br />
In your example i, there is not much else happening in the CarRepository apart from forwarding calls to the carService,  I would probably just write an integration-test to test the car repository</p>
]]></content:encoded>
	</item>
</channel>
</rss>
