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.
Webinject
possible values are 'standard', 'nagios', 'nagios2', 'mrtg' or 'external:'
suppress all output to STDOUT, create only logilfes
stop after the first testcase fails, otherwise Webinject would go on and execute all tests regardless of the previous case.
Default timeout is 180seconds. Timeout starts again for every testcase.
Set the useragent used in HTTP requests. Default is 'Webinject'.
Set maximum number of HTTP redirects. Default is 0.
Sets a proxy which is then used for http and https requests.
Output directory where all logfiles will go to. Defaults to current directory.
Can be 'yes' or 'onfail'. Will log the http request and response to a http.log file.
Provides credentials for webserver authentications. The format is:
['servername', 'portnumber', 'realm-name', 'username', 'password']
the value can be used as {BASEURL} in the test cases
the value can be used as {BASEURL1} in the test cases
the value can be used as {BASEURL2} in the test cases
can be "on" or "off". Default is off. Create gnuplot graphs when enabled.
Defaults to 'lines'
Defines the path to your gnuplot binary.
start the engine of webinject
<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.
To install Webinject, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Webinject
CPAN shell
perl -MCPAN -e shell install Webinject
For more information on module installation, please visit the detailed CPAN module installation guide.