WWW::Webrobot::pod::Config - How to configure Webrobot
names=server=google.de names=port=4321 names=application=http://${server}:${port}/app # alternate forms auth_basic=,site-authentification,mylogin,secretpassword auth_basic=|site-authentification|mylogin|secretpassword auth_basic=/site-authentification/mylogin/secretpassword #output=WWW::Webrobot::Print::MakeTestplan #output=WWW::Webrobot::Print::Text output=WWW::Webrobot::Print::Test output.1=WWW::Webrobot::Print::Html #output=WWW::Webrobot::Print::File 'dir' => 'diff_new', 'diff_mode' => 'diff_orig' #output=WWW::Webrobot::Print::File 'dir' => 'diff_orig' timeout=500 client_302_bug=1 #delay=1 referrer_bug=1 http_header=Accept-Language=de http_header=new-header-element=something else proxy=http=http://httpproxy.server.org:8888 proxy=https=http://httpproxy.server.org:8888 no_proxy=localhost no_proxy=127.0.0.1 no_proxy=subnet.server.org load.number_of_clients=2 load.base=1.77827941003892 load.scale=40 load.output_file=WEBROBOT_OUT mail.condition=never mail.server=mailserver.server.org mail.timeout=60 mail.Return-Path=me@mail.org mail.From=webrobot mail.To=me@mail.org mail.Reply-To=me@mail.org mail.Cc=some@other.com, some@more.com mail.Bcc=some@other.com, some@more.com mail.Subject=Webrobot: Perl test mail Ümläüte mail.Type=text/plain mail.Encoding=quoted-printable mail.Data=blabla\n\ This is the body of the test mail\n\ umlauts are äöü\n mail.Attach=|text/plain|filename.txt
You must spend Webrobot a config file. The config file may define proxies, HTTP header, names for a testplan and much more. It's just like configuring your WWW browser.
All properties obey the syntax
property_name=property_value property_name: property_value
There may be blanks or tabs around the delimiters = and :. Lines ending in '\' are joined with the next line. Lines containing white space are ignored. Lines starting in '#' are comments.
=
:
The property_value itself is typed. The types are:
property_value
a plain string (see timout)
timout
a key=value pair (see names)
key=value
names
a list: The first character is the delimiter (see auth_basic).
auth_basic
All property_names that are marked @ accept listmode (see auth_basic, proxy). This means you can define multiple property_names. Non-listmode property_names should be defined only once.
property_name
@
proxy
The key defines a name, the value its value. The key can be used within a testplan as ${key} and will be substituted as value.
key
value
${key}
Names can be used immediately in the names section.
names = host=google.de application: http://${host}:9999/app
Define authorization data. Webrobot can authorize at a webserver.
Select an authorized page in any browser. Then a popup window will appear, saying something like site-authentification and showing a form with login and password fields. Thats the date to put into the configuration file.
site-authentification
auth_basic=|site-authentification|mylogin|secretpassword
Define output listeners. Each listener will be called for any http request. The most popular listeners are WWW::Webrobot::Print::Test for Test::Harness output and WWW::Webrobot::Print::Html for HTML output.
output=WWW::Webrobot::Print::Test output=WWW::Webrobot::Print::Html
See WWW::Webrobot::pod::OutputListeners
A request will be tried timeout seconds. Any request will fail, if timed out. Default as in LWP::UserAgent.
timeout
timeout=500
This option emulates a very common bug of popular www browsers concerning http response 302. This bug is so common that even many servers rely on it. If you do not set this value you are HTTP compliant, if you set it you are compliant to popular browsers.
client_302_bug=1
see "client_302_bug" in WWW::Webrobot::MyUserAgent
Webrobot will sleep between request for delay seconds. If this option is missing Webrobot won't sleep at all.
delay
delay=1
When sending http referrers the url to be sent must be normalized according to the HTTP spec, see the HTTP::Headers::referer. However - many clients (e.g. Firefox) don't do that right but send the unnormalized url. Set this option if you want Webrobot to behave in the same way.
HTTP::Headers::referer
referrer_bug=1
Set additional HTTP headers. You may write '_' instead of '-' as in user_agent instead of user-agent.
user_agent
user-agent
http_header=Accept-Language=de user_agent=Webrobot 9.7 Platin limited
Define your proxy servers.
proxy=http=http://httpproxy.server.org:8888
Define servers or domains that mustn't be requested via proxies.
no_proxy=localhost no_proxy=localnet.com
The load.* properties are evaluated in webrobot-load only. load.number is the number of emulated clients. Each client is one process and processes the same test plan.
load.*
load.number
load.number_of_clients=2
Logarithmic base for x-axis for histogram. Load tests show an ASCII art histogram. All response times are categorized into an intervall. The intervalls are logarithmic and increase by a factor load.base. Popular values of load.base are 2, sqrt(2), sqrt(sqrt(10)) (Float numbers only, no expressions).
load.base
2
sqrt(2)
sqrt(sqrt(10))
load.base=1.77827941003892
Y-axis scale of the histogram, should be smaller than your xterm width
load.scale=40
If you specify load.output than any output will additionally written to the named file
load.output
load.output_file=WEBROBOT_OUT
The condition that triggers writing mail. Values are
fail (default) success ever never (default if no mail.* attribute is given) mail.condition=never
The name of the mail server
mail.server=my.mail.server.org
Timeout in seconds when sending mail
mail.timeout=60
No attempt is made to resend the mail if sending mail fails.
Attach files to the mail, multiple attachments are ok.
mail.Attach=|text/plain|filename.txt mail.Attach=|text/html|anotherfilename.html
Additional parameters for sending mail. All parameters are of type (value) See "SYNOPSIS" or MIME::Lite if you feel it is not self explanatory.
# fields for MIME::Lite, ignores case on left hand side mail.Return-Path mail.From mail.To mail.Reply-To mail.Cc mail.Bcc mail.Subject mail.Type mail.Encoding mail.Data
The maximum number of errors (originated from assertions) where Webrobot should exit. No effekt if "0", "" or missing.
WWW::Webrobot::pod::Testplan
WWW::Webrobot::pod::OutputListeners
WWW::Webrobot
Stefan Trcek
Copyright(c) 2004 ABAS Software AG
This software is licensed under the perl license, see LICENSE file.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Ümläüte'. Assuming CP1252
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.