Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Testing a Client-Server Application

by paulbort (Hermit)
on May 05, 2004 at 19:33 UTC ( [id://350894]=note: print w/replies, xml ) Need Help??


in reply to Testing a Client-Server Application

Second the recommendation to look at WWW::Mechanize, if your clients are web-based. If not, it might make more sense to write three separate test scripts, (one server and two clients,) and run all three on the same machine, using a token to make the clients take turns (I get the impression that the server could just do what it has to based on what the clients do.)

A way to do this would probably be with a couple of local sockets, where client 1 does its thing, then when it's ready to wait for client 2, it sends a message on the socket to client 2, and starts listening on the other socket for a message allowing it to resume. (touching files in a common directory works too, if you're used to that kind of semaphore.)

On further consideration, properly written client test scripts will exercise much (most?) of the server code, and should be able to verify proper operation of the server to that extent. Then the server test script would only need to test things that clients don't exercise, and would not need to be running while the client tests are running. The testing clients would just run against a regular server.

--
Spring: Forces, Coiled Again!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://350894]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-03-29 11:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found