http-webtest-commits Mailing List for HTTP-WebTest (Page 23)
Brought to you by:
m_ilya,
richardanderson
You can subscribe to this list here.
2002 |
Jan
(38) |
Feb
(83) |
Mar
(10) |
Apr
(28) |
May
(42) |
Jun
(61) |
Jul
(43) |
Aug
(42) |
Sep
(14) |
Oct
(27) |
Nov
(16) |
Dec
(81) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(81) |
Feb
(29) |
Mar
(32) |
Apr
(42) |
May
(3) |
Jun
|
Jul
(11) |
Aug
|
Sep
(33) |
Oct
(6) |
Nov
(4) |
Dec
|
2004 |
Jan
|
Feb
|
Mar
(10) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Ilya M. <m_...@us...> - 2002-05-15 19:26:45
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t/test.out In directory usw-pr-cvs1:/tmp/cvs-serv7542/t/test.out Modified Files: borked7.err Log Message: Minor fixes Index: borked7.err =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/test.out/borked7.err,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** borked7.err 8 Feb 2002 14:06:16 -0000 1.2 --- borked7.err 15 May 2002 19:26:43 -0000 1.3 *************** *** 1,5 **** HTTP::WebTest: wtscript parsing error Line 3: Eval error ! Bareword "code" not allowed while "strict subs" in use at (eval NN) line 2. near --- 1,5 ---- HTTP::WebTest: wtscript parsing error Line 3: Eval error ! Bareword "code" not allowed while "strict subs" in use at (eval NN) line N. near |
From: Ilya M. <m_...@us...> - 2002-05-15 19:26:29
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory usw-pr-cvs1:/tmp/cvs-serv7440/t Modified Files: simple.wt 06-parser.t Log Message: Update tests for new syntax rules Index: simple.wt =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/simple.wt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** simple.wt 12 Feb 2002 11:48:21 -0000 1.6 --- simple.wt 15 May 2002 19:26:26 -0000 1.7 *************** *** 25,34 **** 'test $a' 'test @a' - "test $a" - "test @a" "test \$a" "\$a" ! "\\$a" ! "\\\$a") regex_forbid = ( More = tests Some @#$%^&* chars --- 25,33 ---- 'test $a' 'test @a' "test \$a" + "test \@a" "\$a" ! "\\\$a" ! "$test1") regex_forbid = ( More = tests Some @#$%^&* chars Index: 06-parser.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/06-parser.t,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** 06-parser.t 12 Feb 2002 13:17:13 -0000 1.11 --- 06-parser.t 15 May 2002 19:26:26 -0000 1.12 *************** *** 18,21 **** --- 18,28 ---- # supported syntax) { + { + package HTTP::WebTest::PlayGround; + use vars qw($test1); + + $test1 = 'AAA'; + } + my $filename = shift; *************** *** 28,32 **** ok($tests->[0]{auth}[0] eq 'name'); ok($tests->[0]{auth}[1] eq 'value'); ! ok(@{$tests->[0]{regex_require}} == 12); ok($tests->[0]{regex_require}[0] eq 'Quoted text " test'); ok($tests->[0]{regex_require}[1] eq 'We can => quote \''); --- 35,39 ---- ok($tests->[0]{auth}[0] eq 'name'); ok($tests->[0]{auth}[1] eq 'value'); ! ok(@{$tests->[0]{regex_require}} == 11); ok($tests->[0]{regex_require}[0] eq 'Quoted text " test'); ok($tests->[0]{regex_require}[1] eq 'We can => quote \''); *************** *** 35,44 **** ok($tests->[0]{regex_require}[4] eq 'test $a'); ok($tests->[0]{regex_require}[5] eq 'test @a'); ! ok($tests->[0]{regex_require}[6] eq 'test $a'); ! ok($tests->[0]{regex_require}[7] eq 'test @a'); ! ok($tests->[0]{regex_require}[8] eq 'test \\$a'); ! ok($tests->[0]{regex_require}[9] eq '\\$a'); ! ok($tests->[0]{regex_require}[10] eq '\\$a'); ! ok($tests->[0]{regex_require}[11] eq '\\\\$a'); ok($tests->[0]{url} eq 'www.dot.com'); ok(@{$tests->[0]{regex_forbid}} == 6); --- 42,50 ---- ok($tests->[0]{regex_require}[4] eq 'test $a'); ok($tests->[0]{regex_require}[5] eq 'test @a'); ! ok($tests->[0]{regex_require}[6]() eq 'test $a'); ! ok($tests->[0]{regex_require}[7]() eq 'test @a'); ! ok($tests->[0]{regex_require}[8]() eq '$a'); ! ok($tests->[0]{regex_require}[9]() eq '\\$a'); ! ok($tests->[0]{regex_require}[10]() eq 'AAA'); ok($tests->[0]{url} eq 'www.dot.com'); ok(@{$tests->[0]{regex_forbid}} == 6); *************** *** 61,74 **** ok($tests->[1]{cookie}[0][2] eq 'This is the cookie value'); ok($tests->[1]{cookie}[1][1] eq 'webtest1'); ! my $sub = $tests->[2]{test_name}; ! ok($sub->() eq 'Some evals are here'); ! $sub = $tests->[2]{file}; ! ok($sub->() eq '6.ext'); ! $sub = $tests->[2]{params}[0]; ! ok($sub->() eq 'name'); ! $sub = $tests->[2]{params}[3]; ! ok($sub->() eq 'bla'); ! $sub = $tests->[2]{auth}; ! my $aref = $sub->(); ok($aref->[0] eq 'http'); ok($aref->[1] eq 'http://some.proxy.com/'); --- 67,76 ---- ok($tests->[1]{cookie}[0][2] eq 'This is the cookie value'); ok($tests->[1]{cookie}[1][1] eq 'webtest1'); ! ok($tests->[2]{test_name}() eq 'Some evals are here'); ! ok($tests->[2]{file}() eq '6.ext'); ! ok($tests->[2]{params}[0]() eq 'name'); ! ok($tests->[2]{params}[3]() eq 'bla'); ! my $aref = $tests->[2]{auth}(); ! ok(@$aref == 2); ok($aref->[0] eq 'http'); ok($aref->[1] eq 'http://some.proxy.com/'); *************** *** 99,103 **** if($] >= 5.006) { my $out_filter = sub { ! $_[0] =~ s/\(eval \d+\)/(eval NN)/; }; parse_error_check(wtscript => 't/borked7.wt', --- 101,105 ---- if($] >= 5.006) { my $out_filter = sub { ! $_[0] =~ s/\(eval \d+\) line \d+/(eval NN) line N/; }; parse_error_check(wtscript => 't/borked7.wt', |
From: Ilya M. <m_...@us...> - 2002-05-15 19:25:37
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory usw-pr-cvs1:/tmp/cvs-serv7141/lib/HTTP/WebTest Modified Files: Parser.pm Log Message: Use eval_in_playground(); change rules again - let variable expansion in double quoted strings Index: Parser.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Parser.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Parser.pm 12 May 2002 13:35:35 -0000 1.8 --- Parser.pm 15 May 2002 19:25:34 -0000 1.9 *************** *** 27,30 **** --- 27,32 ---- use Text::Balanced qw(extract_codeblock extract_delimited); + use HTTP::WebTest::Utils; + use vars qw(@ERRORS); *************** *** 98,117 **** qscalar: <rulevar: $extracted > qscalar: { $extracted = extract_delimited($text) } { ! my $delim = substr $extracted, 0, 1; ! # let Perl remove quote chars and handle special ! # sequences like \n but don't treat $ and @ as ! # special. Note \\\\ in patterns. It is actually ! # just *one* backslash. Four chars are because of ! # double quoting (one inside parser grammar ! # definition, second inside regexp body) ! if($delim eq '"') { ! $extracted =~ s/(^|[^\\\\])((?:\\\\\\\\)*)(\\\\)(\$|\@)/$1$2$3$3$4/g; ! $extracted =~ s/(\$|\@)/\\\\$1/g; } ! my $string = eval "$extracted"; ! $string; } uscalar: <rulevar: $word_re = qr/ (?: [^=)\s] | [^)\s] (?!>) ) /x> --- 100,122 ---- qscalar: <rulevar: $extracted > + qscalar: <rulevar: $exception > + qscalar: { $extracted = extract_delimited($text) } { ! my $delim = substr $extracted, 0, 1; ! my $ret; ! if($delim eq "'" or $extracted !~ /[\$\@\%]/) { ! # variable interpolation impossible - just ! # evalute string to get rid of escape chars ! $ret = HTTP::WebTest::Utils::eval_in_playground($extracted); ! } else { ! # variable interpolation possible - evaluate as ! # subroutine which will be used as callback ! $ret = HTTP::WebTest::Utils::eval_in_playground("sub { $extracted }"); ! $exception = $@; } ! $ret; } + | <error?: Eval error\n$exception\nnear @{[$text =~ /(.*)/]}> uscalar: <rulevar: $word_re = qr/ (?: [^=)\s] | [^)\s] (?!>) ) /x> *************** *** 129,134 **** <commit> { ! my $sub = eval "package HTTP::WebTest::PlayGround;\n" . ! "sub { $extracted }\n"; $exception = $@; $sub; --- 134,138 ---- <commit> { ! my $sub = HTTP::WebTest::Utils::eval_in_playground("sub { $extracted }"); $exception = $@; $sub; |
From: Ilya M. <m_...@us...> - 2002-05-15 19:24:56
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory usw-pr-cvs1:/tmp/cvs-serv6844/lib/HTTP/WebTest Modified Files: Utils.pm Log Message: Added sub eval_in_playground() Index: Utils.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Utils.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Utils.pm 12 May 2002 13:35:35 -0000 1.2 --- Utils.pm 15 May 2002 19:24:42 -0000 1.3 *************** *** 12,15 **** --- 12,16 ---- use HTTP::WebTest::Utils qw(make_access_method find_port); use HTTP::WebTest::Utils qw(copy_dir load_package); + use HTTP::WebTest::Utils qw(eval_in_playground); *method = make_access_method($field); *************** *** 23,26 **** --- 24,30 ---- load_package($package); + my $ret = eval_in_playground($code); + die $@ if $@; + =head1 DESCRIPTION *************** *** 45,49 **** use vars qw(@EXPORT_OK); ! @EXPORT_OK = qw(make_access_method find_port copy_dir load_package); =head2 make_access_method($field, $optional_default_value) --- 49,55 ---- use vars qw(@EXPORT_OK); ! @EXPORT_OK = qw(make_access_method find_port ! copy_dir load_package ! eval_in_playground); =head2 make_access_method($field, $optional_default_value) *************** *** 194,197 **** --- 200,225 ---- die $@ if $@; + } + + =head2 eval_in_playground ($code) + + Evaluates perl code inside playground package. + + =head3 Returns + + Return value of evaluated code. + + =cut + + sub eval_in_playground { + my $code = shift; + + my $ret = eval <<CODE; + package HTTP::WebTest::PlayGround; + + $code + CODE + + return $ret; } |
From: Ilya M. <m_...@us...> - 2002-05-12 14:55:39
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP In directory usw-pr-cvs1:/tmp/cvs-serv28241/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.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** WebTest.pm 12 May 2002 14:44:05 -0000 1.14 --- WebTest.pm 12 May 2002 14:55:36 -0000 1.15 *************** *** 611,637 **** for web page access authorization. - =head2 click_button - - 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. - - Note that you still need to pass all form parameters yourself using - C<params> test parameter. - - =head3 Example - - See example in L<HTTP::WebTest::Cookbook|HTTP::WebTest::Cookbook>. - - =head2 click_link - - Given name of link (i.e. C<<aE<gt>> tag) on previosly requested HTML - page builds test request to the linked page. - - =head3 Example - - See example in L<HTTP::WebTest::Cookbook|HTTP::WebTest::Cookbook>. - - =head2 cookie --- 611,614 ---- |
From: Ilya M. <m_...@us...> - 2002-05-12 14:44:08
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP In directory usw-pr-cvs1:/tmp/cvs-serv25394/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.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** WebTest.pm 12 May 2002 14:13:31 -0000 1.13 --- WebTest.pm 12 May 2002 14:44:05 -0000 1.14 *************** *** 613,619 **** =head2 click_button ! Given name of submit button (i.e. C<<input type="submit">> tag inside ! of C<<form>> tag) on previosly requested HTML page builds test request ! to the submitted page. Note that you still need to pass all form parameters yourself using --- 613,619 ---- =head2 click_button ! 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. Note that you still need to pass all form parameters yourself using *************** *** 626,631 **** =head2 click_link ! Given name of link (i.e. C<<a>> tag) on previosly requested HTML page ! builds test request to the linked page. =head3 Example --- 626,631 ---- =head2 click_link ! Given name of link (i.e. C<<aE<gt>> tag) on previosly requested HTML ! page builds test request to the linked page. =head3 Example |
From: Ilya M. <m_...@us...> - 2002-05-12 14:42:10
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin In directory usw-pr-cvs1:/tmp/cvs-serv25205/lib/HTTP/WebTest/Plugin Modified Files: Click.pm Log Message: Minor fixes Index: Click.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/Click.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Click.pm 12 May 2002 14:09:46 -0000 1.7 --- Click.pm 12 May 2002 14:42:07 -0000 1.8 *************** *** 34,39 **** =head1 TEST PARAMETERS - =for pod_merge copy params - =head2 click_button --- 34,37 ---- |
From: Ilya M. <m_...@us...> - 2002-05-12 14:40:45
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv24619 Modified Files: Makefile.PL MANIFEST.SKIP MANIFEST Log Message: Do not generate bin/wt from bin/wt.PL anymore. Index: Makefile.PL =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Makefile.PL,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile.PL 8 Apr 2002 21:51:58 -0000 1.5 --- Makefile.PL 12 May 2002 14:40:37 -0000 1.6 *************** *** 11,16 **** my %CONFIG = (); - # list of programs we install - my @PROGRAMS = qw(wt); # what do we need to delete on realclean? my $REALCLEAN = '.config'; --- 11,14 ---- *************** *** 34,39 **** 'URI' => 0 }, realclean => { FILES => $REALCLEAN }, ! PL_FILES => { map +("bin/$_.PL" => "bin/$_"), @PROGRAMS }, ! EXE_FILES => [ map {"bin/$_"} @PROGRAMS ], AUTHOR => $AUTHOR, ABSTRACT => 'Run tests on remote URLs or local web files'); --- 32,36 ---- 'URI' => 0 }, realclean => { FILES => $REALCLEAN }, ! EXE_FILES => [ File::Spec->catfile(qw(bin wt)) ], AUTHOR => $AUTHOR, ABSTRACT => 'Run tests on remote URLs or local web files'); Index: MANIFEST.SKIP =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/MANIFEST.SKIP,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MANIFEST.SKIP 21 Feb 2002 01:43:04 -0000 1.2 --- MANIFEST.SKIP 12 May 2002 14:40:37 -0000 1.3 *************** *** 16,18 **** t/good.wt$ t/test2.html$ - bin/wt$ --- 16,17 ---- Index: MANIFEST =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/MANIFEST,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MANIFEST 12 May 2002 13:37:33 -0000 1.11 --- MANIFEST 12 May 2002 14:40:37 -0000 1.12 *************** *** 5,9 **** README TODO ! bin/wt.PL http-webtest/conf/httpd.conf-dist http-webtest/htdocs/webtest/is_apache_responding.html --- 5,9 ---- README TODO ! bin/wt http-webtest/conf/httpd.conf-dist http-webtest/htdocs/webtest/is_apache_responding.html |
From: Ilya M. <m_...@us...> - 2002-05-12 14:40:44
|
Update of /cvsroot/http-webtest/HTTP-WebTest/bin In directory usw-pr-cvs1:/tmp/cvs-serv24619/bin Added Files: wt Removed Files: wt.PL .cvsignore Log Message: Do not generate bin/wt from bin/wt.PL anymore. --- NEW FILE: wt --- #!perl -w # $Id: wt,v 1.1 2002/05/12 14:40:37 m_ilya Exp $ =head1 NAME wt - test one or more web pages, either remotely or locally =head1 SYNOPSIS wt [options] [WTSCRIPT ...] Options: -?, --help brief help message --man full documentation -V, --version version number =head1 OPTIONS =over 4 =item B<-?> =item B<--help> Print a brief help message and exits. =item B<--man> Prints the manual page and exits. =item B<-V> =item B<--version> Prints version number of L<HTTP::WebTest|HTTP::WebTest> and exits. =back =head1 DESCRIPTION This program runs tests using Perl module L<HTTP::WebTest|HTTP::WebTest> on remote URLs or local web files containing Perl/JSP/HTML/JavaScript/etc. and generates a detailed test report. This program expects given input file(s) to be in format of wtscript file. If no files are given then it expects test specification to be passed via standard input. See docs mentioned in section L<SEE ALSO|SEE ALSO> for full documentation. =head1 EXIT STATUS =over 4 =item * 0 All tests ran successfully. =item * 1 One or more tests failed, there was an error in the input parameter file, or there was a system runtime error. =back =head1 COPYRIGHT Copyright (c) 2000-2001 Richard Anderson. All rights reserved. Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or modified under the terms of the Perl Artistic License. =head1 SEE ALSO L<HTTP::WebTest|HTTP::WebTest> L<HTTP::WebTest::Cookbook|HTTP::WebTest::Cookbook> =cut use strict; use Pod::Usage; use Getopt::Long qw(:config gnu_getopt); use HTTP::WebTest 1.96; my $VERSION = '1.00'; my $man = 0; my $help = 0; my $version = 0; GetOptions('help|?' => \$help, 'version|V' => \$version, 'man' => \$man) or pod2usage(2); pod2usage(1) if $help; pod2usage(-verbose => 2) if $man; if($version) { my $version = HTTP::WebTest->VERSION; print <<TEXT; wt version $VERSION. This program uses version $version of HTTP::WebTest. Copyright (c) 2000-2001 Richard Anderson. All rights reserved. Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. TEXT exit 0; } @ARGV = '-' if @ARGV < 1; my $webtest = HTTP::WebTest->new(); my($return, $exit_status, $total_failed, $total_succeeded) = (0) x 4; foreach my $file (@ARGV) { my($failed, $succeeded); $webtest->run_wtscript($file); $exit_status ||= 1 if not $webtest->have_succeed; $total_failed += $webtest->num_fail; $total_succeeded += $webtest->num_succeed; } exit $exit_status; --- wt.PL DELETED --- --- .cvsignore DELETED --- |
From: Ilya M. <m_...@us...> - 2002-05-12 14:17:42
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv18908 Modified Files: TODO Changes Log Message: Updated Index: TODO =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/TODO,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** TODO 27 Apr 2002 22:03:43 -0000 1.10 --- TODO 12 May 2002 14:17:39 -0000 1.11 *************** *** 3,8 **** My current TODO: - * add docs to Click plugin - * test broken tests diagnostics --- 3,6 ---- Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Changes 12 May 2002 13:37:33 -0000 1.24 --- Changes 12 May 2002 14:17:39 -0000 1.25 *************** *** 7,11 **** Revision history for Perl module HTTP::WebTest. ! Current version ENHANCEMENTS: --- 7,11 ---- Revision history for Perl module HTTP::WebTest. ! 1.99_06 Sun May 12 2002 ENHANCEMENTS: *************** *** 14,17 **** --- 14,20 ---- HTTP headers to HTTP request or override default HTTP headers in HTTP request. Thanks to Duncan Cameron for patch. + + * New plugin HTTP::WebTest::Plugin::Click. This plugin allows to use + names of links and button on HTML pages to build test requests. BUG FIXES: |
From: Ilya M. <m_...@us...> - 2002-05-12 14:13:33
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP In directory usw-pr-cvs1:/tmp/cvs-serv17744/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.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** WebTest.pm 12 May 2002 13:38:00 -0000 1.12 --- WebTest.pm 12 May 2002 14:13:31 -0000 1.13 *************** *** 26,30 **** package HTTP::WebTest; ! $VERSION = '1.99_05'; # workaround for warning caused by underscore char in $VERSION $VERSION = eval $VERSION; --- 26,30 ---- package HTTP::WebTest; ! $VERSION = '1.99_06'; # workaround for warning caused by underscore char in $VERSION $VERSION = eval $VERSION; *************** *** 483,486 **** --- 483,491 ---- =over 4 + =item L<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::HarnessReport> *************** *** 608,612 **** --- 613,635 ---- =head2 click_button + Given name of submit button (i.e. C<<input type="submit">> tag inside + of C<<form>> tag) on previosly requested HTML page builds test request + to the submitted page. + + Note that you still need to pass all form parameters yourself using + C<params> test parameter. + + =head3 Example + + See example in L<HTTP::WebTest::Cookbook|HTTP::WebTest::Cookbook>. + =head2 click_link + + Given name of link (i.e. C<<a>> tag) on previosly requested HTML page + builds test request to the linked page. + + =head3 Example + + See example in L<HTTP::WebTest::Cookbook|HTTP::WebTest::Cookbook>. |
From: Ilya M. <m_...@us...> - 2002-05-12 14:11:36
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP In directory usw-pr-cvs1:/tmp/cvs-serv17360/lib/HTTP Modified Files: WebTest.pm.in Log Message: Added notice of ::Click; Bump version Index: WebTest.pm.in =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest.pm.in,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** WebTest.pm.in 12 May 2002 13:35:36 -0000 1.10 --- WebTest.pm.in 12 May 2002 14:11:34 -0000 1.11 *************** *** 5,9 **** package HTTP::WebTest; ! $VERSION = '1.99_05'; # workaround for warning caused by underscore char in $VERSION $VERSION = eval $VERSION; --- 5,9 ---- package HTTP::WebTest; ! $VERSION = '1.99_06'; # workaround for warning caused by underscore char in $VERSION $VERSION = eval $VERSION; *************** *** 461,464 **** --- 461,469 ---- =over 4 + + =item L<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::HarnessReport> |
From: Ilya M. <m_...@us...> - 2002-05-12 14:09:49
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin In directory usw-pr-cvs1:/tmp/cvs-serv16971/lib/HTTP/WebTest/Plugin Modified Files: Click.pm Log Message: Minor fixes Index: Click.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/Click.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Click.pm 12 May 2002 14:02:57 -0000 1.6 --- Click.pm 12 May 2002 14:09:46 -0000 1.7 *************** *** 38,44 **** =head2 click_button ! Given name of submit button (i.e. C<<input type="submit">> tag inside ! of C<<form>> tag) on previosly requested HTML page builds test request ! to the submitted page. Note that you still need to pass all form parameters yourself using --- 38,44 ---- =head2 click_button ! 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. Note that you still need to pass all form parameters yourself using *************** *** 51,56 **** =head2 click_link ! Given name of link (i.e. C<<a>> tag) on previosly requested HTML page ! builds test request to the linked page. =head3 Example --- 51,56 ---- =head2 click_link ! Given name of link (i.e. C<<aE<gt>> tag) on previosly requested HTML ! page builds test request to the linked page. =head3 Example |
From: Ilya M. <m_...@us...> - 2002-05-12 14:03:02
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin In directory usw-pr-cvs1:/tmp/cvs-serv15735/lib/HTTP/WebTest/Plugin Modified Files: Click.pm Log Message: Added docs Index: Click.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/Click.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Click.pm 12 May 2002 13:35:35 -0000 1.5 --- Click.pm 12 May 2002 14:02:57 -0000 1.6 *************** *** 9,16 **** =head1 SYNOPSIS ! Not Applicable =head1 DESCRIPTION =cut --- 9,27 ---- =head1 SYNOPSIS ! plugins = ( ::Click ) ! ! test_name = Some test ! click_link = Name of the link ! end_test ! ! test_name = Another test ! click_button = Name of the button ! end_test =head1 DESCRIPTION + This plugin allows to use names of links and button on HTML pages to + build test requests. + =cut *************** *** 27,31 **** --- 38,60 ---- =head2 click_button + Given name of submit button (i.e. C<<input type="submit">> tag inside + of C<<form>> tag) on previosly requested HTML page builds test request + to the submitted page. + + Note that you still need to pass all form parameters yourself using + C<params> test parameter. + + =head3 Example + + See example in L<HTTP::WebTest::Cookbook|HTTP::WebTest::Cookbook>. + =head2 click_link + + Given name of link (i.e. C<<a>> tag) on previosly requested HTML page + builds test request to the linked page. + + =head3 Example + + See example in L<HTTP::WebTest::Cookbook|HTTP::WebTest::Cookbook>. =cut |
From: Ilya M. <m_...@us...> - 2002-05-12 13:38:02
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP In directory usw-pr-cvs1:/tmp/cvs-serv7376/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.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** WebTest.pm 8 Apr 2002 21:51:57 -0000 1.11 --- WebTest.pm 12 May 2002 13:38:00 -0000 1.12 *************** *** 53,68 **** =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 This module runs tests on remote URLs or local web files containing ! Perl/JSP/HTML/JavaScript/etc. and generates a detailed test ! report. This module can be used "as-is" or its functionality can be ! extended using plugins. Plugins can define test types and provide ! additional report capabilities. This module comes with a set of ! default plugins but can be easily extended with third party plugins. The L<wt|wt> script is provided for running C<HTTP::WebTest> from the --- 53,68 ---- =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 This module runs tests on remote URLs or local web files containing ! Perl/JSP/HTML/JavaScript/etc. and generates a detailed test report. ! This module can be used "as-is" or its functionality can be extended ! using plugins. Plugins can define test types and provide additional ! report capabilities. This module comes with a set of default plugins ! but can be easily extended with third party plugins. The L<wt|wt> script is provided for running C<HTTP::WebTest> from the *************** *** 70,89 **** The test specifications can be read from a parameter file in wtscript ! format or input as method arguments. If you are testing a local file, Apache is started on a private/dynamic port with a configuration file in a temporary directory. The test results can be displayed on the terminal, directed to a file, ! stored in a scalar variable. The test results can also be emailed. The report can be modified and extended using report plugins. Each URL/web file is tested by fetching it from the web server using a ! local instance of an HTTP user agent. The basic test is simply whether ! or not the fetch was successful. You may also test using literal ! strings or regular expressions that are either required to exist or ! forbidden to exist in the fetched page. You may also specify tests for ! the minimum and maximum number of bytes in the returned page. You may ! also specify tests for the minimum and maximum web server response ! time. Data flow for C<HTTP::WebTest> using a remote URL: --- 70,89 ---- The test specifications can be read from a parameter file in wtscript ! format or input as method arguments. If you are testing a local file, Apache is started on a private/dynamic port with a configuration file in a temporary directory. The test results can be displayed on the terminal, directed to a file, ! stored in a scalar variable. The test results can also be emailed. The report can be modified and extended using report plugins. Each URL/web file is tested by fetching it from the web server using a ! local instance of an HTTP user agent. The basic test is simply ! whether or not the fetch was successful. You may also test using ! literal strings or regular expressions that are either required to ! exist or forbidden to exist in the fetched page. You may also specify ! tests for the minimum and maximum number of bytes in the returned ! page. You may also specify tests for the minimum and maximum web ! server response time. Data flow for C<HTTP::WebTest> using a remote URL: *************** *** 136,143 **** This module has complex functionality, but using it to run simple ! tests is simple. Create a file of test parameters in the L<wtscript format|Running HTTP::WebTest using a parameter file> and use the L<wt|wt> program to process the file using the command C<wt ! filename>. The only required parameters are C<test_name> and C<url>. This document describes: --- 136,143 ---- This module has complex functionality, but using it to run simple ! tests is simple. Create a file of test parameters in the L<wtscript format|Running HTTP::WebTest using a parameter file> and use the L<wt|wt> program to process the file using the command C<wt ! filename>. The only required parameters are C<test_name> and C<url>. This document describes: *************** *** 147,157 **** =item * ! How tests can be specified. See section L<TEST SPECIFICATION|TEST ! SPECIFICATION>. =item * All test parameters supported by core C<HTTP::WebTest> ! plugins. See section L<TEST PARAMETERS|TEST PARAMETERS>. =back --- 147,157 ---- =item * ! How tests can be specified. See section ! L<TEST SPECIFICATION|TEST SPECIFICATION>. =item * All test parameters supported by core C<HTTP::WebTest> ! plugins. See section L<TEST PARAMETERS|TEST PARAMETERS>. =back *************** *** 202,207 **** If you are running dozens of tests, you may want to divide them into ! several parameter files. This will organize the tests and reduce the ! size of the output and e-mail messages. However, cookies passed to or received from the web server(s) are not shared between tests in different parameter files. --- 202,207 ---- If you are running dozens of tests, you may want to divide them into ! several parameter files. This will organize the tests and reduce the ! size of the output and e-mail messages. However, cookies passed to or received from the web server(s) are not shared between tests in different parameter files. *************** *** 209,221 **** =head3 File format ! The wtscript file is a text file containing global parameters and ! test blocks containing test block parameters. A test block begins with ! a test_name parameter and ends with an end_test directive. The order of the parameters and test blocks is arbitrary. Test block parameters MUST occur between a test_name parameter and an ! end_test directive. (Test block parameters affect only an individual test.) Global parameters must NOT occur between a test_name parameter ! and an end_test directive. (This requirement does not apply to certain parameters that are both global and test block parameters.) --- 209,221 ---- =head3 File format ! The wtscript file is a text file containing global parameters and test ! blocks containing test block parameters. A test block begins with a ! test_name parameter and ends with an end_test directive. The order of the parameters and test blocks is arbitrary. Test block parameters MUST occur between a test_name parameter and an ! end_test directive. (Test block parameters affect only an individual test.) Global parameters must NOT occur between a test_name parameter ! and an end_test directive. (This requirement does not apply to certain parameters that are both global and test block parameters.) *************** *** 280,284 **** 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. --- 280,284 ---- 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. *************** *** 286,290 **** 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. --- 286,290 ---- 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. *************** *** 310,316 **** The parameters below specify tests of a local file and a remote URL. The tests specified by the C<text_forbid> parameter apply to both the ! "RayCosoft home page" and the "Yahoo home page" tests. Hence, if either returned page contains one of the case-insensitive strings in ! text_forbid, the test fails. If any test fails or the fetch of the URL fails, an e-mail will be sent to te...@un.... --- 310,316 ---- The parameters below specify tests of a local file and a remote URL. The tests specified by the C<text_forbid> parameter apply to both the ! "RayCosoft home page" and the "Yahoo home page" tests. Hence, if either returned page contains one of the case-insensitive strings in ! text_forbid, the test fails. If any test fails or the fetch of the URL fails, an e-mail will be sent to te...@un.... *************** *** 343,347 **** The parameters below specify a test of a local file containing Perl ! code using the L<Apache::ASP|Apache::ASP> module. The C<includes.htm> file requires five include files and two Perl modules, which are copied using the C<include_file_path> parameter. --- 343,347 ---- The parameters below specify a test of a local file containing Perl ! code using the L<Apache::ASP|Apache::ASP> module. The C<includes.htm> file requires five include files and two Perl modules, which are copied using the C<include_file_path> parameter. *************** *** 373,384 **** 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. --- 373,384 ---- 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. *************** *** 478,482 **** Following plugin modules come with HTTP::WebTest but they are not ! loaded by default. They should be loaded using global test parameter C<plugins> when needed. --- 478,482 ---- Following plugin modules come with HTTP::WebTest but they are not ! loaded by default. They should be loaded using global test parameter C<plugins> when needed. *************** *** 491,495 **** This plugin allows to define callback test parameters which are ! evaluated at specific time of L<HTTP::WebTest> test run. These test parameters can define user-defined checks. --- 491,495 ---- This plugin allows to define callback test parameters which are ! evaluated at specific time of L<HTTP::WebTest> test run. These test parameters can define user-defined checks. *************** *** 507,512 **** 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. --- 507,512 ---- 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. *************** *** 520,525 **** These cookies exist only while the program is executing and do not ! affect subsequent runs. These cookies do not affect your browser or ! any software other than the test program. These cookies are only accessible to other tests executed during test sequence execution. --- 520,525 ---- These cookies exist only while the program is executing and do not ! affect subsequent runs. These cookies do not affect your browser or ! any software other than the test program. These cookies are only accessible to other tests executed during test sequence execution. *************** *** 538,545 **** I<GLOBAL PARAMETER> ! Absolute or relative path name of directory containing ! Apache files. See the ! L<APACHE DIRECTORY AND FILES|/"APACHE DIRECTORY AND FILES"> section. ! This parameter is ignored unless the C<file_path> parameter is specified. =head3 Default value --- 538,545 ---- I<GLOBAL PARAMETER> ! Absolute or relative path name of directory containing Apache files. ! See the L<APACHE DIRECTORY AND FILES|/"APACHE DIRECTORY AND FILES"> ! section. This parameter is ignored unless the C<file_path> parameter ! is specified. =head3 Default value *************** *** 551,557 **** I<GLOBAL PARAMETER> ! Absolute or relative path name of Apache executable. This command can ! be in your C<$PATH>. This parameter is ignored unless the C<file_path> ! parameter is specified. =head3 Default value --- 551,557 ---- I<GLOBAL PARAMETER> ! Absolute or relative path name of Apache executable. This command can ! be in your C<$PATH>. This parameter is ignored unless the ! C<file_path> parameter is specified. =head3 Default value *************** *** 563,570 **** I<GLOBAL PARAMETER> ! Apache logging level. If you use a level less than C<warn> (i.e., C<debug>, C<info>, or C<notice>), the program may generate irrelevant ! errors. This parameter is ignored unless the C<file_path> parameter is ! specified. See also the C<ignore_error_log> parameter. =head3 Allowed values --- 563,570 ---- I<GLOBAL PARAMETER> ! Apache logging level. If you use a level less than C<warn> (i.e., C<debug>, C<info>, or C<notice>), the program may generate irrelevant ! errors. This parameter is ignored unless the C<file_path> parameter ! is specified. See also the C<ignore_error_log> parameter. =head3 Allowed values *************** *** 581,585 **** I<GLOBAL PARAMETER> ! Maximum number of seconds to wait for Apache to start. This parameter is ignored unless the C<file_path> parameter is specified. --- 581,585 ---- I<GLOBAL PARAMETER> ! Maximum number of seconds to wait for Apache to start. This parameter is ignored unless the C<file_path> parameter is specified. *************** *** 592,599 **** I<GLOBAL PARAMETER> ! Additional Apache command line options. Many of the options cause Apache to exit immediately after starting, so the web page tests will ! not run. This parameter is ignored unless the C<file_path> parameter is ! specified. =head3 Allowed values --- 592,599 ---- I<GLOBAL PARAMETER> ! Additional Apache command line options. Many of the options cause Apache to exit immediately after starting, so the web page tests will ! not run. This parameter is ignored unless the C<file_path> parameter ! is specified. =head3 Allowed values *************** *** 650,654 **** =item * name (REQUIRED) ! Name of cookie. Cannot begin with a $ character. =item * value (REQUIRED) --- 650,654 ---- =item * name (REQUIRED) ! Name of cookie. Cannot begin with a $ character. =item * value (REQUIRED) *************** *** 658,667 **** =item * path (REQUIRED) ! URL path name for which this cookie applies. Must begin with a / character. See also path_spec. =item * domain (REQUIRED) ! Domain for which cookie is valid. (REQUIRED). Should begin with a period. Must either contain two periods or be equal to C<.local>. --- 658,667 ---- =item * path (REQUIRED) ! URL path name for which this cookie applies. Must begin with a / character. See also path_spec. =item * domain (REQUIRED) ! Domain for which cookie is valid. (REQUIRED). Should begin with a period. Must either contain two periods or be equal to C<.local>. *************** *** 713,718 **** =item * discard ! Option to discard cookie when the program finishes. Default 0. (The ! cookie will be discarded regardless of the value of this element.) =over 4 --- 713,719 ---- =item * discard ! Option to discard cookie when the program finishes. Default is 0. ! (The cookie will be discarded regardless of the value of this ! element.) =over 4 *************** *** 730,734 **** =item * name/value ! Zero, one or several name/value pairs may be specified. The name parameters are words such as Comment or CommentURL and the value parameters are strings that may contain embedded blanks. --- 731,735 ---- =item * name/value ! Zero, one or several name/value pairs may be specified. The name parameters are words such as Comment or CommentURL and the value parameters are strings that may contain embedded blanks. *************** *** 771,780 **** 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). =head3 Allowed values --- 772,781 ---- 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). =head3 Allowed values *************** *** 795,806 **** I<GLOBAL PARAMETER> ! The pathname of a local web server error log. The module counts the ! number of lines in the error log before and after each request. If the ! number of lines increases, an error is counted and the additional ! lines are listed in the report. This argument should be used only when ! the local web server is running in single-process mode. Otherwise, ! requests generated by other processes/users may add lines to the error ! log that are not related to the requests generated by this module. See ! also parameter C<ignore_error_log>. =head2 fh_out --- 796,807 ---- I<GLOBAL PARAMETER> ! The pathname of a local web server error log. The module counts the ! number of lines in the error log before and after each request. If ! the number of lines increases, an error is counted and the additional ! lines are listed in the report. This argument should be used only ! when the local web server is running in single-process mode. ! Otherwise, requests generated by other processes/users may add lines ! to the error log that are not related to the requests generated by ! this module. See also parameter C<ignore_error_log>. =head2 fh_out *************** *** 809,813 **** A filehandle (or anything else that supports C<print>) to use for test ! report output. This parameter is ignored if test parameter C<output_ref> is specified also. --- 810,814 ---- A filehandle (or anything else that supports C<print>) to use for test ! report output. This parameter is ignored if test parameter C<output_ref> is specified also. *************** *** 818,822 **** If L<HTTP::WebTest|HTTP::WebTest> encounters parameter C<file_path> it ! switches in local web file test mode. In local web file test mode it launches an instance of Apache daemon, copies local test file(s) under DocumentRoot of this Apache and performs test checks against it. --- 819,823 ---- If L<HTTP::WebTest|HTTP::WebTest> encounters parameter C<file_path> it ! switches in local web file test mode. In local web file test mode it launches an instance of Apache daemon, copies local test file(s) under DocumentRoot of this Apache and performs test checks against it. *************** *** 824,834 **** =head3 Allowed values ! Two-element list. First element is the file to test, either an ! absolute or a relative pathname. Second element is the subdirectory pathname, relative to the Apache htdocs directory, to copy the file ! to. The copied file will have the same basename as the first element ! and the relative pathname of the second element. To copy the file directly to the htdocs directory, use a pathname of C<.> or C<./.>. =head2 ignore_case --- 825,844 ---- =head3 Allowed values ! Two-element list. First element is the file to test, either an ! absolute or a relative pathname. Second element is the subdirectory pathname, relative to the Apache htdocs directory, to copy the file ! to. The copied file will have the same basename as the first element ! and the relative pathname of the second element. To copy the file directly to the htdocs directory, use a pathname of C<.> or C<./.>. + =head2 http_headers + + A list of HTTP header/value pairs. Can be used to override default + HTTP headers or to add additional HTTP headers. + + =head3 Example + + http_headers = ( Accept => text/plain, text/html ) + =head2 ignore_case *************** *** 846,854 **** =head2 ignore_error_log ! Option to ignore any errors found in the Apache error log. The default ! behavior is to flag an error if the fetch causes any errors to be ! added to the error log and echo the errors to the program output. This ! check is available only if C<error_log> parameter is specified. See also ! the C<apache_loglevel> parameter. =head3 Allowed values --- 856,864 ---- =head2 ignore_error_log ! Option to ignore any errors found in the Apache error log. The ! default behavior is to flag an error if the fetch causes any errors to ! be added to the error log and echo the errors to the program output. ! This check is available only if C<error_log> parameter is specified. ! See also the C<apache_loglevel> parameter. =head3 Allowed values *************** *** 862,871 **** =head2 include_file_path ! List with an even number of elements. Odd-numbered elements are files to copy to the the temporary Apache directory before running the ! tests. These files can be specified using either an absolute or a ! relative pathname. Even-numbered elements are the subdirectory pathname, relative to the Apache ServerRoot directory, to copy the ! corresponding file to. The copied file will have the same basename as the odd-numbered element and the relative pathname of the corresponding even-numbered element. To copy the file directly to the --- 872,881 ---- =head2 include_file_path ! List with an even number of elements. Odd-numbered elements are files to copy to the the temporary Apache directory before running the ! tests. These files can be specified using either an absolute or a ! relative pathname. Even-numbered elements are the subdirectory pathname, relative to the Apache ServerRoot directory, to copy the ! corresponding file to. The copied file will have the same basename as the odd-numbered element and the relative pathname of the corresponding even-numbered element. To copy the file directly to the *************** *** 878,884 **** will copy the file to htdocs/includes/header.inc. ! This parameter is also useful for adding Perl modules that are ! needed by the web page specified by the file_path parameter. For ! example: include_file_path = ( ../apps/myapp/DBconn.pm => lib/perl/apps ) --- 888,893 ---- will copy the file to htdocs/includes/header.inc. ! This parameter is also useful for adding Perl modules that are needed ! by the web page specified by the file_path parameter. For example: include_file_path = ( ../apps/myapp/DBconn.pm => lib/perl/apps ) *************** *** 997,1001 **** 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. --- 1006,1010 ---- 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. *************** *** 1006,1015 **** =head2 params ! A list of name/value pairs to be passed as parameters to the ! URL. (This element is used to test pages that process input from ! forms.) Unless the method key is set to C<POST>, these pairs are ! URI-escaped and appended to the requested URL. ! For example, url = http://www.hotmail.com/cgi-bin/hmhome --- 1015,1026 ---- =head2 params ! A list of name/value pairs to be passed as parameters to the URL. ! (This element is used to test pages that process input from forms.) ! Unless the method key is set to C<POST>, these pairs are URI-escaped ! and appended to the requested URL. ! The names and values will be URI-escaped as defined by RFC 2396. ! ! =head3 Example url = http://www.hotmail.com/cgi-bin/hmhome *************** *** 1023,1028 **** http://www.hotmail.com/cgi-bin/hmhome?curmbox=F001%20A005&from=HotMail - The names and values will be URI-escaped as defined by RFC 2396. - =head2 pauth --- 1034,1037 ---- *************** *** 1034,1040 **** I<GLOBAL PARAMETER> ! 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 = ( ::ValidateHTML ) --- 1043,1049 ---- I<GLOBAL PARAMETER> ! 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 = ( ::ValidateHTML ) *************** *** 1050,1054 **** use for requests. ! For example (C<wtscript> usage): proxies = ( http => http://http_proxy.mycompany.com --- 1059,1063 ---- use for requests. ! =head3 Example proxies = ( http => http://http_proxy.mycompany.com *************** *** 1078,1087 **** =head2 send_cookies ! Option to send cookies to web server. This applies to cookies received ! from the web server or cookies specified using the C<cookies> test ! parameter. This does NOT give the web server(s) access to cookies created with a ! browser or any user agent software other than this program. The cookies created while this program is running are only accessible to other tests in the same test sequence. --- 1087,1096 ---- =head2 send_cookies ! Option to send cookies to web server. This applies to cookies ! received from the web server or cookies specified using the C<cookies> ! test parameter. This does NOT give the web server(s) access to cookies created with a ! browser or any user agent software other than this program. The cookies created while this program is running are only accessible to other tests in the same test sequence. *************** *** 1178,1182 **** =head2 url ! URL to test. If schema part of URL is omitted (i.e. URL doesn't start with C<http://>, C<ftp://>, etc) then C<http://> is implied. --- 1187,1191 ---- =head2 url ! URL to test. If schema part of URL is omitted (i.e. URL doesn't start with C<http://>, C<ftp://>, etc) then C<http://> is implied. *************** *** 1204,1217 **** The C<apache_dir> parameter must be set to the name of a directory ! that contains the subdirectories C<conf>, C<logs> and C<htdocs>. The ! C<conf> subdirectory must contain a file named C<httpd.conf-dist>. The ! C<htdocs> subdirectory must contain a subdirectory named C<webtest> ! that contains a file named C<is_apache_responding.html>. If your ! installation of Apache has the Perl module L<Apache::ASP|Apache::ASP> ! configured, the C<apache_dir> directory must also contain a ! subdirectory named C<asp_tmp>. The file C<httpd.conf-dist> is used as template for the Apache config ! file. It contains tags which are replaced with the values needed by the Apache server that the program starts at runtime. --- 1213,1226 ---- The C<apache_dir> parameter must be set to the name of a directory ! that contains the subdirectories C<conf>, C<logs> and C<htdocs>. The ! C<conf> subdirectory must contain a file named C<httpd.conf-dist>. ! The C<htdocs> subdirectory must contain a subdirectory named ! C<webtest> that contains a file named C<is_apache_responding.html>. ! If your installation of Apache has the Perl module ! L<Apache::ASP|Apache::ASP> configured, the C<apache_dir> directory ! must also contain a subdirectory named C<asp_tmp>. The file C<httpd.conf-dist> is used as template for the Apache config ! file. It contains tags which are replaced with the values needed by the Apache server that the program starts at runtime. *************** *** 1246,1250 **** 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 specified, Apache must be installed. --- 1255,1259 ---- 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 specified, Apache must be installed. *************** *** 1253,1257 **** 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. --- 1262,1266 ---- 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. *************** *** 1262,1277 **** 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 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. ! This module is free software. It may be used, redistributed and/or modified under the terms of the Perl Artistic License. --- 1271,1286 ---- 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 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. ! This module is free software. It may be used, redistributed and/or modified under the terms of the Perl Artistic License. |
From: Ilya M. <m_...@us...> - 2002-05-12 13:37:35
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv7272 Modified Files: MANIFEST Changes Log Message: Updated Index: MANIFEST =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/MANIFEST,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** MANIFEST 11 May 2002 18:48:06 -0000 1.10 --- MANIFEST 12 May 2002 13:37:33 -0000 1.11 *************** *** 91,94 **** --- 91,95 ---- t/test.out/cookie3 t/test.out/default-report-yes + t/test.out/http-headers t/test.out/on_response t/test.out/pauth Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Changes 11 May 2002 18:51:01 -0000 1.23 --- Changes 12 May 2002 13:37:33 -0000 1.24 *************** *** 9,12 **** --- 9,18 ---- Current version + ENHANCEMENTS: + + * New core test parameter 'http_headers'. Allows to add additional + HTTP headers to HTTP request or override default HTTP headers in HTTP + request. Thanks to Duncan Cameron for patch. + BUG FIXES: |
From: Ilya M. <m_...@us...> - 2002-05-12 13:37:02
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory usw-pr-cvs1:/tmp/cvs-serv7109/t Modified Files: 02-generic.t Log Message: Added tests for test parameter 'http-headers' Index: 02-generic.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/02-generic.t,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** 02-generic.t 11 May 2002 18:47:49 -0000 1.8 --- 02-generic.t 12 May 2002 13:36:59 -0000 1.9 *************** *** 18,22 **** use vars qw($HOSTNAME $PORT $URL); ! BEGIN { plan tests => 23 } # init tests --- 18,22 ---- use vars qw($HOSTNAME $PORT $URL); ! BEGIN { plan tests => 24 } # init tests *************** *** 440,443 **** --- 440,459 ---- tests => $tests, check_file => 't/test.out/content-type'); + } + + # 24: test 'http_headers' param + { + my $tests = [ { url => abs_url($URL, '/show-headers'), + http_headers => [ Accept => 'text/plain, text/html' ], + text_require => [ 'Accept: text/plain, text/html' ] }, + { url => abs_url($URL, '/show-headers'), + http_headers => [ User_Agent => 'Override User-Agent' ], + text_require => [ 'User-Agent: Override User-Agent' ] }, + ]; + + check_webtest(webtest => $WEBTEST, + server_url => $URL, + tests => $tests, + check_file => 't/test.out/http-headers'); } |
From: Ilya M. <m_...@us...> - 2002-05-12 13:37:02
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t/test.out In directory usw-pr-cvs1:/tmp/cvs-serv7109/t/test.out Added Files: http-headers Log Message: Added tests for test parameter 'http-headers' --- NEW FILE: http-headers --- Failed Succeeded Test Name 0 2 *** no name *** 0 2 *** no name *** URL: http://http.web.test/show-headers STATUS CODE CHECK 200 OK SUCCEED REQUIRED TEXT Accept: text/plain, text/html SUCCEED URL: http://http.web.test/show-headers STATUS CODE CHECK 200 OK SUCCEED REQUIRED TEXT User-Agent: Override User-Agent SUCCEED Total web tests failed: 0 succeeded: 4 |
From: Ilya M. <m_...@us...> - 2002-05-12 13:36:37
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin In directory usw-pr-cvs1:/tmp/cvs-serv7011/lib/HTTP/WebTest/Plugin Modified Files: SetRequest.pm Log Message: Added support for test parameter 'http-headers' Index: SetRequest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/SetRequest.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SetRequest.pm 11 May 2002 18:47:09 -0000 1.7 --- SetRequest.pm 12 May 2002 13:36:34 -0000 1.8 *************** *** 28,32 **** =head2 url ! URL to test. If schema part of URL is omitted (i.e. URL doesn't start with C<http://>, C<ftp://>, etc) then C<http://> is implied. --- 28,32 ---- =head2 url ! URL to test. If schema part of URL is omitted (i.e. URL doesn't start with C<http://>, C<ftp://>, etc) then C<http://> is implied. *************** *** 45,56 **** C<GET> =head2 params ! A list of name/value pairs to be passed as parameters to the ! URL. (This element is used to test pages that process input from ! forms.) Unless the method key is set to C<POST>, these pairs are ! URI-escaped and appended to the requested URL. ! For example, url = http://www.hotmail.com/cgi-bin/hmhome --- 45,67 ---- C<GET> + =head2 http_headers + + A list of HTTP header/value pairs. Can be used to override default + HTTP headers or to add additional HTTP headers. + + =head3 Example + + http_headers = ( Accept => text/plain, text/html ) + =head2 params ! A list of name/value pairs to be passed as parameters to the URL. ! (This element is used to test pages that process input from forms.) ! Unless the method key is set to C<POST>, these pairs are URI-escaped ! and appended to the requested URL. ! The names and values will be URI-escaped as defined by RFC 2396. ! ! =head3 Example url = http://www.hotmail.com/cgi-bin/hmhome *************** *** 64,69 **** http://www.hotmail.com/cgi-bin/hmhome?curmbox=F001%20A005&from=HotMail - The names and values will be URI-escaped as defined by RFC 2396. - =head2 auth --- 75,78 ---- *************** *** 76,80 **** use for requests. ! For example (C<wtscript> usage): proxies = ( http => http://http_proxy.mycompany.com --- 85,89 ---- use for requests. ! =head3 Example proxies = ( http => http://http_proxy.mycompany.com *************** *** 100,110 **** sub param_types { ! return q(url uri ! method scalar('^(?:GET|POST)$') ! params hashlist ! auth list('scalar','scalar') ! proxies hashlist ! pauth list('scalar','scalar') ! user_agent scalar); } --- 109,120 ---- sub param_types { ! return q(url uri ! method scalar('^(?:GET|POST)$') ! params hashlist ! auth list('scalar','scalar') ! proxies hashlist ! pauth list('scalar','scalar') ! http_headers hashlist ! user_agent scalar); } *************** *** 120,124 **** $self->validate_params(qw(url method params auth proxies pauth ! user_agent)); # get various params we handle --- 130,134 ---- $self->validate_params(qw(url method params auth proxies pauth ! http_headers user_agent)); # get various params we handle *************** *** 129,132 **** --- 139,143 ---- my $proxies = $self->test_param('proxies'); my $pauth = $self->test_param('pauth'); + my $headers = $self->test_param('http_headers'); my $ua_name = $self->test_param('user_agent'); *************** *** 187,190 **** --- 198,206 ---- } + # set http headers + if(defined $headers) { + $request->header(@$headers); + } + # set user agent name $ua_name = 'HTTP-WebTest/' . HTTP::WebTest->VERSION *************** *** 195,201 **** =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 211,217 ---- =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or |
From: Ilya M. <m_...@us...> - 2002-05-12 13:35:45
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP In directory usw-pr-cvs1:/tmp/cvs-serv6771/lib/HTTP Modified Files: WebTest.pm.in Log Message: Minor POD docs tweaks Index: WebTest.pm.in =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest.pm.in,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** WebTest.pm.in 8 Apr 2002 21:51:57 -0000 1.9 --- WebTest.pm.in 12 May 2002 13:35:36 -0000 1.10 *************** *** 32,47 **** =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 This module runs tests on remote URLs or local web files containing ! Perl/JSP/HTML/JavaScript/etc. and generates a detailed test ! report. This module can be used "as-is" or its functionality can be ! extended using plugins. Plugins can define test types and provide ! additional report capabilities. This module comes with a set of ! default plugins but can be easily extended with third party plugins. The L<wt|wt> script is provided for running C<HTTP::WebTest> from the --- 32,47 ---- =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 This module runs tests on remote URLs or local web files containing ! Perl/JSP/HTML/JavaScript/etc. and generates a detailed test report. ! This module can be used "as-is" or its functionality can be extended ! using plugins. Plugins can define test types and provide additional ! report capabilities. This module comes with a set of default plugins ! but can be easily extended with third party plugins. The L<wt|wt> script is provided for running C<HTTP::WebTest> from the *************** *** 49,68 **** The test specifications can be read from a parameter file in wtscript ! format or input as method arguments. If you are testing a local file, Apache is started on a private/dynamic port with a configuration file in a temporary directory. The test results can be displayed on the terminal, directed to a file, ! stored in a scalar variable. The test results can also be emailed. The report can be modified and extended using report plugins. Each URL/web file is tested by fetching it from the web server using a ! local instance of an HTTP user agent. The basic test is simply whether ! or not the fetch was successful. You may also test using literal ! strings or regular expressions that are either required to exist or ! forbidden to exist in the fetched page. You may also specify tests for ! the minimum and maximum number of bytes in the returned page. You may ! also specify tests for the minimum and maximum web server response ! time. Data flow for C<HTTP::WebTest> using a remote URL: --- 49,68 ---- The test specifications can be read from a parameter file in wtscript ! format or input as method arguments. If you are testing a local file, Apache is started on a private/dynamic port with a configuration file in a temporary directory. The test results can be displayed on the terminal, directed to a file, ! stored in a scalar variable. The test results can also be emailed. The report can be modified and extended using report plugins. Each URL/web file is tested by fetching it from the web server using a ! local instance of an HTTP user agent. The basic test is simply ! whether or not the fetch was successful. You may also test using ! literal strings or regular expressions that are either required to ! exist or forbidden to exist in the fetched page. You may also specify ! tests for the minimum and maximum number of bytes in the returned ! page. You may also specify tests for the minimum and maximum web ! server response time. Data flow for C<HTTP::WebTest> using a remote URL: *************** *** 115,122 **** This module has complex functionality, but using it to run simple ! tests is simple. Create a file of test parameters in the L<wtscript format|Running HTTP::WebTest using a parameter file> and use the L<wt|wt> program to process the file using the command C<wt ! filename>. The only required parameters are C<test_name> and C<url>. This document describes: --- 115,122 ---- This module has complex functionality, but using it to run simple ! tests is simple. Create a file of test parameters in the L<wtscript format|Running HTTP::WebTest using a parameter file> and use the L<wt|wt> program to process the file using the command C<wt ! filename>. The only required parameters are C<test_name> and C<url>. This document describes: *************** *** 126,136 **** =item * ! How tests can be specified. See section L<TEST SPECIFICATION|TEST ! SPECIFICATION>. =item * All test parameters supported by core C<HTTP::WebTest> ! plugins. See section L<TEST PARAMETERS|TEST PARAMETERS>. =back --- 126,136 ---- =item * ! How tests can be specified. See section ! L<TEST SPECIFICATION|TEST SPECIFICATION>. =item * All test parameters supported by core C<HTTP::WebTest> ! plugins. See section L<TEST PARAMETERS|TEST PARAMETERS>. =back *************** *** 181,186 **** If you are running dozens of tests, you may want to divide them into ! several parameter files. This will organize the tests and reduce the ! size of the output and e-mail messages. However, cookies passed to or received from the web server(s) are not shared between tests in different parameter files. --- 181,186 ---- If you are running dozens of tests, you may want to divide them into ! several parameter files. This will organize the tests and reduce the ! size of the output and e-mail messages. However, cookies passed to or received from the web server(s) are not shared between tests in different parameter files. *************** *** 188,200 **** =head3 File format ! The wtscript file is a text file containing global parameters and ! test blocks containing test block parameters. A test block begins with ! a test_name parameter and ends with an end_test directive. The order of the parameters and test blocks is arbitrary. Test block parameters MUST occur between a test_name parameter and an ! end_test directive. (Test block parameters affect only an individual test.) Global parameters must NOT occur between a test_name parameter ! and an end_test directive. (This requirement does not apply to certain parameters that are both global and test block parameters.) --- 188,200 ---- =head3 File format ! The wtscript file is a text file containing global parameters and test ! blocks containing test block parameters. A test block begins with a ! test_name parameter and ends with an end_test directive. The order of the parameters and test blocks is arbitrary. Test block parameters MUST occur between a test_name parameter and an ! end_test directive. (Test block parameters affect only an individual test.) Global parameters must NOT occur between a test_name parameter ! and an end_test directive. (This requirement does not apply to certain parameters that are both global and test block parameters.) *************** *** 259,263 **** 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. --- 259,263 ---- 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. *************** *** 265,269 **** 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. --- 265,269 ---- 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. *************** *** 289,295 **** The parameters below specify tests of a local file and a remote URL. The tests specified by the C<text_forbid> parameter apply to both the ! "RayCosoft home page" and the "Yahoo home page" tests. Hence, if either returned page contains one of the case-insensitive strings in ! text_forbid, the test fails. If any test fails or the fetch of the URL fails, an e-mail will be sent to te...@un.... --- 289,295 ---- The parameters below specify tests of a local file and a remote URL. The tests specified by the C<text_forbid> parameter apply to both the ! "RayCosoft home page" and the "Yahoo home page" tests. Hence, if either returned page contains one of the case-insensitive strings in ! text_forbid, the test fails. If any test fails or the fetch of the URL fails, an e-mail will be sent to te...@un.... *************** *** 322,326 **** The parameters below specify a test of a local file containing Perl ! code using the L<Apache::ASP|Apache::ASP> module. The C<includes.htm> file requires five include files and two Perl modules, which are copied using the C<include_file_path> parameter. --- 322,326 ---- The parameters below specify a test of a local file containing Perl ! code using the L<Apache::ASP|Apache::ASP> module. The C<includes.htm> file requires five include files and two Perl modules, which are copied using the C<include_file_path> parameter. *************** *** 352,363 **** 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. --- 352,363 ---- 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. *************** *** 457,461 **** Following plugin modules come with HTTP::WebTest but they are not ! loaded by default. They should be loaded using global test parameter C<plugins> when needed. --- 457,461 ---- Following plugin modules come with HTTP::WebTest but they are not ! loaded by default. They should be loaded using global test parameter C<plugins> when needed. *************** *** 470,474 **** This plugin allows to define callback test parameters which are ! evaluated at specific time of L<HTTP::WebTest> test run. These test parameters can define user-defined checks. --- 470,474 ---- This plugin allows to define callback test parameters which are ! evaluated at specific time of L<HTTP::WebTest> test run. These test parameters can define user-defined checks. *************** *** 486,491 **** 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. --- 486,491 ---- 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. *************** *** 497,501 **** Content of this section should be autogenerated from POD documentation ! in plugin modules. Everything from this point till next =cut will be replaced with autogenerated documentation. --- 497,501 ---- Content of this section should be autogenerated from POD documentation ! in plugin modules. Everything from this point till next =cut will be replaced with autogenerated documentation. *************** *** 513,517 **** Content of this section should be autogenerated from POD documentation ! in Apache plugin module. Everything from this point till next =cut will be replaced with autogenerated documentation. --- 513,517 ---- Content of this section should be autogenerated from POD documentation ! in Apache plugin module. Everything from this point till next =cut will be replaced with autogenerated documentation. *************** *** 526,530 **** 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 specified, Apache must be installed. --- 526,530 ---- 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 specified, Apache must be installed. *************** *** 533,537 **** 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. --- 533,537 ---- 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. *************** *** 542,557 **** 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 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. ! This module is free software. It may be used, redistributed and/or modified under the terms of the Perl Artistic License. --- 542,557 ---- 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 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. ! This module is free software. It may be used, redistributed and/or modified under the terms of the Perl Artistic License. |
From: Ilya M. <m_...@us...> - 2002-05-12 13:35:44
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin In directory usw-pr-cvs1:/tmp/cvs-serv6771/lib/HTTP/WebTest/Plugin Modified Files: TextMatchTest.pm StatusTest.pm ResponseTimeTest.pm Loader.pm Hooks.pm HarnessReport.pm DefaultReport.pm Cookies.pm ContentSizeTest.pm Click.pm Apache.pm Log Message: Minor POD docs tweaks Index: TextMatchTest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/TextMatchTest.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TextMatchTest.pm 15 Feb 2002 23:59:44 -0000 1.3 --- TextMatchTest.pm 12 May 2002 13:35:35 -0000 1.4 *************** *** 14,18 **** This plugin provides test parameters which allow to check response ! body. It supports regexps and literal string searches. =cut --- 14,18 ---- This plugin provides test parameters which allow to check response ! body. It supports regexps and literal string searches. =cut *************** *** 146,152 **** =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 146,152 ---- =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: StatusTest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/StatusTest.pm,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** StatusTest.pm 24 Jan 2002 12:26:29 -0000 1.1.1.1 --- StatusTest.pm 12 May 2002 13:35:35 -0000 1.2 *************** *** 43,49 **** =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 43,49 ---- =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: ResponseTimeTest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/ResponseTimeTest.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ResponseTimeTest.pm 2 Feb 2002 04:08:19 -0000 1.2 --- ResponseTimeTest.pm 12 May 2002 13:35:35 -0000 1.3 *************** *** 96,102 **** =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 96,102 ---- =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: Loader.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/Loader.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Loader.pm 2 Feb 2002 04:08:19 -0000 1.2 --- Loader.pm 12 May 2002 13:35:35 -0000 1.3 *************** *** 32,38 **** I<GLOBAL PARAMETER> ! 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 = ( ::ValidateHTML ) --- 32,38 ---- I<GLOBAL PARAMETER> ! 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 = ( ::ValidateHTML ) *************** *** 70,74 **** =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 70,74 ---- =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: Hooks.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/Hooks.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Hooks.pm 16 Feb 2002 00:44:14 -0000 1.4 --- Hooks.pm 12 May 2002 13:35:35 -0000 1.5 *************** *** 32,36 **** This plugin module adds test parameters which values are evaluated at ! specific time of L<HTTP::WebTest> test run. It can be used to do some initialization before doing test request, to do some finalization when test response is received or to implement user defined tests without --- 32,36 ---- This plugin module adds test parameters which values are evaluated at ! specific time of L<HTTP::WebTest> test run. It can be used to do some initialization before doing test request, to do some finalization when test response is received or to implement user defined tests without *************** *** 48,59 **** =head2 on_request ! Value of this test parameter is ignored. However it is evaluted before ! L<HTTP::WebTest> does a request to web page so it is useful to do some ! initalization before the request. =head2 on_response ! This is list parameter which is treated as test result. It is evaluted ! when L<HTTP::WebTest> gets a response for the test request. It can be useful to define custom tests without writting new plugins --- 48,59 ---- =head2 on_request ! Value of this test parameter is ignored. However it is evaluted ! before L<HTTP::WebTest> does a request to web page so it is useful to ! do some initalization before the request. =head2 on_response ! This is list parameter which is treated as test result. It is ! evaluted when L<HTTP::WebTest> gets a response for the test request. It can be useful to define custom tests without writting new plugins *************** *** 68,73 **** 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. --- 68,73 ---- 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. *************** *** 134,138 **** =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 134,138 ---- =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: HarnessReport.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/HarnessReport.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** HarnessReport.pm 8 Apr 2002 06:50:26 -0000 1.4 --- HarnessReport.pm 12 May 2002 13:35:35 -0000 1.5 *************** *** 15,24 **** This plugin creates L<Test::Harness|Test::Harness> compatible test ! reports. This plugin is not loaded by default by ! L<HTTP::WebTest|HTTP::WebTest>. To load it use global test parameter C<plugins>. Unless you want to get mix of outputs from default and this report ! plugins default report plugin should disabled. See parameter C<default_report> (value C<no>). --- 15,24 ---- This plugin creates L<Test::Harness|Test::Harness> compatible test ! reports. This plugin is not loaded by default by ! L<HTTP::WebTest|HTTP::WebTest>. To load it use global test parameter C<plugins>. Unless you want to get mix of outputs from default and this report ! plugins default report plugin should disabled. See parameter C<default_report> (value C<no>). *************** *** 90,94 **** =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 90,94 ---- =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: DefaultReport.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/DefaultReport.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DefaultReport.pm 12 Feb 2002 12:47:10 -0000 1.4 --- DefaultReport.pm 12 May 2002 13:35:35 -0000 1.5 *************** *** 13,17 **** =head1 DESCRIPTION ! This plugin is default test report plugin. Builds simple plain text report. --- 13,17 ---- =head1 DESCRIPTION ! This plugin is default test report plugin. Builds simple plain text report. *************** *** 32,41 **** 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). =head3 Allowed values --- 32,41 ---- 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). =head3 Allowed values *************** *** 315,321 **** =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 315,321 ---- =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: Cookies.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/Cookies.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Cookies.pm 2 Feb 2002 04:08:19 -0000 1.2 --- Cookies.pm 12 May 2002 13:35:35 -0000 1.3 *************** *** 33,38 **** These cookies exist only while the program is executing and do not ! affect subsequent runs. These cookies do not affect your browser or ! any software other than the test program. These cookies are only accessible to other tests executed during test sequence execution. --- 33,38 ---- These cookies exist only while the program is executing and do not ! affect subsequent runs. These cookies do not affect your browser or ! any software other than the test program. These cookies are only accessible to other tests executed during test sequence execution. *************** *** 49,58 **** =head2 send_cookies ! Option to send cookies to web server. This applies to cookies received ! from the web server or cookies specified using the C<cookies> test ! parameter. This does NOT give the web server(s) access to cookies created with a ! browser or any user agent software other than this program. The cookies created while this program is running are only accessible to other tests in the same test sequence. --- 49,58 ---- =head2 send_cookies ! Option to send cookies to web server. This applies to cookies ! received from the web server or cookies specified using the C<cookies> ! test parameter. This does NOT give the web server(s) access to cookies created with a ! browser or any user agent software other than this program. The cookies created while this program is running are only accessible to other tests in the same test sequence. *************** *** 107,111 **** =item * name (REQUIRED) ! Name of cookie. Cannot begin with a $ character. =item * value (REQUIRED) --- 107,111 ---- =item * name (REQUIRED) ! Name of cookie. Cannot begin with a $ character. =item * value (REQUIRED) *************** *** 115,124 **** =item * path (REQUIRED) ! URL path name for which this cookie applies. Must begin with a / character. See also path_spec. =item * domain (REQUIRED) ! Domain for which cookie is valid. (REQUIRED). Should begin with a period. Must either contain two periods or be equal to C<.local>. --- 115,124 ---- =item * path (REQUIRED) ! URL path name for which this cookie applies. Must begin with a / character. See also path_spec. =item * domain (REQUIRED) ! Domain for which cookie is valid. (REQUIRED). Should begin with a period. Must either contain two periods or be equal to C<.local>. *************** *** 170,175 **** =item * discard ! Option to discard cookie when the program finishes. Default 0. (The ! cookie will be discarded regardless of the value of this element.) =over 4 --- 170,176 ---- =item * discard ! Option to discard cookie when the program finishes. Default is 0. ! (The cookie will be discarded regardless of the value of this ! element.) =over 4 *************** *** 187,191 **** =item * name/value ! Zero, one or several name/value pairs may be specified. The name parameters are words such as Comment or CommentURL and the value parameters are strings that may contain embedded blanks. --- 188,192 ---- =item * name/value ! Zero, one or several name/value pairs may be specified. The name parameters are words such as Comment or CommentURL and the value parameters are strings that may contain embedded blanks. *************** *** 301,307 **** =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 302,308 ---- =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: ContentSizeTest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/ContentSizeTest.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ContentSizeTest.pm 15 Feb 2002 23:37:38 -0000 1.4 --- ContentSizeTest.pm 12 May 2002 13:35:35 -0000 1.5 *************** *** 96,102 **** =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 96,102 ---- =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: Click.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/Click.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Click.pm 27 Apr 2002 22:01:26 -0000 1.4 --- Click.pm 12 May 2002 13:35:35 -0000 1.5 *************** *** 201,205 **** =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 201,205 ---- =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: Apache.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/Apache.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Apache.pm 2 Feb 2002 04:08:19 -0000 1.3 --- Apache.pm 12 May 2002 13:35:35 -0000 1.4 *************** *** 13,18 **** =head1 DESCRIPTION ! This plugin provides support for local web file test mode. Apache must ! be installed to run tests in this mode. =for pod_merge copy apache --- 13,18 ---- =head1 DESCRIPTION ! This plugin provides support for local web file test mode. Apache ! must be installed to run tests in this mode. =for pod_merge copy apache *************** *** 24,37 **** The C<apache_dir> parameter must be set to the name of a directory ! that contains the subdirectories C<conf>, C<logs> and C<htdocs>. The ! C<conf> subdirectory must contain a file named C<httpd.conf-dist>. The ! C<htdocs> subdirectory must contain a subdirectory named C<webtest> ! that contains a file named C<is_apache_responding.html>. If your ! installation of Apache has the Perl module L<Apache::ASP|Apache::ASP> ! configured, the C<apache_dir> directory must also contain a ! subdirectory named C<asp_tmp>. The file C<httpd.conf-dist> is used as template for the Apache config ! file. It contains tags which are replaced with the values needed by the Apache server that the program starts at runtime. --- 24,37 ---- The C<apache_dir> parameter must be set to the name of a directory ! that contains the subdirectories C<conf>, C<logs> and C<htdocs>. The ! C<conf> subdirectory must contain a file named C<httpd.conf-dist>. ! The C<htdocs> subdirectory must contain a subdirectory named ! C<webtest> that contains a file named C<is_apache_responding.html>. ! If your installation of Apache has the Perl module ! L<Apache::ASP|Apache::ASP> configured, the C<apache_dir> directory ! must also contain a subdirectory named C<asp_tmp>. The file C<httpd.conf-dist> is used as template for the Apache config ! file. It contains tags which are replaced with the values needed by the Apache server that the program starts at runtime. *************** *** 84,91 **** I<GLOBAL PARAMETER> ! Absolute or relative path name of directory containing ! Apache files. See the ! L<APACHE DIRECTORY AND FILES|/"APACHE DIRECTORY AND FILES"> section. ! This parameter is ignored unless the C<file_path> parameter is specified. =head3 Default value --- 84,91 ---- I<GLOBAL PARAMETER> ! Absolute or relative path name of directory containing Apache files. ! See the L<APACHE DIRECTORY AND FILES|/"APACHE DIRECTORY AND FILES"> ! section. This parameter is ignored unless the C<file_path> parameter ! is specified. =head3 Default value *************** *** 97,103 **** I<GLOBAL PARAMETER> ! Absolute or relative path name of Apache executable. This command can ! be in your C<$PATH>. This parameter is ignored unless the C<file_path> ! parameter is specified. =head3 Default value --- 97,103 ---- I<GLOBAL PARAMETER> ! Absolute or relative path name of Apache executable. This command can ! be in your C<$PATH>. This parameter is ignored unless the ! C<file_path> parameter is specified. =head3 Default value *************** *** 109,116 **** I<GLOBAL PARAMETER> ! Apache logging level. If you use a level less than C<warn> (i.e., C<debug>, C<info>, or C<notice>), the program may generate irrelevant ! errors. This parameter is ignored unless the C<file_path> parameter is ! specified. See also the C<ignore_error_log> parameter. =head3 Allowed values --- 109,116 ---- I<GLOBAL PARAMETER> ! Apache logging level. If you use a level less than C<warn> (i.e., C<debug>, C<info>, or C<notice>), the program may generate irrelevant ! errors. This parameter is ignored unless the C<file_path> parameter ! is specified. See also the C<ignore_error_log> parameter. =head3 Allowed values *************** *** 127,131 **** I<GLOBAL PARAMETER> ! Maximum number of seconds to wait for Apache to start. This parameter is ignored unless the C<file_path> parameter is specified. --- 127,131 ---- I<GLOBAL PARAMETER> ! Maximum number of seconds to wait for Apache to start. This parameter is ignored unless the C<file_path> parameter is specified. *************** *** 138,145 **** I<GLOBAL PARAMETER> ! Additional Apache command line options. Many of the options cause Apache to exit immediately after starting, so the web page tests will ! not run. This parameter is ignored unless the C<file_path> parameter is ! specified. =head3 Allowed values --- 138,145 ---- I<GLOBAL PARAMETER> ! Additional Apache command line options. Many of the options cause Apache to exit immediately after starting, so the web page tests will ! not run. This parameter is ignored unless the C<file_path> parameter ! is specified. =head3 Allowed values *************** *** 151,167 **** I<GLOBAL PARAMETER> ! The pathname of a local web server error log. The module counts the ! number of lines in the error log before and after each request. If the ! number of lines increases, an error is counted and the additional ! lines are listed in the report. This argument should be used only when ! the local web server is running in single-process mode. Otherwise, ! requests generated by other processes/users may add lines to the error ! log that are not related to the requests generated by this module. See ! also parameter C<ignore_error_log>. =head2 file_path If L<HTTP::WebTest|HTTP::WebTest> encounters parameter C<file_path> it ! switches in local web file test mode. In local web file test mode it launches an instance of Apache daemon, copies local test file(s) under DocumentRoot of this Apache and performs test checks against it. --- 151,167 ---- I<GLOBAL PARAMETER> ! The pathname of a local web server error log. The module counts the ! number of lines in the error log before and after each request. If ! the number of lines increases, an error is counted and the additional ! lines are listed in the report. This argument should be used only ! when the local web server is running in single-process mode. ! Otherwise, requests generated by other processes/users may add lines ! to the error log that are not related to the requests generated by ! this module. See also parameter C<ignore_error_log>. =head2 file_path If L<HTTP::WebTest|HTTP::WebTest> encounters parameter C<file_path> it ! switches in local web file test mode. In local web file test mode it launches an instance of Apache daemon, copies local test file(s) under DocumentRoot of this Apache and performs test checks against it. *************** *** 169,186 **** =head3 Allowed values ! Two-element list. First element is the file to test, either an ! absolute or a relative pathname. Second element is the subdirectory pathname, relative to the Apache htdocs directory, to copy the file ! to. The copied file will have the same basename as the first element ! and the relative pathname of the second element. To copy the file directly to the htdocs directory, use a pathname of C<.> or C<./.>. =head2 ignore_error_log ! Option to ignore any errors found in the Apache error log. The default ! behavior is to flag an error if the fetch causes any errors to be ! added to the error log and echo the errors to the program output. This ! check is available only if C<error_log> parameter is specified. See also ! the C<apache_loglevel> parameter. =head3 Allowed values --- 169,186 ---- =head3 Allowed values ! Two-element list. First element is the file to test, either an ! absolute or a relative pathname. Second element is the subdirectory pathname, relative to the Apache htdocs directory, to copy the file ! to. The copied file will have the same basename as the first element ! and the relative pathname of the second element. To copy the file directly to the htdocs directory, use a pathname of C<.> or C<./.>. =head2 ignore_error_log ! Option to ignore any errors found in the Apache error log. The ! default behavior is to flag an error if the fetch causes any errors to ! be added to the error log and echo the errors to the program output. ! This check is available only if C<error_log> parameter is specified. ! See also the C<apache_loglevel> parameter. =head3 Allowed values *************** *** 194,203 **** =head2 include_file_path ! List with an even number of elements. Odd-numbered elements are files to copy to the the temporary Apache directory before running the ! tests. These files can be specified using either an absolute or a ! relative pathname. Even-numbered elements are the subdirectory pathname, relative to the Apache ServerRoot directory, to copy the ! corresponding file to. The copied file will have the same basename as the odd-numbered element and the relative pathname of the corresponding even-numbered element. To copy the file directly to the --- 194,203 ---- =head2 include_file_path ! List with an even number of elements. Odd-numbered elements are files to copy to the the temporary Apache directory before running the ! tests. These files can be specified using either an absolute or a ! relative pathname. Even-numbered elements are the subdirectory pathname, relative to the Apache ServerRoot directory, to copy the ! corresponding file to. The copied file will have the same basename as the odd-numbered element and the relative pathname of the corresponding even-numbered element. To copy the file directly to the *************** *** 210,216 **** will copy the file to htdocs/includes/header.inc. ! This parameter is also useful for adding Perl modules that are ! needed by the web page specified by the file_path parameter. For ! example: include_file_path = ( ../apps/myapp/DBconn.pm => lib/perl/apps ) --- 210,215 ---- will copy the file to htdocs/includes/header.inc. ! This parameter is also useful for adding Perl modules that are needed ! by the web page specified by the file_path parameter. For example: include_file_path = ( ../apps/myapp/DBconn.pm => lib/perl/apps ) *************** *** 389,393 **** # forks a child process that starts Apache in on a random ! # private/dynamic port number. Verifies that Apache has started by # fetching a test page and searching the fetched page for a tag line. sub start_apache { --- 388,392 ---- # forks a child process that starts Apache in on a random ! # private/dynamic port number. Verifies that Apache has started by # fetching a test page and searching the fetched page for a tag line. sub start_apache { *************** *** 543,549 **** # copy a file to a root directory concatenated with a relative ! # pathname, creating directories as needed. The basename of the file ! # is preserved. Returns pathname of file that was created, relative to ! # root directory sub copy_file { my $self = shift; --- 542,548 ---- # copy a file to a root directory concatenated with a relative ! # pathname, creating directories as needed. The basename of the file ! # is preserved. Returns pathname of file that was created, relative ! # to root directory sub copy_file { my $self = shift; *************** *** 593,599 **** =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 592,598 ---- =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or |
From: Ilya M. <m_...@us...> - 2002-05-12 13:35:44
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory usw-pr-cvs1:/tmp/cvs-serv6771/lib/HTTP/WebTest Modified Files: Utils.pm TestResult.pm Test.pm ReportPlugin.pm Plugins.pod Plugin.pm Parser.pm Cookies.pm Cookbook.pod API.pm Log Message: Minor POD docs tweaks Index: Utils.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Utils.pm,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Utils.pm 24 Jan 2002 12:26:28 -0000 1.1.1.1 --- Utils.pm 12 May 2002 13:35:35 -0000 1.2 *************** *** 50,54 **** Creates anonymouse subroutine which can be used as accessor ! method. Such method can be used together with objects which are based on blessed hashes. --- 50,54 ---- Creates anonymouse subroutine which can be used as accessor ! method. Such method can be used together with objects which are based on blessed hashes. *************** *** 68,72 **** If C<$optional_default_value> is a code reference uses values returned ! by its execution as default for created accessor method. Otherwise uses C<$optional_default_value> as name of method which returns default value for created accessor method. --- 68,72 ---- If C<$optional_default_value> is a code reference uses values returned ! by its execution as default for created accessor method. Otherwise uses C<$optional_default_value> as name of method which returns default value for created accessor method. *************** *** 198,202 **** =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 198,202 ---- =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: TestResult.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/TestResult.pm,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TestResult.pm 24 Jan 2002 12:26:24 -0000 1.1.1.1 --- TestResult.pm 12 May 2002 13:35:35 -0000 1.2 *************** *** 22,26 **** =head1 DESCRIPTION ! Objects of this class represent test results. Test results are basicaly C<ok>/C<not ok> and some attached commentary. --- 22,26 ---- =head1 DESCRIPTION ! Objects of this class represent test results. Test results are basicaly C<ok>/C<not ok> and some attached commentary. *************** *** 69,73 **** =head3 Returns ! True if test is successful. False otherwise. =cut --- 69,73 ---- =head3 Returns ! True if test is successful. False otherwise. =cut *************** *** 87,91 **** *comment = make_access_method('COMMENT'); ! # this method is used to overload 'bool' operation. 'ok' can't be used # directly because method which is overloads operation is called with # some additional arguments which doesn't play nice with accessor --- 87,91 ---- *comment = make_access_method('COMMENT'); ! # this method is used to overload 'bool' operation. 'ok' can't be used # directly because method which is overloads operation is called with # some additional arguments which doesn't play nice with accessor *************** *** 95,99 **** =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 95,99 ---- =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: Test.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Test.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Test.pm 28 Jan 2002 06:32:02 -0000 1.2 --- Test.pm 12 May 2002 13:35:35 -0000 1.3 *************** *** 31,35 **** =head1 DESCRIPTION ! Objects of this class represent tests. They store both test params and test results. --- 31,35 ---- =head1 DESCRIPTION ! Objects of this class represent tests. They store both test params and test results. *************** *** 156,160 **** Tries to convert test definition in some form into ! C<HTTP::WebTest::Test> object. Currenlty supports test defintion in form of C<HTTP::WebTest::Test> object (it is just passed throw) or in form of hash reference: --- 156,160 ---- Tries to convert test definition in some form into ! C<HTTP::WebTest::Test> object. Currenlty supports test defintion in form of C<HTTP::WebTest::Test> object (it is just passed throw) or in form of hash reference: *************** *** 196,200 **** =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 196,200 ---- =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: ReportPlugin.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/ReportPlugin.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ReportPlugin.pm 2 Feb 2002 04:08:19 -0000 1.2 --- ReportPlugin.pm 12 May 2002 13:35:35 -0000 1.3 *************** *** 13,21 **** =head1 DESCRIPTION ! This is subclass of ! L<HTTP::WebTest|HTTP::WebTest::Plugin>. L<HTTP::WebTest|HTTP::WebTest> ! report plugin classes can subclass this class. It handles some test ! parameters common to report plugins by providing implementation of ! method C<print>. See below. =cut --- 13,20 ---- =head1 DESCRIPTION ! This is subclass of L<HTTP::WebTest|HTTP::WebTest::Plugin>. ! L<HTTP::WebTest|HTTP::WebTest> report plugin classes can subclass this ! class. It handles some test parameters common to report plugins by ! providing implementation of method C<print>. See below. =cut *************** *** 37,41 **** 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. --- 36,40 ---- 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. *************** *** 49,53 **** A filehandle (or anything else that supports C<print>) to use for test ! report output. This parameter is ignored if test parameter C<output_ref> is specified also. --- 48,52 ---- A filehandle (or anything else that supports C<print>) to use for test ! report output. This parameter is ignored if test parameter C<output_ref> is specified also. *************** *** 170,174 **** This method is called by L<HTTP::WebTest|HTTP::WebTest> at the begin ! of test run. Its implementation in this class inits output buffer for test report. --- 169,173 ---- This method is called by L<HTTP::WebTest|HTTP::WebTest> at the begin ! of test run. Its implementation in this class inits output buffer for test report. *************** *** 197,201 **** This method is called by L<HTTP::WebTest|HTTP::WebTest> at the end of ! test run. Its implementation in this class can email test report according test parameters C<mail***>. --- 196,200 ---- This method is called by L<HTTP::WebTest|HTTP::WebTest> at the end of ! test run. Its implementation in this class can email test report according test parameters C<mail***>. *************** *** 273,277 **** =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 272,276 ---- =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: Plugins.pod =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugins.pod,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Plugins.pod 16 Feb 2002 23:48:54 -0000 1.3 --- Plugins.pod 12 May 2002 13:35:35 -0000 1.4 *************** *** 17,30 **** Plugin can be used to add new test types and add new report ! types. Plugin is just a Perl package which defines class with a number of methods which if present are called by L<HTTP::WebTest|HTTP::WebTest> at various stages of test. Each plugin package should subclass ! L<HTTP::WebTest::Plugin|HTTP::WebTest::Plugin>. Report plugins can subclass L<HTTP::WebTest::ReportPlugin|HTTP::WebTest::ReportPlugin> which is subclass of L<HTTP::WebTest::Plugin|HTTP::WebTest::Plugin> instead of ! it. L<HTTP::WebTest::ReportPlugin|HTTP::WebTest::ReportPlugin> defines some helper methods useful in report plugin and handles some test parameters common for report plugins. --- 17,30 ---- Plugin can be used to add new test types and add new report ! types. Plugin is just a Perl package which defines class with a number of methods which if present are called by L<HTTP::WebTest|HTTP::WebTest> at various stages of test. Each plugin package should subclass ! L<HTTP::WebTest::Plugin|HTTP::WebTest::Plugin>. Report plugins can subclass L<HTTP::WebTest::ReportPlugin|HTTP::WebTest::ReportPlugin> which is subclass of L<HTTP::WebTest::Plugin|HTTP::WebTest::Plugin> instead of ! it. L<HTTP::WebTest::ReportPlugin|HTTP::WebTest::ReportPlugin> defines some helper methods useful in report plugin and handles some test parameters common for report plugins. *************** *** 46,54 **** PARAM is a name of test parameter and TYPE is it's type ! specification. It should be separated by any whitespace character. Each test parameter type is defined by method in ! L<HTTP::WebTest::Plugin|HTTP::WebTest::Plugin>. Type C<foobar> is ! defined as method C<check_foobar> in this package. See its documentation for list of all C<check_****> methods which define all known test types. --- 46,54 ---- PARAM is a name of test parameter and TYPE is it's type ! specification. It should be separated by any whitespace character. Each test parameter type is defined by method in ! L<HTTP::WebTest::Plugin|HTTP::WebTest::Plugin>. Type C<foobar> is ! defined as method C<check_foobar> in this package. See its documentation for list of all C<check_****> methods which define all known test types. *************** *** 67,71 **** L<HTTP::WebTest::Plugin::TextMatchTest|HTTP::WebTest::Plugin::TextMatchTest>. It defines following test parameters: C<ignore_case>, C<text_forbid>, ! C<text_require>, C<regex_forbid>, C<regex_require>. C<yesno> and C<list> are test parameter types. --- 67,71 ---- L<HTTP::WebTest::Plugin::TextMatchTest|HTTP::WebTest::Plugin::TextMatchTest>. It defines following test parameters: C<ignore_case>, C<text_forbid>, ! C<text_require>, C<regex_forbid>, C<regex_require>. C<yesno> and C<list> are test parameter types. *************** *** 76,87 **** =head2 start_tests () ! Called before runing test sequence. You can put here some ! initalization. Report plugins can use this hook to create header of report. =head2 end_tests () ! Called when test sequence is finished. You can put here some ! finialization code. Report plugins can use this hook to finish creation of report. --- 76,87 ---- =head2 start_tests () ! Called before runing test sequence. You can put here some ! initalization. Report plugins can use this hook to create header of report. =head2 end_tests () ! Called when test sequence is finished. You can put here some ! finialization code. Report plugins can use this hook to finish creation of report. *************** *** 89,103 **** Called before L<HTTP::WebTest|HTTP::WebTest> does HTTP ! request. Various properties of request here can be set here. =head2 check_response () Called once L<HTTP::WebTest|HTTP::WebTest> did HTTP request and have ! got HTTP response. Test checks should be placed here. =head2 report_test () Called when L<HTTP::WebTest|HTTP::WebTest> got HTTP response after ! <check_response> hooks. Normally used by report plugins to generate piece of report about test step just done. --- 89,103 ---- Called before L<HTTP::WebTest|HTTP::WebTest> does HTTP ! request. Various properties of request here can be set here. =head2 check_response () Called once L<HTTP::WebTest|HTTP::WebTest> did HTTP request and have ! got HTTP response. Test checks should be placed here. =head2 report_test () Called when L<HTTP::WebTest|HTTP::WebTest> got HTTP response after ! <check_response> hooks. Normally used by report plugins to generate piece of report about test step just done. *************** *** 113,117 **** C<TEST_GROUP_NAME> is a string which describes a group of test checks ! and their results. It is used during generation of test report. C<TEST_RESULT> is an --- 113,117 ---- C<TEST_GROUP_NAME> is a string which describes a group of test checks ! and their results. It is used during generation of test report. C<TEST_RESULT> is an *************** *** 137,141 **** =item L<HTTP::WebTest::Plugin::DefaultReport|HTTP::WebTest::Plugin::DefaultReport> ! Example of report plugin. Uses C<start_tests>, C<report_test> and C<end_tests> hooks. --- 137,141 ---- =item L<HTTP::WebTest::Plugin::DefaultReport|HTTP::WebTest::Plugin::DefaultReport> ! Example of report plugin. Uses C<start_tests>, C<report_test> and C<end_tests> hooks. *************** *** 144,148 **** =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 144,148 ---- =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: Plugin.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Plugin.pm 24 Mar 2002 12:11:18 -0000 1.9 --- Plugin.pm 12 May 2002 13:35:35 -0000 1.10 *************** *** 13,18 **** =head1 DESCRIPTION ! L<HTTP::WebTest|HTTP::WebTest> plugin classes can subclass this ! class. It provides some useful helper methods. =head1 METHODS --- 13,18 ---- =head1 DESCRIPTION ! L<HTTP::WebTest|HTTP::WebTest> plugin classes can subclass this class. ! It provides some useful helper methods. =head1 METHODS *************** *** 121,125 **** If global test parameter C<$param> is defined returns true if latest ! test parameter C<$param> is C<yes>. False otherwise. =cut --- 121,125 ---- If global test parameter C<$param> is defined returns true if latest ! test parameter C<$param> is C<yes>. False otherwise. =cut *************** *** 144,148 **** If latest test parameter C<$param> is defined returns true if latest ! test parameter C<$param> is C<yes>. False otherwise. =cut --- 144,148 ---- If latest test parameter C<$param> is defined returns true if latest ! test parameter C<$param> is C<yes>. False otherwise. =cut *************** *** 233,237 **** =head2 validate_params (@params) ! Checks test parameters listed in C<@params>. Throws exception if any of them are invalid. --- 233,237 ---- =head2 validate_params (@params) ! Checks test parameters listed in C<@params>. Throws exception if any of them are invalid. *************** *** 252,256 **** =head2 global_validate_params (@params) ! Checks global test parameters listed in C<@params>. Throws exception if any of them are invalid. --- 252,256 ---- =head2 global_validate_params (@params) ! Checks global test parameters listed in C<@params>. Throws exception if any of them are invalid. *************** *** 302,307 **** =head2 param_types () ! Method which should be redefined in subclasses. Returns information ! about test parameters which are supported by plugin. Used to validate tests. --- 302,307 ---- =head2 param_types () ! Method which should be redefined in subclasses. Returns information ! about test parameters which are supported by plugin. Used to validate tests. *************** *** 324,328 **** type. ! This is NOOP operation. It always succeed. =cut --- 324,328 ---- type. ! This is NOOP operation. It always succeed. =cut *************** *** 333,340 **** Method which checks test parameter if it is value is of C<list> ! type. That is it is a reference on an array. Optional list C<@optional_spec> can define specification on allowed ! elements of list. It can be either ('TYPE_1', 'TYPE_2', ..., 'TYPE_N') --- 333,340 ---- Method which checks test parameter if it is value is of C<list> ! type. That is it is a reference on an array. Optional list C<@optional_spec> can define specification on allowed ! elements of list. It can be either ('TYPE_1', 'TYPE_2', ..., 'TYPE_N') *************** *** 345,349 **** First specification requires list value of test parameter to contain ! C<N> elements. First element of list should be of should C<TYPE_1> type, second element of list should of C<TYPE_2> type, ..., N-th element of list should be of C<TYPE_N> type. --- 345,349 ---- First specification requires list value of test parameter to contain ! C<N> elements. First element of list should be of should C<TYPE_1> type, second element of list should of C<TYPE_2> type, ..., N-th element of list should be of C<TYPE_N> type. *************** *** 401,405 **** Method which checks test parameter if it is value is of C<scalar> ! type. That is it is usual Perl scalar and is not a reference. If C<$optional_regexp> is specified also checks value of parameter --- 401,405 ---- Method which checks test parameter if it is value is of C<scalar> ! type. That is it is usual Perl scalar and is not a reference. If C<$optional_regexp> is specified also checks value of parameter *************** *** 430,434 **** Method which checks test parameter if it is value is of C<stringref> ! type. That is it is a reference on scalar. =head3 Exceptions --- 430,434 ---- Method which checks test parameter if it is value is of C<stringref> ! type. That is it is a reference on scalar. =head3 Exceptions *************** *** 450,454 **** Method which checks test parameter if it is value is of C<uri> ! type. That is it either scalar or L<URI|URI> object. =head3 Exceptions --- 450,454 ---- Method which checks test parameter if it is value is of C<uri> ! type. That is it either scalar or L<URI|URI> object. =head3 Exceptions *************** *** 477,481 **** Method which checks test parameter if it is value is of C<hashlist> ! type. That is it is either a hash reference or an array reference which points to array containing even number of elements. --- 477,481 ---- Method which checks test parameter if it is value is of C<hashlist> ! type. That is it is either a hash reference or an array reference which points to array containing even number of elements. *************** *** 523,527 **** =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 523,527 ---- =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: Parser.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Parser.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Parser.pm 12 Feb 2002 11:47:20 -0000 1.7 --- Parser.pm 12 May 2002 13:35:35 -0000 1.8 *************** *** 103,110 **** # let Perl remove quote chars and handle special # sequences like \n but don't treat $ and @ as ! # special. Note \\\\ in patterns. It is actually just ! # *one* backslash. Four chars are because of double ! # quoting (one inside parser grammar definition, ! # second inside regexp body) if($delim eq '"') { $extracted =~ s/(^|[^\\\\])((?:\\\\\\\\)*)(\\\\)(\$|\@)/$1$2$3$3$4/g; --- 103,110 ---- # let Perl remove quote chars and handle special # sequences like \n but don't treat $ and @ as ! # special. Note \\\\ in patterns. It is actually ! # just *one* backslash. Four chars are because of ! # double quoting (one inside parser grammar ! # definition, second inside regexp body) if($delim eq '"') { $extracted =~ s/(^|[^\\\\])((?:\\\\\\\\)*)(\\\\)(\$|\@)/$1$2$3$3$4/g; *************** *** 210,214 **** =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 210,214 ---- =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: Cookies.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Cookies.pm,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Cookies.pm 24 Jan 2002 12:26:24 -0000 1.1.1.1 --- Cookies.pm 12 May 2002 13:35:35 -0000 1.2 *************** *** 62,67 **** =head2 extract_cookies (...) ! Overloaded method. Passes all arguments to C<SUPER::extract_cookies> ! if receipt of cookies is enabled. Does nothing otherwise. =cut --- 62,67 ---- =head2 extract_cookies (...) ! Overloaded method. Passes all arguments to C<SUPER::extract_cookies> ! if receipt of cookies is enabled. Does nothing otherwise. =cut *************** *** 74,79 **** =head2 add_cookie_header (...) ! Overloaded method. Passes all arguments to C<SUPER::add_cookie_header> ! if transmission of cookies is enabled. Does nothing otherwise. =cut --- 74,79 ---- =head2 add_cookie_header (...) ! Overloaded method. Passes all arguments to C<SUPER::add_cookie_header> ! if transmission of cookies is enabled. Does nothing otherwise. =cut *************** *** 86,92 **** =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 86,92 ---- =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: Cookbook.pod =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Cookbook.pod,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Cookbook.pod 27 Apr 2002 22:02:51 -0000 1.9 --- Cookbook.pod 12 May 2002 13:35:35 -0000 1.10 *************** *** 220,224 **** =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 220,224 ---- =head1 COPYRIGHT ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or Index: API.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/API.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** API.pm 24 Mar 2002 11:01:36 -0000 1.9 --- API.pm 12 May 2002 13:35:35 -0000 1.10 *************** *** 1,5 **** # $Id$ ! # note that it is not package HTTP::WebTest::API. That's right package HTTP::WebTest; --- 1,5 ---- # $Id$ ! # note that it is not package HTTP::WebTest::API. That's right package HTTP::WebTest; *************** *** 248,253 **** =head3 Returns ! A list of two elements. First element is a reference on array which ! contains test objects. Second element is a reference on hash which contains optional global parameters for test. --- 248,253 ---- =head3 Returns ! A list of two elements. First element is a reference on array which ! contains test objects. Second element is a reference on hash which contains optional global parameters for test. *************** *** 274,278 **** Most users don't need to use this part of C<HTTP::WebTest> API ! directly. It could be useful for users who want to: =over 4 --- 274,278 ---- Most users don't need to use this part of C<HTTP::WebTest> API ! directly. It could be useful for users who want to: =over 4 *************** *** 303,307 **** Can switch user agent used by C<HTTP::WebTest> object if ! C<$optional_user_agent> is a user agent object. If $optional_user_agent is passed as undef, the HTTP::WebTest object is reset to use default user agent. --- 303,307 ---- Can switch user agent used by C<HTTP::WebTest> object if ! C<$optional_user_agent> is a user agent object. If $optional_user_agent is passed as undef, the HTTP::WebTest object is reset to use default user agent. *************** *** 318,327 **** Can set plugins to be used during tests if C<$optional_plugins> is a ! reference on array which contains plugin objects. If it is passed as undef resets C<HTTP::WebTest> object to use default set of plugins. =head3 Returns ! A reference on array which contains plugin objects. Note that if you add or remove plugin objects to this array it will change set of plugins used by C<HTTP::WebTest> object during tests. --- 318,327 ---- Can set plugins to be used during tests if C<$optional_plugins> is a ! reference on array which contains plugin objects. If it is passed as undef resets C<HTTP::WebTest> object to use default set of plugins. =head3 Returns ! A reference on array which contains plugin objects. Note that if you add or remove plugin objects to this array it will change set of plugins used by C<HTTP::WebTest> object during tests. *************** *** 593,597 **** C<HTTP::WebTest 2.xx> offers more rich API than its predecessor ! C<HTTP::WebTest 1.xx>. However while old API is deprecated it is still supported. --- 593,597 ---- C<HTTP::WebTest 2.xx> offers more rich API than its predecessor ! C<HTTP::WebTest 1.xx>. However while old API is deprecated it is still supported. *************** *** 650,654 **** =head2 run_web_test ($tests, $num_fail_ref, $num_succeed_ref, $optional_options) ! This is not a method. It is subroutine which creates a C<HTTP::WebTest> object and runs test sequence using it. --- 650,654 ---- =head2 run_web_test ($tests, $num_fail_ref, $num_succeed_ref, $optional_options) ! This is not a method. It is subroutine which creates a C<HTTP::WebTest> object and runs test sequence using it. *************** *** 705,711 **** =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or --- 705,711 ---- =head1 COPYRIGHT ! Copyright (c) 2000-2001 Richard Anderson. All rights reserved. ! Copyright (c) 2001,2002 Ilya Martynov. All rights reserved. This module is free software. It may be used, redistributed and/or |
From: Ilya M. <m_...@us...> - 2002-05-11 18:51:04
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv19388 Modified Files: Changes Log Message: Updated Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Changes 8 Apr 2002 07:36:48 -0000 1.22 --- Changes 11 May 2002 18:51:01 -0000 1.23 *************** *** 7,19 **** Revision history for Perl module HTTP::WebTest. 1.99_05 Mon Apr 8 2002 BUG FIXES: ! * Fixed bug in HTTP::WebTest::Plugin::check_list. It affected test ! parameter 'mail_addresses'. Thanks to Duncan Cameron for patch. ! * Fixed bug in HTTP::WebTest::Plugin::HarnessReport. This report ! plugin printed 'ok' even for failed tests. Thanks to Martin Langhoff for patch. --- 7,27 ---- Revision history for Perl module HTTP::WebTest. + Current version + + BUG FIXES: + + * Set Content-type to 'application/x-www-form-urlencoded' for + POST. Fixed for second time. Apparently code to do this was lost + during HTTP-WebTest rewrite. Thanks to Duncan Cameron for patch. + 1.99_05 Mon Apr 8 2002 BUG FIXES: ! * Fixed bug in HTTP::WebTest::Plugin::check_list. It affected test ! parameter 'mail_addresses'. Thanks to Duncan Cameron for patch. ! * Fixed bug in HTTP::WebTest::Plugin::HarnessReport. This report ! plugin printed 'ok' even for failed tests. Thanks to Martin Langhoff for patch. *************** *** 29,41 **** * Support for embeded Perl in wtscript files. ! * Added test parameters 'user_agent' and 'show_headers'. Thanks to Markus Kucborski for patch. ! * Updated docs on format of wtscript files. Thanks to Richard Anderson. ! * HTTP-WebTest does follow redirects after POST now. Note that it ! breaks RFC but actually it is semi-standart behaviour of all ! browsers. Thanks to Thieme Geoff for bugging me about it :) * Added non-core plugin HTTP::WebTest::Plugin::Hooks which defines two --- 37,49 ---- * Support for embeded Perl in wtscript files. ! * Added test parameters 'user_agent' and 'show_headers'. Thanks to Markus Kucborski for patch. ! * Updated docs on format of wtscript files. Thanks to Richard Anderson. ! * HTTP-WebTest does follow redirects after POST now. Note that it ! breaks RFC but actually it is semi-standart behaviour of all browsers. ! Thanks to Thieme Geoff for bugging me about it :) * Added non-core plugin HTTP::WebTest::Plugin::Hooks which defines two *************** *** 44,65 **** INCOMPATIBILITIES: ! * Test parameters validation API have been changed. All plugins have been fixed to conform new API. This change is required for proper support of embeded Perl in wtscript files. ! * Changed format of wtscript files. Speaking more precisely rules for ! test parameters value quoting have been changed to be more Perl ! alike. It means that value of param should be written either as ! value - any string without special chars like => or ). It is treated in same way as in old HTTP::WebTest "value" - usual Perl string quoting rules apply (i.e sequences like \n, \r, etc are treated as special and " can be escaped with ! \"). It is new in HTTP::WebTest. 'value' - usual Perl string quoting rules apply (i.e sequences like \n is not tread as special but ' can be escaped with ! \'). This change breaks previosly allowed ''value'' style for escaping quote characters. --- 52,73 ---- INCOMPATIBILITIES: ! * Test parameters validation API have been changed. All plugins have been fixed to conform new API. This change is required for proper support of embeded Perl in wtscript files. ! * Changed format of wtscript files. Speaking more precisely rules for ! test parameters value quoting have been changed to be more Perl alike. ! It means that value of param should be written either as ! value - any string without special chars like => or ). It is treated in same way as in old HTTP::WebTest "value" - usual Perl string quoting rules apply (i.e sequences like \n, \r, etc are treated as special and " can be escaped with ! \"). It is new in HTTP::WebTest. 'value' - usual Perl string quoting rules apply (i.e sequences like \n is not tread as special but ' can be escaped with ! \'). This change breaks previosly allowed ''value'' style for escaping quote characters. *************** *** 71,75 **** 1.99_03 Mon Jan 28 2002 ! * Numerous documentation fixes. Thanks to Richard Anderson for reviewing and correcting POD docs. --- 79,83 ---- 1.99_03 Mon Jan 28 2002 ! * Numerous documentation fixes. Thanks to Richard Anderson for reviewing and correcting POD docs. *************** *** 78,82 **** * Added 'default_report' test parameter which can be used to ! disable test report output from default report plugin. It can be useful if it is desired to use another report plugin for test output. --- 86,90 ---- * Added 'default_report' test parameter which can be used to ! disable test report output from default report plugin. It can be useful if it is desired to use another report plugin for test output. *************** *** 86,95 **** * Renamed method HTTP::WebTest::validate_test to ! HTTP::WebTest::validate_params. Make it validate hash with test parameters instead of test object. * Now HTTP::WebTest does validate global test parameters. ! * Names of tests specified in wtscript files was ignored. It is fixed now. --- 94,103 ---- * Renamed method HTTP::WebTest::validate_test to ! HTTP::WebTest::validate_params. Make it validate hash with test parameters instead of test object. * Now HTTP::WebTest does validate global test parameters. ! * Names of tests specified in wtscript files was ignored. It is fixed now. *************** *** 103,107 **** * Moved autogenerated documentation on general module usage into HTTP::WebTest. Moved code and API documentation from ! HTTP::WebTest into HTTP::WebTest::API. Suggested by Richard Anderson <ri...@ri...>. --- 111,115 ---- * Moved autogenerated documentation on general module usage into HTTP::WebTest. Moved code and API documentation from ! HTTP::WebTest into HTTP::WebTest::API. Suggested by Richard Anderson <ri...@ri...>. *************** *** 109,113 **** distribution. Don't create it during module build and installation stage (i.e. perl Makefile.PL; make; make ! install). Suggested by Richard Anderson <ri...@ri...>. --- 117,121 ---- distribution. Don't create it during module build and installation stage (i.e. perl Makefile.PL; make; make ! install). Suggested by Richard Anderson <ri...@ri...>. *************** *** 116,120 **** 1.99_01 Sun Jan 13 2002 ! * Added support for third party plugins. Added documentation on writting plugins. --- 124,128 ---- 1.99_01 Sun Jan 13 2002 ! * Added support for third party plugins. Added documentation on writting plugins. *************** *** 125,129 **** 1.99_00 Mon Jan 6 2002 ! * Major rewrite of module. The aim of this rewrite is plugin based architecture which allows to extend module functionality with plugins. --- 133,137 ---- 1.99_00 Mon Jan 6 2002 ! * Major rewrite of module. The aim of this rewrite is plugin based architecture which allows to extend module functionality with plugins. *************** *** 132,141 **** * HTTP::WebTest now uses Config.pm to find correct shebang string ! for script 'wt'. It should correctly set path to perl interpreter ! even if perl is installed in non-standart place. * Added test parameter mail_from which allows to set From: header ! in report e-mails. Thanks Joe Germuska <Joe...@JG...> ! for the patch. 1.06 Sat Aug 11 2001 --- 140,149 ---- * HTTP::WebTest now uses Config.pm to find correct shebang string ! for script 'wt'. It should correctly set path to perl ! interpreter even if perl is installed in non-standart place. * Added test parameter mail_from which allows to set From: header ! in report e-mails. Thanks Joe Germuska ! <Joe...@JG...> for the patch. 1.06 Sat Aug 11 2001 *************** *** 147,156 **** * Installation of http-webtest directory is optional now for Unix ! platforms. It is completely disabled on Win32 platform. * Mentioned in docs that this module should work on Win32 ! platform. Bug reports from this platform would be appreciated. ! * Do not use environment variable WEBTEST_LIB in 'wt' script. It seems to be needed only for debuging purposes and it was a source of many Perl warnings if it was not defined. --- 155,164 ---- * Installation of http-webtest directory is optional now for Unix ! platforms. It is completely disabled on Win32 platform. * Mentioned in docs that this module should work on Win32 ! platform. Bug reports from this platform would be appreciated. ! * Do not use environment variable WEBTEST_LIB in 'wt' script. It seems to be needed only for debuging purposes and it was a source of many Perl warnings if it was not defined. *************** *** 164,173 **** * Removed section 'CHANGES' from HTTP::WebTest POD docs since it ! became too long. Anybody interested in changes should consult this file. 1.04 Mon Jul 16 2001 ! * Added PREREQ_PM entry into Makefile.PL. Thanks Britton <fs...@au...> for suggesting this. --- 172,181 ---- * Removed section 'CHANGES' from HTTP::WebTest POD docs since it ! became too long. Anybody interested in changes should consult this file. 1.04 Mon Jul 16 2001 ! * Added PREREQ_PM entry into Makefile.PL. Thanks Britton <fs...@au...> for suggesting this. |
From: Ilya M. <m_...@us...> - 2002-05-11 18:48:09
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv18502 Modified Files: MANIFEST Log Message: Update Index: MANIFEST =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/MANIFEST,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** MANIFEST 27 Apr 2002 22:02:09 -0000 1.9 --- MANIFEST 11 May 2002 18:48:06 -0000 1.10 *************** *** 86,89 **** --- 86,90 ---- t/test.out/click_link2 t/test.out/click_link3 + t/test.out/content-type t/test.out/cookie1 t/test.out/cookie2 |
From: Ilya M. <m_...@us...> - 2002-05-11 18:47:52
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory usw-pr-cvs1:/tmp/cvs-serv18404/t Modified Files: 02-generic.t Log Message: Added test for Content-Type header value in POST requests Index: 02-generic.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/02-generic.t,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** 02-generic.t 16 Feb 2002 00:36:35 -0000 1.7 --- 02-generic.t 11 May 2002 18:47:49 -0000 1.8 *************** *** 18,22 **** use vars qw($HOSTNAME $PORT $URL); ! BEGIN { plan tests => 22 } # init tests --- 18,22 ---- use vars qw($HOSTNAME $PORT $URL); ! BEGIN { plan tests => 23 } # init tests *************** *** 427,430 **** --- 427,445 ---- } + # 23: test if we are setting content type header correctly for POST + # requests + { + my $tests = [ { url => abs_url($URL, '/show-headers'), + method => 'post', + text_require => [ 'Content-Type: ' . + 'application/x-www-form-urlencoded' ] }, + ]; + + check_webtest(webtest => $WEBTEST, + server_url => $URL, + tests => $tests, + check_file => 't/test.out/content-type'); + } + # try to stop server even we have been crashed END { stop_webserver($PID) if defined $PID } *************** *** 501,504 **** --- 516,529 ---- } } + + # create response object + my $response = new HTTP::Response(RC_OK); + $response->header(Content_Type => 'text/plain'); + $response->content($content); + + # send it to browser + $connect->send_response($response); + } elsif($path eq '/show-headers') { + my $content = $request->headers_as_string; # create response object |