Launchpad logo and name.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index ][Thread Index ]

Re: [Launchpad-users] How do you TDD a launchpadlib application?



2009/9/24 Jonathan Lange <jml@xxxxxxxxx>:
> Hello Launchpad Users,
>
> I've started to write things that use launchpadlib that are more than
> just throw-away scripts. I want to build these apps with test-driven
> development, which is my preferred way of writing serious code.
>
> It turns out that it's really quite tricky. I've ended up making fake
> Bug objects and fake Person objects and all sorts of yuck. Has anyone
> done TDD with launchpadlib? What was your approach?

I was writing one in ppa-smoketest, and I got pretty tired of the high
latency to test it against real Launchpad.

However, the main thing I need to test here is that I'm correctly
understanding (guessing) how Launchpad APIs work, so writing my own
mocks would be unsatisfactory.  There would be a lot of risk of skew.

It would be amazingly cool if I could set
service_root=IMAGINARY_LAUNCHPAD and have it answer everything in
process without going across the network, but guaranteed to look
realistic.

-- 
Martin <http://launchpad.net/~mbp/>



This is the launchpad-users mailing list archive — see also the general help for Launchpad.net mailing lists.

(Formatted by MHonArc.)