jk2addict has asked for the wisdom of the Perl Monks concerning the following question:
Greets to all. Hope the new year is treating everyone ok.
I'm currently writing a set of client side modules to interface with some 3rd party connectivity software we have running on our mainframe. The client software in that package was a windows only dll, so some packet sniffing and perl coding and I now have a perl client for *nix. :-) But I digress.
Even though these module will probably never hit the public, I'm forcing myself to Do The Right Thing by completing the inline pod, putting it all in a CPAN style package, etc. The last thing on my plate is the module tests, which leads me to my real question.
What would be the most sensible way to do test for these modules? I would either need to do pre-test config questions to get connect info to a live server, or I could write a tcp server module that mimics the real server.
I've looked into Net::Server and NetServer::Generic and while none of it looks terribly difficult, I have no idea where to start. Would it be better to run a 'simple'/'single' server within the test script, or should I just bite the bullet and write a real ::Server module to accompany the ::Client modules in this package? I guess they would be useful from the standpoint that new application mocksups could be built locally using the client and server parts without the 'real' server parts being available yet. What's the best way to have a client and server talking to each other within the same script?
I know. I know. "Network Programming with Perl". It's ordered and on the way. :-) I just want to get a head start.
Thanks,
-=Chris
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Best Approach: package module tests with tcp
by chromatic (Archbishop) on Jan 10, 2003 at 22:07 UTC | |
by jk2addict (Chaplain) on Jan 24, 2003 at 18:35 UTC | |
by chromatic (Archbishop) on Jan 24, 2003 at 21:08 UTC | |
|
Re: Best Approach: package module tests with tcp
by adrianh (Chancellor) on Jan 11, 2003 at 12:39 UTC |