Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Testing a Client-Server Application

by paulbort (Hermit)
on May 05, 2004 at 19:33 UTC ( #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!
  • Comment on Re: Testing a Client-Server Application

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2019-07-22 10:29 GMT
Find Nodes?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?

    Results (14 votes). Check out past polls.