Webinject(3pm) | User Contributed Perl Documentation | Webinject(3pm) |
Webinject - Perl Module for testing web services
use Webinject; my $webinject = Webinject->new(); $webinject->engine();
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 HTTP interfaces (JSP, ASP, CGI, PHP, AJAX, Servlets, HTML Forms, XML/SOAP Web Services, REST, etc), and can be used as a test harness to create a suite of [HTTP 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.
Creates an "Webinject" object.
ex.: http://proxy.company.net:3128
with authentication:
ex.: http://user:password@proxy.company.net:3128
['servername', 'portnumber', 'realm-name', 'username', 'password']
When test cases include a "postbody" directive with a "file=>..." value, and that value is a relative location, Webinject will prepend this directory path.
If not supplied, the directory containing the current test case file is prepended to any relative "file=>" values.
start the engine of webinject
The comma-delimited list of fields are as follows.
addcookie="version,name,value,path,domain,port,path_spec,secure,maxage,discard"
version - Cookie-spec version number
name - Cookie name.
value - Cookie value.
path - The URL path where the cookie is set.
domain - The domain under which the cookie is set.
port - The port on which the cookie is set.
path_spec - Boolean. Set if the cookie is valid only under 'path' or the entire domain.
secure - Boolean. If true (1), the cookie is only sent over secure connections
maxage - The time in seconds the cookie is valid for.
discard - Boolean. Do not send in future requests and destroy upon the next cookie jar save.
Note: You may need to prepend a backslash before certain reserved characters when parsing (sorry that is rather vague).
Note: Newlines (\n) are also valid boundaries and are useful when you need to use the end of the line as a boundary.
parseresponse1 Additional parameter for response parsing.
parseresponse2 Additional parameter for response parsing.
parseresponse3 Additional parameter for response parsing.
parseresponse4 Additional parameter for response parsing.
parseresponse5 Additional parameter for response parsing.
<testcases> <case id = "1" description1 = "Sample Test Case" method = "get" url = "{BASEURL}/test.jsp" verifypositive = "All tests succeded" warning = "5" critical = "15" label = "testpage" errormessage = "got error: {PARSERESPONSE}" /> </testcases>
detailed description about the syntax of testcases can be found on the Webinject homepage.
For more information about webinject visit http://www.webinject.org
Corey Goldberg, <corey@goldb.org>
Sven Nierlein, <nierlein@cpan.org>
Copyright (C) 2010 by Sven Nierlein
Copyright (C) 2004-2006 by Corey Goldberg
This library is free software; you can redistribute it under the GPL2 license.
2017-11-01 | perl v5.26.1 |