WWW::Webrobot::SelftestRunner - Start httpd and run a test plan
use WWW::Webrobot::SelftestRunner qw/RunTestplan HttpdEcho Config/; exit RunTestplan(HttpdEcho, Config(qw/Test/, $test_plan); exit RunTestplan(HttpdEcho, Config(qw/Test Html/, $test_plan);
see also t/get.t
This package serves some functions to start a http daemon and run a test plan. It is only used for the test in the t/... directory.
t/...
Run a WWW::Webrobot::StupidHTTPD http daemon implementing $serverfunc. Then run a WWW::Webrobot http client using the configuration $config and the testplan $testplan.
WWW::Webrobot::StupidHTTPD
$serverfunc
WWW::Webrobot
$config
$testplan
A simple server function for the WWW::Webrobot::StupidHTTPD http daemon. It read the requested url http://server:port/action/anyting_else as an action where the action is denoted by the action part within the url. The result of the action is returned as content in the response. Actions are
http://server:port/action/anyting_else
action
url echo the url as response content content echo the content in the request as response content method echo the method in the request as response content headers echo a stringified form of the request headers as response content
Simple config string for WWW::Webrobot::Print::* output. Defaults to "Test" if no parameter is given.
WWW::Webrobot::Print::*
Example:
my $cfg = Config(qw/Html Test/); my $cfg = Config;
To install WWW::Webrobot, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Webrobot
CPAN shell
perl -MCPAN -e shell install WWW::Webrobot
For more information on module installation, please visit the detailed CPAN module installation guide.