in reply to WebApplication test-automation
I have an application written in CGI::Application, and CGI::Application has an offline mode that directly returns a string instead of printing it - and then I write tests against that returned string (or rather, I parse the response into headers and body, and test the headers and the body). Test::HTML::Content is still crude and not yet ported to XPath syntax, but it might help already.
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
|
---|