I'd advise two levels of tests:
Start with actually testing the service
When that gets too slow and becomes painful, then build mocks, stubs, or
fakes. Run the 'real' 'big' (slow) tests occasionally in the background,
and do your TDD with the mocks, stubs and fakes. Try to have a balanced
--- On Tue, 28/9/10, Spiros Denaxas s.dena...@gmail.com wrote:
From: Spiros Denaxas s.dena...@gmail.com
I am venturing off to write a module which will act as a
wrapper
around an online API provided by a third party. I am trying
to plan
ahead of time how the tests for it will work.
On
On 2010.9.28 8:21 AM, Ovid wrote:
There are no standards that I know of because different situations can call
for
different responses. However, be very careful about just mocking everything.
If
you do and their API changes, you'll find yourself with passing tests for
code which
does not
(apologies if you get 2 versions of this; My phone crashed as I was
composing a reply on train... :( )
Heya Sprios,
I'l give a shameless plug for LWP::UserAgent::Mockable. This was originally
written for testing complex web services (and to get around the situation of
same being quite