Search the web
Sign In
New User? Sign Up
testdrivendevelopment · Test-driven Development
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Spy vs. Mock   Message List  
Reply | Forward Message #5373 of 32012 |
Mock nomenclature

--- In testdrivendevelopment@yahoogroups.com, Steve Freeman
<steve@m...> wrote:

<snip/>

> Our experience is that TDD using mocks encourages interface
discovery,
> so mocks should drive the type system but not necessarily its
> implementation.

I think this nicely illustrates the nomenclature issue. Are you
saying that TDD using "not real" objects encourage interface
discovery? Or do you mean that TDD with mock objects that are
self-validating and fail fast provided that encouragement?

The fact is that the term "mock object" is broadly used in a more
generic way. I suppose there is no harm in using it in a more
restricted way in a certain context where everyone understands
that more restricted usage. Otoh, it's easy to make bad
assumptions about what everyone understands. And using it more
broadly is only confusing.

When it comes right down to it, "mock object" is a poor choice
for a specialized meaning. The words are suggestive of the
broader meaning. A generally knowledgible programmer upon first
hearing the term might well assume that broader meaning and never
ask for clarification. That would lead to the very worst form of
miscommunication in which everyone belives they are talking about
the same thing when in fact they are not.


Please, let's not make it more difficult for developers to learn
about TDD and how to do it effectively. Use terms that
communicate to a broader audience.

Kiel Hodges





Thu Oct 9, 2003 12:29 pm

kielhodges
Offline Offline
Send Email Send Email

Forward
Message #5373 of 32012 |
Expand Messages Author Sort by Date

... I wish we did, especially as we coined the term ;-) The waters have become very muddied to the extent that not many people seem to mean the same thing as...
Steve Freeman
smg_freeman
Offline Send Email
Oct 9, 2003
3:10 am

... <steve@m...> wrote: <snip/> ... discovery, ... I think this nicely illustrates the nomenclature issue. Are you saying that TDD using "not real" objects...
Kiel Hodges
kielhodges
Offline Send Email
Oct 9, 2003
1:30 pm

... Using a mock requires that you be able to have the system use the mock rather than the "real" class. A nice way to do that is to have the system depend on...
Dave Astels
astelsd
Online Now Send Email
Oct 9, 2003
5:55 pm

... its ... you ... the mock ... the ... which ... True enough. But that has nothing to do with whether or not the implementation of that interface is...
Kiel Hodges
kielhodges
Offline Send Email
Oct 10, 2003
5:36 pm

... its ... you ... the mock ... the ... which ... True enough. But that has nothing to do with whether or not the implementation of that interface is...
Kiel Hodges
kielhodges
Offline Send Email
Oct 10, 2003
5:37 pm

... I think that Keith Ray's much earlier comment strikes right at the heart of the debate. ... is ... enough ... results ... test ... I think that not only is...
ssmith12345uk
Offline Send Email
Oct 9, 2003
5:55 pm

Hi, Kiel, ... <snip> ... I feel it's a mistake to "dumb down" the language just so beginners can learn about it... it's better to learn something right than to...
Kay A. Pentecost
tranzpupy
Offline Send Email
Oct 9, 2003
7:35 pm

... learn ... beginners can ... I'm certainly not suggesting that we use language that is less effective with more knowledgible people just to make it easier ...
Kiel Hodges
kielhodges
Offline Send Email
Oct 10, 2003
5:36 pm

Hi, Kiel, ... I don't see that I've said anything I need to be "excused" for. Can you tell me what led you to feel I had? ... It wasn't meant to. Do you...
Kay A. Pentecost
tranzpupy
Offline Send Email
Oct 13, 2003
6:09 pm

... Pentecost" ... Freeman ... Can you ... vocabulary as ... I didn't classify any people in any any way. I said that the phrase "dumb down" /suggested/ an...
Kiel Hodges
kielhodges
Offline Send Email
Oct 14, 2003
7:17 pm

Hi, Kiel, I guess I need to check my humor dipstick... (more embedded) ... <snip> ... I suggest, <grin> that next time you answer *that* one. ... I understand....
Kay A. Pentecost
tranzpupy
Offline Send Email
Oct 16, 2003
11:16 pm

... Why, Kay, I didn't know you were taking up Lisp! :-) -- Edmund Schweppe -- schweppe@... -- http://schweppe.home.tiac.net The opinions expressed herein...
Edmund Schweppe
schweppe@...
Send Email
Oct 17, 2003
3:57 am

... I proposed "Test-Supporting Objects". This means something that is never executed in production, only during testing. This seems to me to be a good...
Chad Woolley
thewoolleyman
Offline Send Email
Oct 10, 2003
11:53 pm

... that is never ... objects we have ... fall into one or ... It would also cover "object mothers" and any other thing that was not an ersatz implementation...
Kiel Hodges
kielhodges
Offline Send Email
Oct 11, 2003
11:16 pm

... That's a good point. However, I tend to consider object mothers and these types of "utilities" to be part of my unit tests. They would be within my unit...
Chad Woolley
thewoolleyman
Offline Send Email
Oct 14, 2003
7:17 pm

... This is also my experience, but it also encourages splitting large objects into smaller ones, especially when I want to mock object A and end up wanting to...
J. B. Rainsberger
nails762
Offline Send Email
Oct 9, 2003
5:55 pm

... How does this make your original requirement to test something that calls object A go away? Do you have a concrete example of how the avoidance of mocking...
Steve Freeman
smg_freeman
Offline Send Email
Oct 10, 2003
5:36 pm

... Short version: I was writing an Action for a Turbine app. I wanted a class that interpreted a raw HTTP request and presented the data as domain objects....
J. B. Rainsberger
nails762
Offline Send Email
Oct 10, 2003
6:27 pm

... discovery, ... large ... A and ... logic. ... object B ... that ... the ... made ... a ... as ... essentially ... This is ... design ... need for ... I...
Rex Madden
asian10
Offline Send Email
Oct 11, 2003
8:11 am

Rex Madden wrote: <snip /> ... Exactly. The Mocks exposed the responsibility problem, which I like. Too often, though, I see people apply these complex mocks...
J. B. Rainsberger
nails762
Offline Send Email
Oct 14, 2003
7:31 pm

... So, do have a test that uses a mock parser? Or, if it's more than just a data object, a mock DomainBasedRequest? S....
Steve Freeman
smg_freeman
Offline Send Email
Oct 13, 2003
3:20 pm

... Each action has a template method to execute with an HTTP-based request as its input. Action... execute(httpRequest) { ...
J. B. Rainsberger
nails762
Offline Send Email
Oct 14, 2003
8:32 pm

... How does this make your original requirement to test something that calls object A go away? Do you have a concrete example of how the avoidance of mocking...
Steve Freeman
smg_freeman
Offline Send Email
Oct 10, 2003
5:36 pm

... How does this make your original requirement to test something that calls object A go away? Do you have a concrete example of how the avoidance of mocking...
Steve Freeman
smg_freeman
Offline Send Email
Oct 10, 2003
5:36 pm
 First  |  |  Next > Last 
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help