in reply to Smallish mock objects
Can you explaint to me why mock objects are so great? I've used them, but I find that I sometimes make inappropriate interface assumptions and lose some integration testing as a result (in other words, if my mocked objects have subtle differences from the real ones, my tests might pass but they're not correct). I've always preferred Test::MockModule and just replacing the exact target code that might prove problematic in something I might otherwise mock. This allows me to at least test partial integration with the object in question.
I do realize that some module simple can't be loaded easily (some of the Apache ones, for example), so mock objects would be appropriate there, but otherwise, I don't think it's worth the trouble.
Cheers,
Ovid
New address of my CGI Course.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Smallish mock objects
by chromatic (Archbishop) on Dec 16, 2006 at 09:37 UTC | |
|
Re^2: Smallish mock objects
by adrianh (Chancellor) on Dec 16, 2006 at 14:46 UTC | |
by sgt (Deacon) on Dec 20, 2006 at 10:02 UTC | |
by sgt (Deacon) on Dec 20, 2006 at 11:33 UTC | |
by adrianh (Chancellor) on Dec 23, 2006 at 11:57 UTC | |
by sgt (Deacon) on Dec 23, 2006 at 15:01 UTC | |
|
Re^2: Smallish mock objects
by diotalevi (Canon) on Dec 20, 2006 at 07:25 UTC |