Derik Whittaker

Syndication

News


Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Changing Terms from Mocking Framework to Isolation Framework

The other day on Twitter Roy Osherove made the statement that he was teaching a class on TDD and he was showing how to use the various Isolation Frameworks.  When I read this I had to ask if he talking about Mocking frameworks when he said Isolation frameworks.  And indeed he was.

As I sat back to reflect on the semantic differences between the terms Mocking and Isolation I had an 'ah-ha' moment. 

When we use the term Mocking we are talking about replacing the 'real' functionality with 'canned' functionality.  Martin Fowler put it best in his Mock's aren't Stubs post

Mocks are objects pre-programmed with expectations which form a specification of the calls they are expected to receive.

This definition works great and makes a ton of sense, however when most people talk about mocking frameworks do not immediately think 'replace real functionality with fake functionality' they are talking about how they setup their tests to test logic in isolation.

However, when you tell someone you are working with an isolation framework the idea should click in their head as to what is going to take place and how it is going to be used.  By using the term isolation framework we are telling our end users (developers) that what we are really trying to do with the framework is remove external dependencies from our test in order to make them more granular and reliable.

In fact many times when using a tool like RhinoMocks you are not setting up mocks instances but just removing actual functionality from your tests (remember not all tests need expectations setup). In these cases aren't we simply isolating behavior?

Maybe switching terms can lead to a wider adoption of mocking (sorry isolation) frameworks being part of our testing tool belts.

I know that at the end of the day a mocking framework like RhinoMocks or Moq really is setting up and executing Mocks for object instances, but I really like the idea of calling these isolation frameworks going forward.

Thoughts, feedback?

Till next time,

[--- check out www.dimecasts.net ---]


Posted 12-09-2008 7:14 AM by Derik Whittaker

[Advertisement]

Comments

Dew Drop - December 9, 2008 | Alvin Ashcraft's Morning Dew wrote Dew Drop - December 9, 2008 | Alvin Ashcraft's Morning Dew
on 12-09-2008 10:10 AM

Pingback from  Dew Drop - December 9, 2008 | Alvin Ashcraft's Morning Dew

Greg Duncan wrote re: Changing Terms from Mocking Framework to Isolation Framework
on 12-09-2008 10:30 AM

Oh heck yeah!

I think "Isolation Framework" makes so much more sense...

I'm on board. No more Mocking for me, it's Isolating now and into the future!  :)

Jason Bock wrote re: Changing Terms from Mocking Framework to Isolation Framework
on 12-09-2008 11:39 AM

I really like this: isolation frameworks, or just using the word "isolation" to replace the "mock". "mock" sounds like I'm not doing something official enough :). And I'm not being sarcastic; I think "isolating" speaks much better to what you're doing.

DotNetKicks.com wrote Changing Terms from Mocking Framework to Isolation Framework
on 12-09-2008 11:48 AM

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Lee Carter wrote re: Changing Terms from Mocking Framework to Isolation Framework
on 12-09-2008 2:30 PM

I like it - makes the intent much clearer.146

Arjan`s World » LINKBLOG for December 9, 2008 wrote Arjan`s World » LINKBLOG for December 9, 2008
on 12-09-2008 3:24 PM

Pingback from  Arjan`s World    » LINKBLOG for December 9, 2008

Mario Pareja wrote re: Changing Terms from Mocking Framework to Isolation Framework
on 12-10-2008 12:08 AM

I will definitely most definitely be using this term.

Reflective Perspective - Chris Alcock » The Morning Brew #241 wrote Reflective Perspective - Chris Alcock » The Morning Brew #241
on 12-10-2008 3:29 AM

Pingback from  Reflective Perspective - Chris Alcock  » The Morning Brew #241

Jeremy Gray wrote re: Changing Terms from Mocking Framework to Isolation Framework
on 12-10-2008 1:48 PM

On the other hand, Roy has a product to sell, and his product happens to be the only one in the field with any part of the word "isolation" in it. I'd take his suggestions with a pinch of salt, if not with the opinion that he's doing marketing work.

The overarching term "test double" pre-exists "isolation framework" by quite some time and has no marketing spin hidden within. Perhaps we can instead settle on a term somehow based on the word "double"?

Derik Whittaker wrote re: Changing Terms from Mocking Framework to Isolation Framework
on 12-10-2008 1:55 PM

@Jeremy,

I know Roy works for TypeMock, but I also fell that he was using this term in more generic terms.  In fact when he used this term it was when he was teaching a class on testing and showing ALL the various frameworks.

To me Isolation is the cleanest word choice.  There is no hidden double meaning in my book.

.NET developer wrote No more mocking?
on 11-13-2009 12:06 PM

No more mocking?

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)