in reply to Best Approach: package module tests with tcp
Test everything in isolation. That usually means test each function and method separately. For something complicated, you'll want to test as many pieces together as possible, but I never do that before I've tested everything in isolation.
If I were doing this, I'd pull out the trusty Test::MockObject, fake up a network client (since it now works with blessed filehandles, you're golden), and test the slimmest bits of network code as possible.
Another option is to have Makefile.PL check if you're in interactive mode and prompt to connect to a known server. That's a good integration test -- it's what CPAN does.
My first answer is still, "test each piece individually" because most of your code doesn't actually rely on the network.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Best Approach: package module tests with tcp
by jk2addict (Chaplain) on Jan 24, 2003 at 18:35 UTC | |
by chromatic (Archbishop) on Jan 24, 2003 at 21:08 UTC |