The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WWW::Webrobot - Run Testplans

SYNOPSIS

 use WWW::Webrobot;
 WWW::Webrobot -> new($cfg) -> run($test_plan);

configures Webrobot with $cfg, reads a testplan and executes this plan

DESCRIPTION

Runs a testplan according to a configuration.

METHODS

$wr = WWW::Webrobot -> new( $cfg_name, $cmd_param );

Construct an object.

 $cfg_name
     SCLAR: config string
     REF  : Name of the config file
 $cmd_param
     ??? to be documented

Example: $wr = WWW::Webrobot->new(\"configfile.cfg"); $wr = WWW::Webrobot->new(<<EOF); names=first=value names=second=another value EOF

$wr -> cfg();

Get the config data.

$wr -> cfg($cfg_name, $cmd_properties);

Read in the config data from a file named $cfg. Add all properties in $cmd_properties. $cmd_properties is a ref to a list of key/value pairs.

Example: $cmd_properties = [[key0, value0], [key1, value1], ...];

Note: Currently $cfg_name may also be a (internal) hash. It is needed for webrobot-load but is declared deprecated.

$wr -> run($test_plan);
$test_plan

Read in the testplan from a file $test_plan and run it. If $test_plan is SCALAR it is taken as a string, if $test_plan is a reference it is taken as a file name.

Example: $wr->run(\"xml_file.xml"); $wr->run(<<EOF); <?xml version="1.0" encoding="iso-8859-1"?> <plan> <request> <method value='POST'/> <url value='${application}/content'/> </request> </plan> EOF

SEE ALSO

WWW::Webrobot::pod::Config

WWW::Webrobot::pod::Testplan