I did write some tests for both sides of the fence - for one the tests in WWW::Mechanize and WWW::Mechanize::Shell exercise and check the client side, and for the server side, there is some rudimentary idea in CGI::Wiki::Simple, test *52.t, which does a setup, run and teardown of a CGI script.
I haven't found any good frameworks to do end-to-end CGI testing, but CGI::Application allows you to easily redirect the output of the CGI. You will still have to set up all the environment variables though.
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
In reply to Re: Automating CGI Testing
by Corion
in thread Automating CGI Testing
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |