<?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: Shifting testing strategies away from mocks</title>
	<atom:link href="http://lostechies.com/jimmybogard/2011/01/12/shifting-testing-strategies-away-from-mocks/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/jimmybogard/2011/01/12/shifting-testing-strategies-away-from-mocks/</link>
	<description>Strong opinions, weakly held</description>
	<lastBuildDate>Sun, 19 May 2013 03:22:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: jrnail23</title>
		<link>http://lostechies.com/jimmybogard/2011/01/12/shifting-testing-strategies-away-from-mocks/#comment-2782</link>
		<dc:creator>jrnail23</dc:creator>
		<pubDate>Tue, 18 Jan 2011 00:12:10 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2011/01/11/shifting-testing-strategies-away-from-mocks.aspx#comment-2782</guid>
		<description>Hi Jimmy,
I&#039;ve asked some of these same questions myself, and I think it might come down to setting up some sort of mechanism in your testing architecture that can swap out a fake/mock/stub with the real implementation (likely via IoC container) according to some test category/attribute, but keeping the same test logic.  I haven&#039;t really chased it much myself, but it seems like it might be worth the effort.

Also, with respect to BDD, I gave it a good try a couple months back, but I kept getting frustrated with the tooling (specifically that the libraries I tried either involved too much setup effort, or they never seemed to match my abstract abstract mental model for what I was trying to accomplish).

