in reply to Need to test HTTP page responses

The required test can be easily achieved by using Test::WWW::Mechanize with Test::More, where it accesses the URL and it Checks for the response codes being returned.

Example Code looks like:

use Test::More tests => 1;
use Test::WWW::Mechanize
$mech->Test::WWW::Mechanize->new;
$mech=get_ok(URL);

The response it return will be as follows:
ok - Got <<URL>> ok

Thanks,
Sagar

Replies are listed 'Best First'.
Re^2: Need to test HTTP page responses
by Anonymous Monk on Oct 22, 2008 at 14:14 UTC
    Thanks all for your help so far.

    I've added the LWP::Debug to the script and for some reason every request is coming through as

    LWP::UserAgent::new: ()
    LWP::UserAgent::request: ()
    LWP::UserAgent::send_request: HEAD http://bonnard/home.do/
    LWP::UserAgent::_need_proxy: Not proxied
    LWP::Protocol::http::request: ()
    LWP::UserAgent::request: Simple response: Internal Server Error
    http://bonnard/home.do/: 500

    SO need to look into Proxies now me thinks...

    Ant