It's surprising how far you can get in one day by starting with
#!/usr/bin/perl -w use strict; use Test; use WWW::Mechanize; use constant STARTING_URL => 'http://localhost//notyetbuilt.cgi'; my $agent = WWW::Mechanize->new(); $agent->get(STARTING_URL); ok( $agent->status, 200 );
and then writing just enough CGI code to make that first little test pass, and then by writing the next test, and then writing just enough code to make that pass, and so on. Tiny step by tiny step.
By the end of the day, what looked like two days of work is nearly done, with good functional test coverage. Add unit tests on the other side, as appropriate.
Replace Test with Test::Simple or Test::More as your preferences dictate.
A shout out to Andy for a fine piece of work on WWW::Mechanize, which made quick work of driving form development.
Replace
Test
withTest::Simple
orTest::More
as your preferences dictate.
Or with Test::WWW::Mechanize?
my $agent = Test::WWW::Mechanize->new();
$agent->get_ok(STARTING_URL);