<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: The End of Endotesting?</title>
	<atom:link href="http://dannorth.net/2008/09/14/the-end-of-endotesting/feed/" rel="self" type="application/rss+xml" />
	<link>http://dannorth.net/2008/09/14/the-end-of-endotesting/</link>
	<description>embracing uncertainty</description>
	<lastBuildDate>Thu, 02 Feb 2012 20:47:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Dan North</title>
		<link>http://dannorth.net/2008/09/14/the-end-of-endotesting/#comment-9473</link>
		<dc:creator><![CDATA[Dan North]]></dc:creator>
		<pubDate>Thu, 14 Apr 2011 09:44:38 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=69#comment-9473</guid>
		<description><![CDATA[Hi Jonathan.

I&#039;m not suggesting we shouldn&#039;t have stubs, which is what you&#039;re describing, and Mockito has good support for that. My point is that we can do the actual &lt;em&gt;expectations&lt;/em&gt; after the fact, in a black box flight recorder kind of way, which I think leads to more readable tests. And the &lt;code&gt;{{ syntax gymnastics }}&lt;/code&gt; with JMock 2 just hurts my brain!]]></description>
		<content:encoded><![CDATA[<p>Hi Jonathan.</p>
<p>I&#8217;m not suggesting we shouldn&#8217;t have stubs, which is what you&#8217;re describing, and Mockito has good support for that. My point is that we can do the actual <em>expectations</em> after the fact, in a black box flight recorder kind of way, which I think leads to more readable tests. And the <code>{{ syntax gymnastics }}</code> with JMock 2 just hurts my brain!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Woods</title>
		<link>http://dannorth.net/2008/09/14/the-end-of-endotesting/#comment-9462</link>
		<dc:creator><![CDATA[Jonathan Woods]]></dc:creator>
		<pubDate>Sun, 03 Apr 2011 08:14:18 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=69#comment-9462</guid>
		<description><![CDATA[Hi, Dan.

I feel like some sort of lamer for commenting on a post from pre-history, but it really spoke to an insight I&#039;d had recently re mocks and BDD.  That insight too is probably ancient history to you, but since I&#039;ve only just discovered BDD (yes, I know) I&#039;ll take that risk!  Love the blog, InfoQ presentations, etc etc, btw.

I agree that endotesting and top-down development (which is really what BDD and TDD should be called, imho) don&#039;t sit well together.  But I think frameworks like JMock still have a place:

- you mock to implement givens without having to... implement them

- givens are declarative

- so if I want to express &#039;given there is a flight number BA016&#039;, I&#039;d do that in JMock by saying &#039;allowing(flightService).getFlight(&#039;BA016&#039;); will return new Flight(&#039;BA016&#039;)&#039;;  … in other words, I&#039;m not _requiring_ the call to be made, merely saying what should result if it is

- presumably, since I&#039;ve been doing the development top-down, FlightService is the only way to get a flight - or at least it&#039;s mutually consistent with all other ways of creating and retrieving them - so this is a valid approach.  And I suspect that as you continue the BDD process, you make sure givens are refactored to be shared, which again reinforces the mutual consistency requirement on the implementation

- even if the codebase hasn&#039;t been developed top-down, and FlightService isn&#039;t the only way to get a flight, but the test passes notwithstanding the fact that the allowed call isn&#039;t made - perhaps because the implementation under test uses a new magically injected TelepathyService - then from the point of view of developing the behaviour I&#039;m interested in here, I don&#039;t really care.  I realise I might want to be told that the mechanism I&#039;d expected to be used wasn&#039;t, for other reasons, but for the behaviour here it&#039;s not the prime concern.

And re patterns like new Expectations() {{}} - I&#039;ve found myself moving towards building expectations instead using an Expectations instance field in my test classes.  Especially with a few static imports of Expectations methods, it&#039;s just as expressive and makes for easier refactorings of &#039;givens&#039;.]]></description>
		<content:encoded><![CDATA[<p>Hi, Dan.</p>
<p>I feel like some sort of lamer for commenting on a post from pre-history, but it really spoke to an insight I&#8217;d had recently re mocks and BDD.  That insight too is probably ancient history to you, but since I&#8217;ve only just discovered BDD (yes, I know) I&#8217;ll take that risk!  Love the blog, InfoQ presentations, etc etc, btw.</p>
<p>I agree that endotesting and top-down development (which is really what BDD and TDD should be called, imho) don&#8217;t sit well together.  But I think frameworks like JMock still have a place:</p>
<p>- you mock to implement givens without having to&#8230; implement them</p>
<p>- givens are declarative</p>
<p>- so if I want to express &#8216;given there is a flight number BA016&#8242;, I&#8217;d do that in JMock by saying &#8216;allowing(flightService).getFlight(&#8216;BA016&#8242;); will return new Flight(&#8216;BA016&#8242;)&#8217;;  … in other words, I&#8217;m not _requiring_ the call to be made, merely saying what should result if it is</p>
<p>- presumably, since I&#8217;ve been doing the development top-down, FlightService is the only way to get a flight &#8211; or at least it&#8217;s mutually consistent with all other ways of creating and retrieving them &#8211; so this is a valid approach.  And I suspect that as you continue the BDD process, you make sure givens are refactored to be shared, which again reinforces the mutual consistency requirement on the implementation</p>
<p>- even if the codebase hasn&#8217;t been developed top-down, and FlightService isn&#8217;t the only way to get a flight, but the test passes notwithstanding the fact that the allowed call isn&#8217;t made &#8211; perhaps because the implementation under test uses a new magically injected TelepathyService &#8211; then from the point of view of developing the behaviour I&#8217;m interested in here, I don&#8217;t really care.  I realise I might want to be told that the mechanism I&#8217;d expected to be used wasn&#8217;t, for other reasons, but for the behaviour here it&#8217;s not the prime concern.</p>
<p>And re patterns like new Expectations() {{}} &#8211; I&#8217;ve found myself moving towards building expectations instead using an Expectations instance field in my test classes.  Especially with a few static imports of Expectations methods, it&#8217;s just as expressive and makes for easier refactorings of &#8216;givens&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Willed vs Forced designs at Mark Needham</title>
		<link>http://dannorth.net/2008/09/14/the-end-of-endotesting/#comment-7959</link>
		<dc:creator><![CDATA[Willed vs Forced designs at Mark Needham]]></dc:creator>
		<pubDate>Mon, 08 Feb 2010 22:49:04 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=69#comment-7959</guid>
		<description><![CDATA[[...] a couple of years ago with respect to whether using Mockito instead of jMock was bad because it hides design problems that you have with dependencies. Steve Freeman wrote the following comment on Dan&#039;s post:  But, it also became clear that he wrote [...]]]></description>
		<content:encoded><![CDATA[<p>[...] a couple of years ago with respect to whether using Mockito instead of jMock was bad because it hides design problems that you have with dependencies. Steve Freeman wrote the following comment on Dan&#39;s post:  But, it also became clear that he wrote [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Starr's Blog</title>
		<link>http://dannorth.net/2008/09/14/the-end-of-endotesting/#comment-7958</link>
		<dc:creator><![CDATA[David Starr's Blog]]></dc:creator>
		<pubDate>Fri, 13 Feb 2009 18:52:13 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=69#comment-7958</guid>
		<description><![CDATA[Assertion Driven Design (ADD)...

In all cases of using a unit test framework, no matter the intent of the test methods, one thing is certainly...]]></description>
		<content:encoded><![CDATA[<p>Assertion Driven Design (ADD)&#8230;</p>
<p>In all cases of using a unit test framework, no matter the intent of the test methods, one thing is certainly&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: I wish there was a mocking framework&#8230; &#171; monkey island</title>
		<link>http://dannorth.net/2008/09/14/the-end-of-endotesting/#comment-7957</link>
		<dc:creator><![CDATA[I wish there was a mocking framework&#8230; &#171; monkey island]]></dc:creator>
		<pubDate>Mon, 03 Nov 2008 23:52:38 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=69#comment-7957</guid>
		<description><![CDATA[[...] reply to few interesting blog articles. Dan North became a friend of Mockito and wrote about the end of endotesting. His post sparked few interesting comments. Steve Freeman wrote: But, it also became clear that he [...]]]></description>
		<content:encoded><![CDATA[<p>[...] reply to few interesting blog articles. Dan North became a friend of Mockito and wrote about the end of endotesting. His post sparked few interesting comments. Steve Freeman wrote: But, it also became clear that he [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith Braithwaite</title>
		<link>http://dannorth.net/2008/09/14/the-end-of-endotesting/#comment-7956</link>
		<dc:creator><![CDATA[Keith Braithwaite]]></dc:creator>
		<pubDate>Thu, 25 Sep 2008 19:12:31 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=69#comment-7956</guid>
		<description><![CDATA[&quot;I’ve been finding that novices and advanced beginners “get” mocking more quickly with Mockito than with the expectation-based alternatives.&quot;

How are you distinguishing &quot;get mocking&quot; form &quot;gain fluency with the tool&quot;?]]></description>
		<content:encoded><![CDATA[<p>&#8220;I’ve been finding that novices and advanced beginners “get” mocking more quickly with Mockito than with the expectation-based alternatives.&#8221;</p>
<p>How are you distinguishing &#8220;get mocking&#8221; form &#8220;gain fluency with the tool&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan North</title>
		<link>http://dannorth.net/2008/09/14/the-end-of-endotesting/#comment-7955</link>
		<dc:creator><![CDATA[Dan North]]></dc:creator>
		<pubDate>Thu, 25 Sep 2008 15:27:44 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=69#comment-7955</guid>
		<description><![CDATA[Hi Steve.

I agree with using JMock as a teaching tool - I&#039;ve had lots of success with it over the years. And I can&#039;t understate the impact it&#039;s had in terms of the wider adoption of mocking, as well as the secondary effects of its matcher library (&lt;code&gt;assertThat&lt;/code&gt; and hamcrest).

I&#039;m interested in how adopting Mockito would &quot;address some weak design and coding habits&quot;. Is it about working around them so you can get work done &lt;em&gt;in spite of&lt;/em&gt; the bad habits, or does it provide a more gradual and intuitive path away from them (than expectation-based mocking)?

An experienced TDDer will usually be equally fluent/expressive/focused using any decent mocking library, but I&#039;ve been finding that novices and advanced beginners &quot;get&quot; mocking more quickly with Mockito than with the expectation-based alternatives. My sample group has been small so it may just be these people in this context. I haven&#039;t been using it for long enough - or across enough different contexts - to have decent empirical evidence yet.]]></description>
		<content:encoded><![CDATA[<p>Hi Steve.</p>
<p>I agree with using JMock as a teaching tool &#8211; I&#8217;ve had lots of success with it over the years. And I can&#8217;t understate the impact it&#8217;s had in terms of the wider adoption of mocking, as well as the secondary effects of its matcher library (<code>assertThat</code> and hamcrest).</p>
<p>I&#8217;m interested in how adopting Mockito would &#8220;address some weak design and coding habits&#8221;. Is it about working around them so you can get work done <em>in spite of</em> the bad habits, or does it provide a more gradual and intuitive path away from them (than expectation-based mocking)?</p>
<p>An experienced TDDer will usually be equally fluent/expressive/focused using any decent mocking library, but I&#8217;ve been finding that novices and advanced beginners &#8220;get&#8221; mocking more quickly with Mockito than with the expectation-based alternatives. My sample group has been small so it may just be these people in this context. I haven&#8217;t been using it for long enough &#8211; or across enough different contexts &#8211; to have decent empirical evidence yet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Freeman</title>
		<link>http://dannorth.net/2008/09/14/the-end-of-endotesting/#comment-7954</link>
		<dc:creator><![CDATA[Steve Freeman]]></dc:creator>
		<pubDate>Thu, 25 Sep 2008 07:49:32 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=69#comment-7954</guid>
		<description><![CDATA[I finally got to talk to  Szczepan about Mockito earlier this year. As you said, he&#039;s very sharp and came with not much baggage. Mockito has raises some issues we should think hard about.

But, it also became clear that he wrote Mockito to address some weak design and coding habits in his project and that the existing mocking frameworks were doing exactly their job of forcing them into the open. How a team should respond to that feedback is an interesting question.

In the meantime, I&#039;ve found that I /can/ teach using the existing frameworks if I concentrate on what they were intended for: focusing on the relationships between collaborating objects. I&#039;ve seen quite a few students light up when they get the point. In fact, the syntactic noise in jMock really helps to bring this out, whereas it&#039;s easy for it to get lost with easymock and mockito.]]></description>
		<content:encoded><![CDATA[<p>I finally got to talk to  Szczepan about Mockito earlier this year. As you said, he&#8217;s very sharp and came with not much baggage. Mockito has raises some issues we should think hard about.</p>
<p>But, it also became clear that he wrote Mockito to address some weak design and coding habits in his project and that the existing mocking frameworks were doing exactly their job of forcing them into the open. How a team should respond to that feedback is an interesting question.</p>
<p>In the meantime, I&#8217;ve found that I /can/ teach using the existing frameworks if I concentrate on what they were intended for: focusing on the relationships between collaborating objects. I&#8217;ve seen quite a few students light up when they get the point. In fact, the syntactic noise in jMock really helps to bring this out, whereas it&#8217;s easy for it to get lost with easymock and mockito.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan North</title>
		<link>http://dannorth.net/2008/09/14/the-end-of-endotesting/#comment-7953</link>
		<dc:creator><![CDATA[Dan North]]></dc:creator>
		<pubDate>Mon, 22 Sep 2008 22:37:35 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=69#comment-7953</guid>
		<description><![CDATA[Hi Janis.

I&#039;ve been using JMock 1 and 2 for a while in the way you describe - writing the example/test ahead of implementing the code. I still do the same thing with Mockito but I find the flow works better. I&#039;ve also found that coaching TDD using Mockito seems to work better than with JMock or EasyMock.

The only difference between state-based and interaction-based testing is now whether I &lt;code&gt;verify(...)&lt;/code&gt; or &lt;code&gt;assertThat(...)&lt;/code&gt; things are as I expect them to be. It&#039;s still very much test-driven - the test is written before I implement any code - but the people I&#039;m coaching seem more comfortable with Mockito&#039;s verify afterwards model, and I&#039;m finding it fits the cycle of TDD more naturally.]]></description>
		<content:encoded><![CDATA[<p>Hi Janis.</p>
<p>I&#8217;ve been using JMock 1 and 2 for a while in the way you describe &#8211; writing the example/test ahead of implementing the code. I still do the same thing with Mockito but I find the flow works better. I&#8217;ve also found that coaching TDD using Mockito seems to work better than with JMock or EasyMock.</p>
<p>The only difference between state-based and interaction-based testing is now whether I <code>verify(...)</code> or <code>assertThat(...)</code> things are as I expect them to be. It&#8217;s still very much test-driven &#8211; the test is written before I implement any code &#8211; but the people I&#8217;m coaching seem more comfortable with Mockito&#8217;s verify afterwards model, and I&#8217;m finding it fits the cycle of TDD more naturally.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith Braithwaite</title>
		<link>http://dannorth.net/2008/09/14/the-end-of-endotesting/#comment-7952</link>
		<dc:creator><![CDATA[Keith Braithwaite]]></dc:creator>
		<pubDate>Mon, 22 Sep 2008 07:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://dannorth.net/?p=69#comment-7952</guid>
		<description><![CDATA[I wonder. When I see a tool I like to think about its affordances: When we grasp the tool, what action does its form (interacting with our form) suggest to us that we can do with it?

Putting the expectations after the &#039;when&#039; feels very different from putting them before. Maybe I&#039;m reading too much into this but the expectations-at-the-top model seems to be saying &quot;think about the expected interactions before thinking about the &#039;when&#039;&quot; and the expectations-at-the-bottom model seems to say &quot;put in the &#039;when&#039; and then fill in the expectations&quot;

That turn your brain inside-out feeling isn&#039;t always a bad one and too often &quot;more intuitive&quot; is a technical term meaning &quot;relieves me of the need to think&quot; rather than &quot;makes doing the right think easier.&quot; I wonder exactly which it is in this case.]]></description>
		<content:encoded><![CDATA[<p>I wonder. When I see a tool I like to think about its affordances: When we grasp the tool, what action does its form (interacting with our form) suggest to us that we can do with it?</p>
<p>Putting the expectations after the &#8216;when&#8217; feels very different from putting them before. Maybe I&#8217;m reading too much into this but the expectations-at-the-top model seems to be saying &#8220;think about the expected interactions before thinking about the &#8216;when&#8217;&#8221; and the expectations-at-the-bottom model seems to say &#8220;put in the &#8216;when&#8217; and then fill in the expectations&#8221;</p>
<p>That turn your brain inside-out feeling isn&#8217;t always a bad one and too often &#8220;more intuitive&#8221; is a technical term meaning &#8220;relieves me of the need to think&#8221; rather than &#8220;makes doing the right think easier.&#8221; I wonder exactly which it is in this case.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

