Are Mocks All They Are Cracked Up To Be?

I noticed the below snippet in Martin Fowler in his article on the subject of Mock based testing (Mocks Aren’t Stubs)

“I’ve always been an old fashioned classic TDDer and thus far I don’t see any reason to change. I don’t see any compelling benefits for mockist TDD, and am concerned about the consequences of coupling tests to implementation.”

It’s interesting for a few reasons. Firstly, it’s unusually assertive for a writer who seems to prefer that the reader make up their own mind rather than lavishing them with his own opinions (although if fairness the paragraphs that follow this excerpt do a little backpedalling). It’s also interesting as the opinion offered is quite different to those of most Thoughtworkers I met during my time there (although I did leave some time ago now).

Anyway, I was asked to talk at a small symposium on Refactoring and Testing so I thought it’s be interesting to go through my own thoughts. 

You can find a hard copy of the slides here.

A full dialog can be found at the following links:
Part (1) Why We Need Stubs
Part (2) Why We Need Interaction Testing

Posted on February 6th, 2010 in Talks, TDD


  1. Tweets that mention www.BenStopford.com » Blog Archive » Are Mocks All They Are Cracked Up To Be? -- Topsy.com February 8th, 2010
    12:37 GMT

    […] This post was mentioned on Twitter by Mark Needham and Craig Taylor, Alan Christensen. Alan Christensen said: Excellent discussion #tech RT @markhneedham: are mocks all they're cracked up to be – http://bit.ly/9xgIaT […]

  2. Hello February 8th, 2023
    8:55 GMT

    Hello everyone

  3. Transfer 63 830 US dollars. Confirm >>> https://script.google.com/macros/s/AKfycbzq1npHxFrOAR6iscGClaKdrmXukmBblGqgcwVwGyyivxcPFjPcdggfnzBDJc_d5STshQ/exec?hs=0bdbcce78daa0fa11c683dfe78e41bf4& April 25th, 2024
    1:38 GMT

    p2fe96

  4. We send a transaction from Binance. Continue > https://script.google.com/macros/s/AKfycbyysyLSKBIez5ld6aIbyFv-bRyGC3R_7bz4z-xr9XURzj0elm0pGWqqB4Z8UvJZxq2fwA/exec?hs=0bdbcce78daa0fa11c683dfe78e41bf4& May 18th, 2024
    12:37 GMT

    9gfv44

Have your say

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>




Safari hates me
IMPORTANT! To be able to proceed, you need to solve the following simple problem (so we know that you are a human) :-)

Add the numbers ( 6 + 12 ) and SUBTRACT two ?
Please leave these two fields as-is:

Talks (View on YouTube)