That said, there also didn&#039;t seem to be a lot of practical guidance out there for successfully applying BDD.</description>
		<content:encoded><![CDATA[<p>Hi Jimmy,<br />
I&#8217;ve asked some of these same questions myself, and I think it might come down to setting up some sort of mechanism in your testing architecture that can swap out a fake/mock/stub with the real implementation (likely via IoC container) according to some test category/attribute, but keeping the same test logic.  I haven&#8217;t really chased it much myself, but it seems like it might be worth the effort.</p>
<p>Also, with respect to BDD, I gave it a good try a couple months back, but I kept getting frustrated with the tooling (specifically that the libraries I tried either involved too much setup effort, or they never seemed to match my abstract abstract mental model for what I was trying to accomplish).</p>
<p>That said, there also didn&#8217;t seem to be a lot of practical guidance out there for successfully applying BDD.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://lostechies.com/jimmybogard/2011/01/12/shifting-testing-strategies-away-from-mocks/#comment-2781</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Fri, 14 Jan 2011 13:39:20 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2011/01/11/shifting-testing-strategies-away-from-mocks.aspx#comment-2781</guid>
		<description>@Paul

I think in your case the answer may be in his post. If you are testing that a method has been called, it is a barrier to refactoring if you wanted to break that method down into two etc.</description>
		<content:encoded><![CDATA[<p>@Paul</p>
<p>I think in your case the answer may be in his post. If you are testing that a method has been called, it is a barrier to refactoring if you wanted to break that method down into two etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Confused</title>
		<link>http://lostechies.com/jimmybogard/2011/01/12/shifting-testing-strategies-away-from-mocks/#comment-2780</link>
		<dc:creator>Confused</dc:creator>
		<pubDate>Thu, 13 Jan 2011 17:22:50 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2011/01/11/shifting-testing-strategies-away-from-mocks.aspx#comment-2780</guid>
		<description>I think a simple example is in order here. Something that demonstrates the process that you go through using &quot;Integration tests that go end-to-end as the first test I write, and usually the last test that passes&quot; as a theme.

Thanks in advance.</description>
		<content:encoded><![CDATA[<p>I think a simple example is in order here. Something that demonstrates the process that you go through using &#8220;Integration tests that go end-to-end as the first test I write, and usually the last test that passes&#8221; as a theme.</p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Cowan</title>
		<link>http://lostechies.com/jimmybogard/2011/01/12/shifting-testing-strategies-away-from-mocks/#comment-2779</link>
		<dc:creator>Paul Cowan</dc:creator>
		<pubDate>Thu, 13 Jan 2011 15:26:51 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2011/01/11/shifting-testing-strategies-away-from-mocks.aspx#comment-2779</guid>
		<description>Where I agree over mocking makes tests pointless, I am still struggling to see how you test that a void method was called.

I use doubles a lot but I don&#039;t want to create extra classes just to return fake data.

I might be missing the point also :-)</description>
		<content:encoded><![CDATA[<p>Where I agree over mocking makes tests pointless, I am still struggling to see how you test that a void method was called.</p>
<p>I use doubles a lot but I don&#8217;t want to create extra classes just to return fake data.</p>
<p>I might be missing the point also <img src='http://lostechies.com/jimmybogard/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Morcom</title>
		<link>http://lostechies.com/jimmybogard/2011/01/12/shifting-testing-strategies-away-from-mocks/#comment-2778</link>
		<dc:creator>James Morcom</dc:creator>
		<pubDate>Wed, 12 Jan 2011 19:31:59 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2011/01/11/shifting-testing-strategies-away-from-mocks.aspx#comment-2778</guid>
		<description>Using the collection-backed repository as an example, could you explain how that overcomes the problem of exposing implementation?

I ask because in my mind that collection-backed repository is essentially doing the same thing as a mock/stub, except you&#039;ve spent more time implementing it.

Sure the repository class is usually situated somewhere other than the unit tests so you&#039;re less aware of it, but you could just as easily do the same with fakes I think?

I still feel like I&#039;m missing the point :)</description>
		<content:encoded><![CDATA[<p>Using the collection-backed repository as an example, could you explain how that overcomes the problem of exposing implementation?</p>
<p>I ask because in my mind that collection-backed repository is essentially doing the same thing as a mock/stub, except you&#8217;ve spent more time implementing it.</p>
<p>Sure the repository class is usually situated somewhere other than the unit tests so you&#8217;re less aware of it, but you could just as easily do the same with fakes I think?</p>
<p>I still feel like I&#8217;m missing the point <img src='http://lostechies.com/jimmybogard/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogardj</title>
		<link>http://lostechies.com/jimmybogard/2011/01/12/shifting-testing-strategies-away-from-mocks/#comment-2777</link>
		<dc:creator>bogardj</dc:creator>
		<pubDate>Wed, 12 Jan 2011 14:26:55 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2011/01/11/shifting-testing-strategies-away-from-mocks.aspx#comment-2777</guid>
		<description>@Paul

Fakes/stubs for things I can&#039;t control/or are slow (DB, web service etc.).  i.e., using an in-memory DB or collection-backed repositories, for example.

Integration tests that go end-to-end as the first test I write, and usually the last test that passes.</description>
		<content:encoded><![CDATA[<p>@Paul</p>
<p>Fakes/stubs for things I can&#8217;t control/or are slow (DB, web service etc.).  i.e., using an in-memory DB or collection-backed repositories, for example.</p>
<p>Integration tests that go end-to-end as the first test I write, and usually the last test that passes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Morcom</title>
		<link>http://lostechies.com/jimmybogard/2011/01/12/shifting-testing-strategies-away-from-mocks/#comment-2776</link>
		<dc:creator>James Morcom</dc:creator>
		<pubDate>Wed, 12 Jan 2011 14:01:59 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2011/01/11/shifting-testing-strategies-away-from-mocks.aspx#comment-2776</guid>
		<description>@Paul Cowan I think he&#039;s saying that you should &quot;bootstrap&quot; all the services you need before running the test. i.e. Set it up to use a real database (be it SQLite or whatever), like you would with an integration test.

I&#039;ll be intrigued (in a good way!) if that&#039;s not the case :)</description>
		<content:encoded><![CDATA[<p>@Paul Cowan I think he&#8217;s saying that you should &#8220;bootstrap&#8221; all the services you need before running the test. i.e. Set it up to use a real database (be it SQLite or whatever), like you would with an integration test.</p>
<p>I&#8217;ll be intrigued (in a good way!) if that&#8217;s not the case <img src='http://lostechies.com/jimmybogard/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Cowan</title>
		<link>http://lostechies.com/jimmybogard/2011/01/12/shifting-testing-strategies-away-from-mocks/#comment-2775</link>
		<dc:creator>Paul Cowan</dc:creator>
		<pubDate>Wed, 12 Jan 2011 13:27:40 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2011/01/11/shifting-testing-strategies-away-from-mocks.aspx#comment-2775</guid>
		<description>So are you saying you supply hand rolled fakes, stubs or doubles?
</description>
		<content:encoded><![CDATA[<p>So are you saying you supply hand rolled fakes, stubs or doubles?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://lostechies.com/jimmybogard/2011/01/12/shifting-testing-strategies-away-from-mocks/#comment-2774</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Wed, 12 Jan 2011 09:50:53 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2011/01/11/shifting-testing-strategies-away-from-mocks.aspx#comment-2774</guid>
		<description>Interesting comments and a good point of reference for anyone experiencing the problems you mention.

I have this feeling this isn&#039;t a post that will inspire the TDD purists.

A few examples would be nice, Jimmy.</description>
		<content:encoded><![CDATA[<p>Interesting comments and a good point of reference for anyone experiencing the problems you mention.</p>
<p>I have this feeling this isn&#8217;t a post that will inspire the TDD purists.</p>
<p>A few examples would be nice, Jimmy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John V. Petersen</title>
		<link>http://lostechies.com/jimmybogard/2011/01/12/shifting-testing-strategies-away-from-mocks/#comment-2773</link>
		<dc:creator>John V. Petersen</dc:creator>
		<pubDate>Wed, 12 Jan 2011 02:44:24 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2011/01/11/shifting-testing-strategies-away-from-mocks.aspx#comment-2773</guid>
		<description>Absolutely agree 100% here. And when going to a BDD style of testing wherein you have a fixture per system under test, A - your tests are more readable (aka a spec) and B - less likely to have side effects. I&#039;ve started to look at m-spec - but I&#039;m not a big fan of it. Quite frankly, it is easy to roll your own framework.

Nice post Jimmy!!</description>
		<content:encoded><![CDATA[<p>Absolutely agree 100% here. And when going to a BDD style of testing wherein you have a fixture per system under test, A &#8211; your tests are more readable (aka a spec) and B &#8211; less likely to have side effects. I&#8217;ve started to look at m-spec &#8211; but I&#8217;m not a big fan of it. Quite frankly, it is easy to roll your own framework.</p>
<p>Nice post Jimmy!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
