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!

In reply to Re: Testing a Client-Server Application by paulbort
in thread Testing a Client-Server Application by dreadpiratepeter

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.