X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FTest%2FWWW%2FSelenium%2FCatalyst.pm;h=007f21d7788c3611a494ffd17cac4fa34942ce3d;hb=6fd21f2e2ec59ca395b4a322fc3c0d47a3cf9710;hp=3edf014d02e2feb42f31fd19986b35e2a514d91f;hpb=4f6d213e1b66ba3fd93ce439309af5857775a143;p=catagits%2FTest-WWW-Selenium-Catalyst.git diff --git a/lib/Test/WWW/Selenium/Catalyst.pm b/lib/Test/WWW/Selenium/Catalyst.pm index 3edf014..007f21d 100644 --- a/lib/Test/WWW/Selenium/Catalyst.pm +++ b/lib/Test/WWW/Selenium/Catalyst.pm @@ -19,12 +19,27 @@ my $app_pid; # pid of myapp server =head1 NAME -Test::WWW::Selenium::Catalyst - Test your Catalyst app with Selenium +Test::WWW::Selenium::Catalyst - Test your Catalyst application with Selenium =cut our $VERSION = '0.00_01'; +=head1 DEVELOPER RELEASE + +This is a developer release. It's working for me in production, but +it depends on a Java application (SeleniumRC), which can be +unreliable. On my Debian system, I had to put C in my +path, and add C to C. Every distro +and OS is different, so I'd like some feedback on how this works on +your system. I would like to find a clean solution that lets this +module "Just Work" for everyone, but I have a feeling that it's going +to look more like C and so +on. I can live with that, but I need your help to get to that stage! + +Please report any problems to RT, the Catalyst mailing list, or the +#catalyst IRC channel on L. Thanks! + =head1 SYNOPSIS use Test::WWW::Selenium::Catalyst 'MyApp'; @@ -34,6 +49,11 @@ our $VERSION = '0.00_01'; $sel->open_ok('/'); $sel->is_text_present_ok('Welcome to MyApp'); +This module starts the SeleniumRC server and your Catalyst app so that +you can test it with SeleniumRC. Once you've called +C<< Test::WWW::Selenium::Catalyst->start >>, everything is just like +L. + =head1 FUNCTIONS =head2 start @@ -60,7 +80,7 @@ sub _start_server { my $pid; if(0 == ($pid = fork())){ local $SIG{TERM} = sub { - diag("Selenium server $$ going down (TERM)"); + diag("Selenium server $$ going down (TERM)") if $DEBUG; exit 0; }; @@ -69,7 +89,7 @@ sub _start_server { if(!$DEBUG){ close *STDERR; close *STDOUT; - close *STDIN; + #close *STDIN; } diag("Selenium running in $$") if $DEBUG; @@ -186,6 +206,24 @@ statement: C is the name of your Catalyst app. +=head1 SEE ALSO + +=over 4 + +=item * + +Selenium website: L + +=item * + +Description of what you can do with the C<$sel> object: L + +=item * + +If you don't need a real web browser: L + +=back + =head1 AUTHOR Jonathan Rockway, C<< >> @@ -228,6 +266,8 @@ L =head1 ACKNOWLEDGEMENTS +Thanks for mst for getting on my case to actually write this thing :) + =head1 COPYRIGHT & LICENSE Copyright 2006 Jonathan Rockway, all rights reserved.