.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Webinject 3pm" .TH Webinject 3pm "2017-11-01" "perl v5.26.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Webinject \- Perl Module for testing web services .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& use Webinject; \& my $webinject = Webinject\->new(); \& $webinject\->engine(); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" WebInject is a free tool for automated testing of web applications and web services. It can be used to test individual system components that have \s-1HTTP\s0 interfaces (\s-1JSP, ASP, CGI, PHP, AJAX,\s0 Servlets, \s-1HTML\s0 Forms, \s-1XML/SOAP\s0 Web Services, \s-1REST,\s0 etc), and can be used as a test harness to create a suite of [\s-1HTTP\s0 level] automated functional, acceptance, and regression tests. A test harness allows you to run many test cases and collect/report your results. WebInject offers real-time results display and may also be used for monitoring system response times. .SH "CONSTRUCTOR" .IX Header "CONSTRUCTOR" .SS "new ( [\s-1ARGS\s0] )" .IX Subsection "new ( [ARGS] )" Creates an \f(CW\*(C`Webinject\*(C'\fR object. .IP "reporttype" 4 .IX Item "reporttype" possible values are 'standard', 'nagios', 'nagios2', 'mrtg' or 'external:' .IP "nooutput" 4 .IX Item "nooutput" suppress all output to \s-1STDOUT,\s0 create only logfiles .IP "break_on_errors" 4 .IX Item "break_on_errors" stop after the first testcase fails, otherwise Webinject would go on and execute all tests regardless of the previous case. .IP "timeout" 4 .IX Item "timeout" Default timeout is 180seconds. Timeout starts again for every testcase. .IP "useragent" 4 .IX Item "useragent" Set the useragent used in \s-1HTTP\s0 requests. Default is 'Webinject'. .IP "max_redirect" 4 .IX Item "max_redirect" Set maximum number of \s-1HTTP\s0 redirects. Default is 0. .IP "proxy" 4 .IX Item "proxy" Sets a proxy which is then used for http and https requests. .Sp .Vb 1 \& ex.: http://proxy.company.net:3128 .Ve .Sp with authentication: .Sp .Vb 1 \& ex.: http://user:password@proxy.company.net:3128 .Ve .IP "output_dir" 4 .IX Item "output_dir" Output directory where all logfiles will go to. Defaults to current directory. .IP "globalhttplog" 4 .IX Item "globalhttplog" Can be 'yes' or 'onfail'. Will log the http request and response to a http.log file. .IP "httpauth" 4 .IX Item "httpauth" Provides credentials for webserver authentications. The format is: .Sp .Vb 1 \& [\*(Aqservername\*(Aq, \*(Aqportnumber\*(Aq, \*(Aqrealm\-name\*(Aq, \*(Aqusername\*(Aq, \*(Aqpassword\*(Aq] .Ve .IP "baseurl" 4 .IX Item "baseurl" the value can be used as {\s-1BASEURL\s0} in the test cases .IP "baseurl1" 4 .IX Item "baseurl1" the value can be used as {\s-1BASEURL1\s0} in the test cases .IP "baseurl2" 4 .IX Item "baseurl2" the value can be used as {\s-1BASEURL2\s0} in the test cases .IP "standaloneplot" 4 .IX Item "standaloneplot" can be \*(L"on\*(R" or \*(L"off\*(R". Default is off. Create gnuplot graphs when enabled. .IP "graphtype" 4 .IX Item "graphtype" Defaults to 'lines' .IP "gnuplot" 4 .IX Item "gnuplot" Defines the path to your gnuplot binary. .IP "postbodybasedir" 4 .IX Item "postbodybasedir" Path to a directory from which all relative test case postbody directives are based. .Sp When test cases include a \*(L"postbody\*(R" directive with a \*(L"file=>...\*(R" value, and that value is a relative location, Webinject will prepend this directory path. .Sp If not supplied, the directory containing the current test case file is prepended to any relative \*(L"file=>\*(R" values. .SH "METHODS" .IX Header "METHODS" .SS "engine" .IX Subsection "engine" start the engine of webinject .SH "TEST CASES" .IX Header "TEST CASES" .SS "Parameters" .IX Subsection "Parameters" .IP "addcookie" 4 .IX Item "addcookie" When added to a test case, this adds a cookie to the cookie jar prior to the test case request being sent (i.e. the test case this is attached to will include any cookies specified in this parameter). This is useful for cases where a cookie is set outside of a Set-Cookie directive in the response header. This parameter takes a comma-delimited list of fields that configure the cookie; the fields for this parameter are a direct one-to-one correllation with the parameters to the HTTP::Cookies::set_cookie method. As well, multiple cookies can be defined by separating with a '|' character as with the addheader parameter. .Sp The comma-delimited list of fields are as follows. .Sp addcookie=\*(L"version,name,value,path,domain,port,path_spec,secure,maxage,discard\*(R" .Sp version \- Cookie-spec version number .Sp name \- Cookie name. .Sp value \- Cookie value. .Sp path \- The \s-1URL\s0 path where the cookie is set. .Sp domain \- The domain under which the cookie is set. .Sp port \- The port on which the cookie is set. .Sp path_spec \- Boolean. Set if the cookie is valid only under 'path' or the entire domain. .Sp secure \- Boolean. If true (1), the cookie is only sent over secure connections .Sp maxage \- The time in seconds the cookie is valid for. .Sp discard \- Boolean. Do not send in future requests and destroy upon the next cookie jar save. .IP "parseresponse" 4 .IX Item "parseresponse" Parse a string from the \s-1HTTP\s0 response for use in subsequent requests. This is mostly used for passing Session \s-1ID\s0's, but can be applied to any case where you need to pass a dynamically generated value. It takes the arguments in the format \&\*(L"leftboundary|rightboundary\*(R", and an optional third argument \*(L"leftboundary|rightboundary|escape|decode\*(R" when you want to force escaping of all non-alphanumeric characters (in case there is a wrong configuration of Apache server it will push encoded \s-1HTML\s0 characters (/ = /, : = :, ... ) to the Webinject and decode serve to translate them into normal characters. See the \*(L"Session Handling and State Management \- Parsing Response Data & Embedded Session \s-1ID\s0's\*(R" section of this manual for details and examples on how to use this parameter. .Sp Note: You may need to prepend a backslash before certain reserved characters when parsing (sorry that is rather vague). .Sp Note: Newlines (\en) are also valid boundaries and are useful when you need to use the end of the line as a boundary. .Sp parseresponse1 Additional parameter for response parsing. .Sp parseresponse2 Additional parameter for response parsing. .Sp parseresponse3 Additional parameter for response parsing. .Sp parseresponse4 Additional parameter for response parsing. .Sp parseresponse5 Additional parameter for response parsing. .SH "EXAMPLE TEST CASE" .IX Header "EXAMPLE TEST CASE" .Vb 10 \& \& \& .Ve .PP detailed description about the syntax of testcases can be found on the Webinject homepage. .SH "SEE ALSO" .IX Header "SEE ALSO" For more information about webinject visit http://www.webinject.org .SH "AUTHOR" .IX Header "AUTHOR" Corey Goldberg, .PP Sven Nierlein, .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright (C) 2010 by Sven Nierlein .PP Copyright (C) 2004\-2006 by Corey Goldberg .PP This library is free software; you can redistribute it under the \s-1GPL2\s0 license.