in reply to Testing a Client-Server Application
WWW::Mechanize has a module as part of the tests that implements a basic HTTP server. You could check out the test scripts there to see what its doing for some ideas.