NAME

Test::WWW::Simple - Test Web applications using TAP

SYNOPSIS

use Test::WWW::Simple;
# This is the default user agent.
user_agent('Windows IE 6');
page_like("http://yahoo.com",      qr/.../, "check for expected text");
page_unlike("http://my.yahoo.com", qr/.../, "check for undesirable text");
user_agent('Mac Safari');
...

DESCRIPTION

Test::WWW::Simple is a very basic class for testing Web applications and Web pages. It uses WWW::Mechanize to fetch pages, and Test::Builder to implement TAP (Test Anything Protocol) for the actual testing.

Since we use Test::Builder for the like and unlike routines, these can be integrated with the other standard Test::Builder-based modules as just more tests.

SEE ALSO

WWW::Mechanize for a description of how the simulated browser works; Test::Builder to see how a test module works.

You may also want to look at Test::WWW::Mechanize if you want to write more precise tests ("is the title of this page like the pattern?" or "are all the page links ok?").

The simlpe_scan utility provided with this module demonstrates a possible use of Test::WWW::Simple; do a perldoc simple_scan for details on this program.

AUTHOR

Joe McMahon, <mcmahon@yahoo-inc.com>

COPYRIGHT AND LICENSE

Copyright (C) 2005 by Yahoo!

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.6.1 or, at your option, any later version of Perl 5 you may have available.