Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP
In directory usw-pr-cvs1:/tmp/cvs-serv30388/lib/HTTP
Modified Files:
WebTest.pm
Log Message:
Regenerated
Index: WebTest.pm
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest.pm,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** WebTest.pm 21 Jun 2002 06:48:16 -0000 1.21
--- WebTest.pm 22 Jun 2002 20:07:37 -0000 1.22
***************
*** 52,61 ****
=head1 DESCRIPTION
- =head2 Beta software warning
-
- THIS IS A BETA VERSION THAT IS A REWRITE OF VERSION 1.07 AND IS
- PROBABLY NOT AS WELL DEBUGGED AS VERSION 1.07. Version 1.07 can be
- downloaded at http://search.cpan.org/search?dist=HTTP-WebTest-1.07
-
=head2 Introduction
--- 52,55 ----
***************
*** 280,296 ****
Double quotes mean that Perl metasymbols are interpreted: "\n\t" is a
newline and a tab. Double quoted strings can also contain Perl
! variables to be expanded: "$var" is string which contains value of
! Perl variable C<$var>. Perl variables can be defined by plugin
! modules or in code sections described below.
!
! Also it is possible to specify Perl code instead of scalar, instead of
! list parameter value or instead of element of list paramater. Curly
! brackets are used to denote Perl code inside wtscript files. This
! code will be evaluated during test run.
C<HTTP::WebTest> compiles this Perl code as anonymous subroutines
! which are called during test run when value of corresponding test
! parameters are required. When these subroutines are called
! C<HTTP::WebTest> object is passed to them.
Some examples of syntax:
--- 274,290 ----
Double quotes mean that Perl metasymbols are interpreted: "\n\t" is a
newline and a tab. Double quoted strings can also contain Perl
! variables that will be evaluated by Perl. For example, if the variable
! $myvar contains the string 'foobar', "$myvar" will be replaced by foobar
! at runtime. Perl variables can be defined by plugin
! modules or in code sections in the parameter file as described below.
+ It is also possible to specify a Perl expression in place of a scalar
+ value, one of a list parameter's values or an entire list. Curly
+ brackets are used to denote Perl code inside wtscript files.
C<HTTP::WebTest> compiles this Perl code as anonymous subroutines
! which are called when value of corresponding test
! parameters are required. These subroutines are called in an object-oriented
! fashion, so the
! C<HTTP::WebTest> object is passed to them as the first argument.
Some examples of syntax:
***************
*** 299,306 ****
name = { 1 + 1 }
! # list value (Perl code should return array reference)
! name = { [ a => 'b', c => 'd' ] }
!
! # element of list value
name = (
'first value'
--- 293,297 ----
name = { 1 + 1 }
! # element of a list
name = (
'first value'
***************
*** 308,311 ****
--- 299,305 ----
)
+ # entire list (must be a reference to an array)
+ name = { [ a => 'b', c => 'd' ] }
+
# accessing HTTP::WebTest object
name = { my $webtest = shift; ..... }
***************
*** 375,390 ****
=head2 Calling HTTP::WebTest from a Perl program
! If you are using Perl API of C<HTTP::WebTest> then the test parameters
! can be defined in form of array of hashes.
! Each hash in array defines tests for one URL or local web file. Keys
! in hashes are test parameter names and values in hashes are values of
! test parameters. Additionally, optional global test parameters can be
passed in a hash passed as the second argument.
! Instead of test parameter values subroutine references can be
! specified. Referenced subroutines are called during test run when
! values of corresponding test parameters are required. When called
! these subroutines get C<HTTP::WebTest> object passed to them.
Tests can be run as
--- 369,385 ----
=head2 Calling HTTP::WebTest from a Perl program
! If you are using the Perl API of C<HTTP::WebTest>, the test parameters
! can be defined as an array of hashes.
! Each hash in the array defines tests for one URL or local web file. Keys
! in the hashes are test parameter names and values in hashes are values of
! test parameters. Optional global test parameters can be
passed in a hash passed as the second argument.
! Subroutine references can be specified instead of test parameter values.
! Referenced subroutines are called during test run when
! values of corresponding test parameters are required. These subroutines are
! called in an object-oriented fashion, so the C<HTTP::WebTest> object is passed
! as the first argument.
Tests can be run as
***************
*** 433,436 ****
--- 428,434 ----
=head2 Core Plugin Modules
+ C<HTTP::WebTest> is implemented in a modular structure that allows programmers
+ to easily add modules to run additional tests or define additional simple
+ tests without writing a module.
C<HTTP::WebTest> provides a number of core plugin modules which are
loaded by default:
***************
*** 440,482 ****
=item L<HTTP::WebTest::Plugin::Apache|HTTP::WebTest::Plugin::Apache>
! This plugin provides support for local web file test mode.
=item L<HTTP::WebTest::Plugin::ContentSizeTest|HTTP::WebTest::Plugin::ContentSizeTest>
! This plugin provides size checks of HTTP response bodies.
=item L<HTTP::WebTest::Plugin::Cookies|HTTP::WebTest::Plugin::Cookies>
! This plugin provides means to control sending and recieve cookies.
=item L<HTTP::WebTest::Plugin::DefaultReport|HTTP::WebTest::Plugin::DefaultReport>
! Default test report plugin.
=item L<HTTP::WebTest::Plugin::Loader|HTTP::WebTest::Plugin::Loader>
! This plugin allows to load external plugin modules.
=item L<HTTP::WebTest::Plugin::ResponseTimeTest|HTTP::WebTest::Plugin::ResponseTimeTest>
! This plugin provides support for response time tests.
=item L<HTTP::WebTest::Plugin::SetRequest|HTTP::WebTest::Plugin::SetRequest>
! This plugin initializes test HTTP requests.
=item L<HTTP::WebTest::Plugin::StatusTest|HTTP::WebTest::Plugin::StatusTest>
! This plugin checks HTTP response statuses.
=item L<HTTP::WebTest::Plugin::TextMatchTest|HTTP::WebTest::Plugin::TextMatchTest>
! This plugin provides test parameters which allow to check body of HTTP
! responses.
=back
Information about test parameters supported by core plugins is
! summarized below in section L<TEST PARAMETERS|TEST PARAMETERS>.
=head2 Other Plugin Modules Bundled With HTTP::WebTest
--- 438,480 ----
=item L<HTTP::WebTest::Plugin::Apache|HTTP::WebTest::Plugin::Apache>
! This plugin supports testing web files using a local instance of Apache.
=item L<HTTP::WebTest::Plugin::ContentSizeTest|HTTP::WebTest::Plugin::ContentSizeTest>
! This plugin checks the size of the fetched web page.
=item L<HTTP::WebTest::Plugin::Cookies|HTTP::WebTest::Plugin::Cookies>
! This plugin controls sending and receiving cookies.
=item L<HTTP::WebTest::Plugin::DefaultReport|HTTP::WebTest::Plugin::DefaultReport>
! This plugin manages the test report.
=item L<HTTP::WebTest::Plugin::Loader|HTTP::WebTest::Plugin::Loader>
! This plugin supports adding external plugin modules.
=item L<HTTP::WebTest::Plugin::ResponseTimeTest|HTTP::WebTest::Plugin::ResponseTimeTest>
! This plugin tests the response times of the web server.
=item L<HTTP::WebTest::Plugin::SetRequest|HTTP::WebTest::Plugin::SetRequest>
! This plugin initializes the HTTP requests.
=item L<HTTP::WebTest::Plugin::StatusTest|HTTP::WebTest::Plugin::StatusTest>
! This plugin checks the status of the HTTP responses.
=item L<HTTP::WebTest::Plugin::TextMatchTest|HTTP::WebTest::Plugin::TextMatchTest>
! This plugin tests whether the content of the HTTP response matches or doesn't
! match selected text or regular expressions.
=back
Information about test parameters supported by core plugins is
! summarized below in the section L<TEST PARAMETERS|TEST PARAMETERS>.
=head2 Other Plugin Modules Bundled With HTTP::WebTest
***************
*** 490,511 ****
=item L<HTTP::WebTest::Plugin::Click|HTTP::WebTest::Plugin::Click>
! This plugin allows to use names of links and button on HTML pages to
! build test requests.
=item L<HTTP::WebTest::Plugin::Delay|HTTP::WebTest::Plugin::Delay>
! This plugin module allows to add pauses before running specific tests
! in test sequence.
=item L<HTTP::WebTest::Plugin::HarnessReport|HTTP::WebTest::Plugin::HarnessReport>
! This report plugin can generate L<Test::Harness|Test::Harness>
! compatible test reports.
=item L<HTTP::WebTest::Plugin::Hooks|HTTP::WebTest::Plugin::Hooks>
! This plugin allows to define callback test parameters which are
! evaluated at specific time of C<HTTP::WebTest> test run. These test
! parameters can define user-defined checks.
=back
--- 488,508 ----
=item L<HTTP::WebTest::Plugin::Click|HTTP::WebTest::Plugin::Click>
! This plugin supports using names of links and buttons on HTML pages to
! build additional tests.
=item L<HTTP::WebTest::Plugin::Delay|HTTP::WebTest::Plugin::Delay>
! This plugin module allows the user to specify pauses in the test sequence.
=item L<HTTP::WebTest::Plugin::HarnessReport|HTTP::WebTest::Plugin::HarnessReport>
! This report plugin can generate test reports that are compatible with
! L<Test::Harness|Test::Harness>.
=item L<HTTP::WebTest::Plugin::Hooks|HTTP::WebTest::Plugin::Hooks>
! This plugin allows the user to define callback parameters that are
! evaluated at runtime. This allows the user to define additional tests
! without writing a plugin module.
=back
***************
*** 516,536 ****
=head2 Writing Plugin Modules
! L<perldoc HTTP::WebTest::Plugins|HTTP::WebTest::Plugins> contains
! information needed for L<HTTP::WebTest|HTTP::WebTest> plugin
! developers.
=head1 TEST PARAMETERS
! Most parameters can be used both as global and as test block
! parameters. If you specify such parameter as global its value applies
! to all test blocks. Value of parameter specified as global can be
! overriden individually in each test block by specifying this parameter
! with different values in test blocks.
Parameters marked as I<GLOBAL PARAMETER> can be used only as global
! and it cannot be overriden in test blocks.
Parameters marked as I<NON-CORE PARAMETER> are defined in add-on
! plugin modules which must be loaded explicitly using test parameter
C<plugins>.
--- 513,532 ----
=head2 Writing Plugin Modules
! See L<perldoc HTTP::WebTest::Plugins|HTTP::WebTest::Plugins> for
! information about writing L<HTTP::WebTest|HTTP::WebTest> plugin modules.
=head1 TEST PARAMETERS
! Most parameters can be used as both global and test block
! parameters. If you specify such parameter outside a test block, that value
! is the default value for all test blocks. The global value can be
! overriden in each test block by specifying the parameter within the test
! block.
Parameters marked as I<GLOBAL PARAMETER> can be used only as global
! and cannot be overriden in test blocks.
Parameters marked as I<NON-CORE PARAMETER> are defined in add-on
! plugin modules which must be loaded explicitly using the parameter
C<plugins>.
***************
*** 631,635 ****
Given name of submit button (i.e. C<<input type="submit"E<gt>> tag
! inside of C<<formE<gt>> tag) on previosly requested HTML page builds
test request to the submitted page.
--- 627,631 ----
Given name of submit button (i.e. C<<input type="submit"E<gt>> tag
! inside of C<<formE<gt>> tag) on previosly requested HTML page, builds
test request to the submitted page.
***************
*** 646,650 ****
Given name of link (i.e. C<<aE<gt>> tag) on previosly requested HTML
! page builds test request to the linked page.
=head3 Example
--- 642,646 ----
Given name of link (i.e. C<<aE<gt>> tag) on previosly requested HTML
! page, builds test request to the linked page.
=head3 Example
***************
*** 801,805 ****
=head3 Usage in Perl scripts
! Use arrayref of arrayrefs containing cookies to pass with the HTTP
request.
--- 797,801 ----
=head3 Usage in Perl scripts
! Use an arrayref of arrayrefs containing cookies to pass with the HTTP
request.
***************
*** 811,819 ****
I<GLOBAL PARAMETER>
! This parameter defines if default report plugin should be used for
test report creation. Value C<yes> means that default report plugin
! should be used, value C<no> means that it should not. It can be
! useful if it is desired to use another non-default report for creation
! of test report. It can be used to disable any output at all also
(i.e. if this parameter has value C<no> and no other report plugins
are loaded).
--- 807,814 ----
I<GLOBAL PARAMETER>
! This parameter controls whether the default report plugin is used for
test report creation. Value C<yes> means that default report plugin
! will be used, value C<no> means that it will not.
! It can also be used to disable all output
(i.e. if this parameter has value C<no> and no other report plugins
are loaded).
***************
*** 831,836 ****
I<NON-CORE PARAMETER> from L<HTTP::WebTest::Plugin::Delay>
! This is a scalar parameter which defines duration of pause (in
! seconds) before running test.
=head3 Allowed values
--- 826,830 ----
I<NON-CORE PARAMETER> from L<HTTP::WebTest::Plugin::Delay>
! Duration of pause (in seconds) before running test.
=head3 Allowed values
***************
*** 840,846 ****
=head2 end_test
! It is not really test parameter but a part of
L<wtscript format|Running HTTP::WebTest using a parameter file>.
! It marks end of test block.
=head2 error_log
--- 834,840 ----
=head2 end_test
! This is not really a parameter, it is part of
L<wtscript format|Running HTTP::WebTest using a parameter file>.
! It marks the end of test block.
=head2 error_log
***************
*** 1054,1059 ****
I<NON-CORE PARAMETER> from L<HTTP::WebTest::Plugin::Hooks>
! Value of this test parameter is ignored. However it is evaluted
! before test request to web page is done so it is useful to do some
initalization before the request.
--- 1048,1053 ----
I<NON-CORE PARAMETER> from L<HTTP::WebTest::Plugin::Hooks>
! The value of this test parameter is ignored. However, it is evaluted
! before the HTTP request is done, so it can be used to do
initalization before the request.
***************
*** 1063,1070 ****
This is a list parameter which is treated as test result. It is
! evaluted when response for the test request is received.
! It can be useful to define custom tests without writing new plugins
! and/or it can be useful to run some code when response for the test
request is received.
--- 1057,1064 ----
This is a list parameter which is treated as test result. It is
! evaluted when the HTTP response for the test request is received.
! It can be used to define custom tests without writing new plugins.
! It can also be used to run some code when the HTTP response for the test
request is received.
***************
*** 1076,1082 ****
YESNON, COMMENTN )
! Here C<YESNO>, C<COMMENT> - is a test result. C<YESNO> - is either
C<yes> if test is successful or C<no> if it is not. C<COMMENT> is a
! text of comment associated with this test.
=head3 Example
--- 1070,1076 ----
YESNON, COMMENTN )
! Here C<YESNO>, C<COMMENT> is a test result. C<YESNO> is either
C<yes> if test is successful or C<no> if it is not. C<COMMENT> is a
! comment associated with this test.
=head3 Example
***************
*** 1088,1092 ****
I<GLOBAL PARAMETER>
! A reference on scalar which accumulates text of test report. If this
test parameter is specified then value of test parameter C<fh_out> is
ignore.
--- 1082,1086 ----
I<GLOBAL PARAMETER>
! A reference to a scalar that accumulates text of test report. If this
test parameter is specified then value of test parameter C<fh_out> is
ignore.
***************
*** 1126,1131 ****
A list of module names. Loads these modules and registers them as
! L<HTTP::WebTest|HTTP::WebTest> plugins. If name of plugin starts with
! C<::> prepends it with C<HTTP::WebTest::Plugin>. So
plugins = ( ::Click )
--- 1120,1125 ----
A list of module names. Loads these modules and registers them as
! L<HTTP::WebTest|HTTP::WebTest> plugins. If the name of the plugin starts with
! C<::>, it is prepended with C<HTTP::WebTest::Plugin>. So
plugins = ( ::Click )
***************
*** 1248,1256 ****
=head2 test_name
! Name associated with this url in the test report and error messages.
=head2 text_forbid
! List of text strings that are forbidden to use exist in the returned
page.
--- 1242,1250 ----
=head2 test_name
! Name associated with this URL in the test report and error messages.
=head2 text_forbid
! List of text strings that are forbidden to exist in the returned
page.
***************
*** 1259,1263 ****
=head2 text_require
! List of text strings that are required to use exist in the returned
page.
--- 1253,1257 ----
=head2 text_require
! List of text strings that are required to exist in the returned
page.
***************
*** 1328,1335 ****
This module have been tested only on Unix (e.g., Solaris, Linux, AIX,
! etc.) but it should work on Win32 systems.
!
! Local file tests don't work on Win32 systems.
!
The module's HTTP requests time out after 3 minutes (the default value
for L<LWP::UserAgent|LWP::UserAgent>). If the C<file_path> parameter is
--- 1322,1327 ----
This module have been tested only on Unix (e.g., Solaris, Linux, AIX,
! etc.) but it should work on Win32 systems. (Exception: local file tests
! don't work on Win32 systems.)
The module's HTTP requests time out after 3 minutes (the default value
for L<LWP::UserAgent|LWP::UserAgent>). If the C<file_path> parameter is
***************
*** 1338,1356 ****
=head1 AUTHORS
! Richard Anderson <ri...@ri...> have wrote
! C<HTTP::WebTest 1.xx>.
! Ilya Martynov <il...@ma...> made rewrite of
! C<HTTP::WebTest>. New version of C<HTTP::WebTest> have introduced
! extended API and plugin based architecture.
! Please don't email authors directly. Use C<HTTP::WebTest> maillists.
=head1 SUPPORT
! Please email bug reports, suggestions, questions, etc. to
! C<HTTP::WebTest> maillist
! C<htt...@li...>. You can sign up at
http://lists.sourceforge.net/lists/listinfo/http-webtest-general.
=head1 COPYRIGHT
--- 1330,1349 ----
=head1 AUTHORS
! Richard Anderson <ri...@ri...> wrote
! C<HTTP::WebTest 1.xx>, using some ideas from the CPAN Monkeywrench module.
! Ilya Martynov <il...@ma...> implemented the plug-in concept, the
! extended API and completely rewrote C<HTTP::WebTest>.
! Please don't email authors directly. Use the SourceForge
! C<HTTP::WebTest> mail list (see SUPPORT, next section).
=head1 SUPPORT
! Please email bug reports, suggestions, questions, etc. to the SourceForge
! C<HTTP::WebTest> maillist.
! You can sign up at
http://lists.sourceforge.net/lists/listinfo/http-webtest-general.
+ The email address is C<htt...@li...>.
=head1 COPYRIGHT
|