http-webtest-commits Mailing List for HTTP-WebTest (Page 16)
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: Joe <joe...@us...> - 2002-10-09 22:15:19
|
Update of /cvsroot/http-webtest/HTTP-WebTest-Plugin-DateTest In directory usw-pr-cvs1:/tmp/cvs-serv30162 Modified Files: Changes Log Message: Changed test result format and handling of time units Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest-Plugin-DateTest/Changes,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Changes 12 Sep 2002 13:11:01 -0000 1.1.1.1 --- Changes 9 Oct 2002 22:15:16 -0000 1.2 *************** *** 1,4 **** --- 1,10 ---- Revision history for Perl extension DateTest. + 0.91 Thu Oct 10 00:02:49 CEST 2002 + - use same time units as test spec for return value + - added corresponding unit testcases + - changed failure message: 55 > 50 instead of 55 < 50 + actual situation (fact) v.s. test condition. hmm... + 0.90 Thu Sep 12 14:24:09 CEST 2002 - 1st beta release |
From: Ilya M. <m_...@us...> - 2002-09-27 19:54:28
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv11630 Modified Files: Changes Log Message: Updated Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** Changes 24 Sep 2002 21:15:23 -0000 1.55 --- Changes 27 Sep 2002 19:54:25 -0000 1.56 *************** *** 13,16 **** --- 13,20 ---- to use relative URLs in tests. + BUG FIXES: + + * Fixed some minor documentation bugs. Thanks to William McKee. + 1.99_09 Thu Aug 22 2002 |
From: Ilya M. <m_...@us...> - 2002-09-27 19:53:55
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP In directory usw-pr-cvs1:/tmp/cvs-serv11452/lib/HTTP Modified Files: WebTest.pm.in Log Message: Fix minor doc bug Index: WebTest.pm.in =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest.pm.in,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** WebTest.pm.in 22 Aug 2002 09:09:20 -0000 1.19 --- WebTest.pm.in 27 Sep 2002 19:53:47 -0000 1.20 *************** *** 401,405 **** my $tests = [ ! { name => 'Yahoo home page', url => 'http://www.yahoo.com', text_require => [ '<a href=r/qt>Quotations</a>...<br>' ], --- 401,405 ---- my $tests = [ ! { test_name => 'Yahoo home page', url => 'http://www.yahoo.com', text_require => [ '<a href=r/qt>Quotations</a>...<br>' ], *************** *** 415,418 **** --- 415,419 ---- }; + my $webtest = new HTTP::WebTest; $webtest->run_tests($tests, $params); |
From: Ilya M. <m_...@us...> - 2002-09-24 21:15:25
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv23454 Modified Files: MANIFEST Changes Log Message: Updated Index: MANIFEST =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/MANIFEST,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** MANIFEST 24 Sep 2002 20:20:22 -0000 1.24 --- MANIFEST 24 Sep 2002 21:15:23 -0000 1.25 *************** *** 113,116 **** --- 113,117 ---- t/test.out/proxy t/test.out/redirect + t/test.out/relative_urls t/test.out/report-cookie1 t/test.out/report-cookie2 Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** Changes 24 Sep 2002 20:20:23 -0000 1.54 --- Changes 24 Sep 2002 21:15:23 -0000 1.55 *************** *** 10,13 **** --- 10,16 ---- sequence runtime. Inspired by Paul Hamingson's patch. + * New core test parameter 'relative_urls' which enables HTTP-WebTest + to use relative URLs in tests. + 1.99_09 Thu Aug 22 2002 |
From: Ilya M. <m_...@us...> - 2002-09-24 21:15:25
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory usw-pr-cvs1:/tmp/cvs-serv23454/t Modified Files: 02-generic.t Log Message: Updated Index: 02-generic.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/02-generic.t,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** 02-generic.t 24 Sep 2002 20:36:13 -0000 1.16 --- 02-generic.t 24 Sep 2002 21:15:23 -0000 1.17 *************** *** 18,22 **** use vars qw($HOSTNAME $PORT $URL); ! BEGIN { plan tests => 33 } # init tests --- 18,22 ---- use vars qw($HOSTNAME $PORT $URL); ! BEGIN { plan tests => 34 } # init tests *************** *** 626,629 **** --- 626,648 ---- tests => $tests, check_file => 't/test.out/runtime-insert'); + } + + # 34: test relative_urls parameter + { + my $opts = { relative_urls => 'yes' }; + + my $tests = [ { url => abs_url($URL, '/test-file1') }, + { url => '/test-file1' }, + { url => 'test-file2' }, + { url => 'yyy/zzz' }, + { url => 'aaa' }, + { url => '../ccc' }, + { url => './test-file1' } ]; + + check_webtest(webtest => $WEBTEST, + server_url => $URL, + tests => $tests, + opts => $opts, + check_file => 't/test.out/relative_urls'); } |
From: Ilya M. <m_...@us...> - 2002-09-24 21:14:42
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t/test.out In directory usw-pr-cvs1:/tmp/cvs-serv23237/t/test.out Added Files: relative_urls Log Message: Added --- NEW FILE: relative_urls --- Failed Succeeded Test Name 0 1 *** no name *** 0 1 *** no name *** 0 1 *** no name *** 1 0 *** no name *** 1 0 *** no name *** 1 0 *** no name *** 0 1 *** no name *** Test Name: N/A URL: http://http.web.test/test-file1 STATUS CODE CHECK Expected '200' and got: 200 OK SUCCEED Test Name: N/A URL: http://http.web.test/test-file1 STATUS CODE CHECK Expected '200' and got: 200 OK SUCCEED Test Name: N/A URL: http://http.web.test/test-file2 STATUS CODE CHECK Expected '200' and got: 200 OK SUCCEED Test Name: N/A URL: http://http.web.test/yyy/zzz STATUS CODE CHECK Expected '200' and got: 404 Not Found FAIL Test Name: N/A URL: http://http.web.test/yyy/aaa STATUS CODE CHECK Expected '200' and got: 404 Not Found FAIL Test Name: N/A URL: http://http.web.test/ccc STATUS CODE CHECK Expected '200' and got: 404 Not Found FAIL Test Name: N/A URL: http://http.web.test/test-file1 STATUS CODE CHECK Expected '200' and got: 200 OK SUCCEED Total web tests failed: 3 succeeded: 4 |
From: Ilya M. <m_...@us...> - 2002-09-24 21:12:09
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin In directory usw-pr-cvs1:/tmp/cvs-serv22428/lib/HTTP/WebTest/Plugin Modified Files: SetRequest.pm Log Message: Support for relative_urls parameter Index: SetRequest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/SetRequest.pm,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** SetRequest.pm 23 Aug 2002 10:42:15 -0000 1.16 --- SetRequest.pm 24 Sep 2002 21:12:06 -0000 1.17 *************** *** 26,33 **** =for pod_merge copy params =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. =head2 method --- 26,54 ---- =for pod_merge copy params + =head2 relative_urls + + If set to C<yes> than C<HTTP-WebTest> supports relative URLs. See + test parameter C<url> for more information. + + =head3 Allowed values + + C<yes>, C<no> + + =head3 Default value + + C<no> + =head2 url ! URL to test. ! ! If test parameter C<relative_urls> is set to C<yes> than URL for each ! test is treated as relative to the URL in the previous test. URL in ! the first test is treated as relative to C<http://localhost>. ! ! If test parameter C<relative_urls> is set to C<no> than each URL is ! treated as absolute. In this case if schema part of URL is omitted ! (i.e. URL doesn't start with C<http://>, C<ftp://>, etc) then ! C<http://> is implied. =head2 method *************** *** 166,169 **** --- 187,191 ---- sub param_types { return q(url uri + relative_urls yesno method scalar('^(?:GET|POST)$') params hashlist *************** *** 185,189 **** my $request = $self->webtest->last_request; ! $self->validate_params(qw(url method params auth proxies pauth http_headers user_agent)); --- 207,211 ---- my $request = $self->webtest->last_request; ! $self->validate_params(qw(url relative_urls method params auth proxies pauth http_headers user_agent)); *************** *** 191,194 **** --- 213,217 ---- # get various params we handle my $url = $self->test_param('url'); + my $relative_urls = $self->yesno_test_param('relative_urls'); my $method = $self->test_param('method'); my $params = $self->test_param('params'); *************** *** 200,206 **** my $handle_redirects = $self->yesno_test_param('handle_redirects', 1); - # fix broken url if(defined $url) { ! $url = "http://" . $url unless $url =~ m|^\w+://|; } --- 223,239 ---- my $handle_redirects = $self->yesno_test_param('handle_redirects', 1); if(defined $url) { ! if($relative_urls) { ! my $last_test_num = $self->webtest->last_test_num; ! ! my $prev_url = $last_test_num > 0 ? ! $self->webtest->tests->[$last_test_num - 1]->request->uri : ! 'http://localhost/'; ! ! $url = URI->new_abs($url, $prev_url); ! } else { ! # add shema part if it is missing ! $url = "http://" . $url unless $url =~ m|^\w+://|; ! } } |
From: Ilya M. <m_...@us...> - 2002-09-24 21:10:26
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory usw-pr-cvs1:/tmp/cvs-serv21757/lib/HTTP/WebTest Modified Files: API.pm Log Message: Minor fixes Index: API.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/API.pm,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** API.pm 24 Sep 2002 20:22:13 -0000 1.22 --- API.pm 24 Sep 2002 21:10:20 -0000 1.23 *************** *** 534,539 **** # convert test to canonic representation $test = $self->convert_tests($test); ! ! my $save_test = $self->last_test($test); $self->_global_test_params($params); --- 534,538 ---- # convert test to canonic representation $test = $self->convert_tests($test); ! $self->last_test($test); $self->_global_test_params($params); |
From: Ilya M. <m_...@us...> - 2002-09-24 20:36:17
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory usw-pr-cvs1:/tmp/cvs-serv10406 Modified Files: 02-generic.t Log Message: Minor fixes Index: 02-generic.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/02-generic.t,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** 02-generic.t 24 Sep 2002 20:22:12 -0000 1.15 --- 02-generic.t 24 Sep 2002 20:36:13 -0000 1.16 *************** *** 599,605 **** # 33: test adding new tests in runtime { my $sub = sub { my $webtest = shift; - # use this sub to tweak test queue in runtime # append a new test at the end of the queue --- 599,605 ---- # 33: test adding new tests in runtime { + # sub to tweak test queue in runtime my $sub = sub { my $webtest = shift; # append a new test at the end of the queue *************** *** 613,616 **** --- 613,617 ---- 0, $webtest->convert_tests({ url => abs_url($URL, '/status-forbidden') }); + # formally this sub is used to calculate URL param in runtime return abs_url($URL, '/test-file1'); }; |
From: Ilya M. <m_...@us...> - 2002-09-24 20:22:15
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory usw-pr-cvs1:/tmp/cvs-serv5291/lib/HTTP/WebTest Modified Files: API.pm Log Message: Allow to modify test queue in runtime Index: API.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/API.pm,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** API.pm 17 Aug 2002 10:24:20 -0000 1.21 --- API.pm 24 Sep 2002 20:22:13 -0000 1.22 *************** *** 123,128 **** } ! # run all tests ! for my $i (0 .. @{$self->tests} - 1) { my $test = $self->tests->[$i]; $self->last_test_num($i); --- 123,130 ---- } ! # run all tests: note that content and length of @{$self->tests} ! # may change inside the loop so idiomatic "for my $i (...)" ! # doesn't work here ! for(my $i = 0; $i < @{$self->tests}; $i ++) { my $test = $self->tests->[$i]; $self->last_test_num($i); *************** *** 532,536 **** # convert test to canonic representation $test = $self->convert_tests($test); ! $self->last_test($test); $self->_global_test_params($params); --- 534,539 ---- # convert test to canonic representation $test = $self->convert_tests($test); ! ! my $save_test = $self->last_test($test); $self->_global_test_params($params); *************** *** 576,580 **** } } - $self->last_results(\@results); --- 579,582 ---- |
From: Ilya M. <m_...@us...> - 2002-09-24 20:22:15
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory usw-pr-cvs1:/tmp/cvs-serv5291/t Modified Files: 02-generic.t Log Message: Allow to modify test queue in runtime Index: 02-generic.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/02-generic.t,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** 02-generic.t 22 Aug 2002 07:39:38 -0000 1.14 --- 02-generic.t 24 Sep 2002 20:22:12 -0000 1.15 *************** *** 18,22 **** use vars qw($HOSTNAME $PORT $URL); ! BEGIN { plan tests => 32 } # init tests --- 18,22 ---- use vars qw($HOSTNAME $PORT $URL); ! BEGIN { plan tests => 33 } # init tests *************** *** 595,598 **** --- 595,628 ---- check_file => "t/test.out/handle-redirects-$bool"); } + } + + # 33: test adding new tests in runtime + { + my $sub = sub { + my $webtest = shift; + # use this sub to tweak test queue in runtime + + # append a new test at the end of the queue + push @{$webtest->tests}, + $webtest->convert_tests({ url => abs_url($URL, '/test-file2'), + text_require => [ qw(begin 644) ], + }); + + # insert a new test after the current test + splice @{$webtest->tests}, $webtest->last_test_num + 1, + 0, $webtest->convert_tests({ url => abs_url($URL, '/status-forbidden') }); + + return abs_url($URL, '/test-file1'); + }; + + my $tests = [ { url => $sub, + text_require => [ qw(abcde) ], + } + ]; + + check_webtest(webtest => $WEBTEST, + server_url => $URL, + tests => $tests, + check_file => 't/test.out/runtime-insert'); } |
From: Ilya M. <m_...@us...> - 2002-09-24 20:21:34
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t/test.out In directory usw-pr-cvs1:/tmp/cvs-serv5064/t/test.out Added Files: runtime-insert Log Message: Added --- NEW FILE: runtime-insert --- Failed Succeeded Test Name 0 2 *** no name *** 1 0 *** no name *** 0 3 *** no name *** Test Name: N/A URL: http://http.web.test/test-file1 STATUS CODE CHECK Expected '200' and got: 200 OK SUCCEED REQUIRED TEXT abcde SUCCEED Test Name: N/A URL: http://http.web.test/status-forbidden STATUS CODE CHECK Expected '200' and got: 403 Forbidden FAIL Test Name: N/A URL: http://http.web.test/test-file2 STATUS CODE CHECK Expected '200' and got: 200 OK SUCCEED REQUIRED TEXT begin SUCCEED 644 SUCCEED Total web tests failed: 1 succeeded: 5 |
From: Ilya M. <m_...@us...> - 2002-09-24 20:21:13
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv4957 Modified Files: Makefile.PL Log Message: Updated Index: Makefile.PL =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Makefile.PL,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile.PL 31 Jul 2002 15:18:47 -0000 1.9 --- Makefile.PL 24 Sep 2002 20:21:10 -0000 1.10 *************** *** 24,27 **** --- 24,28 ---- 'Pod::Man' => 1.14, 'Time::HiRes' => 0, + 'Test::More' => 0, 'URI' => 0 }, realclean => { FILES => '.config' }, |
From: Ilya M. <m_...@us...> - 2002-09-24 20:20:25
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv4630 Modified Files: MANIFEST Changes Log Message: Updated Index: MANIFEST =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/MANIFEST,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** MANIFEST 20 Aug 2002 20:57:51 -0000 1.23 --- MANIFEST 24 Sep 2002 20:20:22 -0000 1.24 *************** *** 125,128 **** --- 125,129 ---- t/test.out/run-web-test t/test.out/run-wtscript + t/test.out/runtime-insert t/test.out/short-url t/test.out/show-headers Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** Changes 22 Aug 2002 09:28:36 -0000 1.53 --- Changes 24 Sep 2002 20:20:23 -0000 1.54 *************** *** 3,6 **** --- 3,13 ---- Revision history for Perl module HTTP::WebTest. + CURRENT VERSION + + ENHANCEMENTS: + + * Allow plugins to insert tests into the test queue during test + sequence runtime. Inspired by Paul Hamingson's patch. + 1.99_09 Thu Aug 22 2002 |
From: Ilya M. <m_...@us...> - 2002-09-24 20:19:43
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv4330 Modified Files: INSTALL Log Message: Minor fixes Index: INSTALL =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/INSTALL,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** INSTALL 15 Jun 2002 21:44:06 -0000 1.5 --- INSTALL 24 Sep 2002 20:19:34 -0000 1.6 *************** *** 6,14 **** * File::Temp (is included in Perl 5.6.1 and later) * libwww 5.60 or later ! * libnet ! * Text::Balanced * Pod::Usage (is included in Perl 5.6.1 and later) * Pod::Man 1.14 (is included in Perl 5.6.1 and later) ! * Time::HiRes If you want to run test suite ('make test') you need also --- 6,15 ---- * File::Temp (is included in Perl 5.6.1 and later) * libwww 5.60 or later ! * libnet (is included in Perl 5.8.0 and later) ! * Test::More (is included in Perl 5.8.0 and later) ! * Text::Balanced (is included in Perl 5.8.0 and later) * Pod::Usage (is included in Perl 5.6.1 and later) * Pod::Man 1.14 (is included in Perl 5.6.1 and later) ! * Time::HiRes (is included in Perl 5.8.0 and later) If you want to run test suite ('make test') you need also |
From: Ilya M. <m_...@us...> - 2002-08-23 10:42:17
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin In directory usw-pr-cvs1:/tmp/cvs-serv2738 Modified Files: SetRequest.pm Log Message: Minor doc fix Index: SetRequest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/SetRequest.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** SetRequest.pm 23 Aug 2002 10:41:40 -0000 1.15 --- SetRequest.pm 23 Aug 2002 10:42:15 -0000 1.16 *************** *** 105,108 **** --- 105,110 ---- Additional optional headers for file part. + =back + Example (wtscript file): *************** *** 114,119 **** It generates HTTP request with C</home/ilya/file.txt> file included and reported under name C<myfile.txt>. - - =back =head2 auth --- 116,119 ---- |
From: Ilya M. <m_...@us...> - 2002-08-23 10:41:48
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin In directory usw-pr-cvs1:/tmp/cvs-serv2395 Modified Files: SetRequest.pm Log Message: Minor doc fix Index: SetRequest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/SetRequest.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** SetRequest.pm 17 Aug 2002 10:26:18 -0000 1.14 --- SetRequest.pm 23 Aug 2002 10:41:40 -0000 1.15 *************** *** 83,88 **** C<multipart/form-data> content type used for C<Form-based File Upload> as specified in RFC 1867. Each parameter with list value is treated ! as file part specification specification with the following ! interpretation: ( FILE, FILENAME, HEADER => VALUE... ) --- 83,87 ---- C<multipart/form-data> content type used for C<Form-based File Upload> as specified in RFC 1867. Each parameter with list value is treated ! as file part specification with the following interpretation: ( FILE, FILENAME, HEADER => VALUE... ) |
From: Ilya M. <m_...@us...> - 2002-08-22 09:28:41
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv13203 Modified Files: Changes Log Message: Minor fixes Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** Changes 22 Aug 2002 09:08:26 -0000 1.52 --- Changes 22 Aug 2002 09:28:36 -0000 1.53 *************** *** 29,33 **** BUG FIXES: ! * Previously comments inside of list parameters in wtscript files was not allowed. Reported by William McKee. --- 29,33 ---- BUG FIXES: ! * Previously comments inside of list parameters in wtscript files were not allowed. Reported by William McKee. |
From: Ilya M. <m_...@us...> - 2002-08-22 09:10:12
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP In directory usw-pr-cvs1:/tmp/cvs-serv8129/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.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** WebTest.pm 17 Aug 2002 10:27:04 -0000 1.26 --- WebTest.pm 22 Aug 2002 09:10:10 -0000 1.27 *************** *** 27,31 **** package HTTP::WebTest; ! $VERSION = '1.99_08'; # workaround for warning caused by underscore char in $VERSION $VERSION = eval $VERSION; --- 27,31 ---- package HTTP::WebTest; ! $VERSION = '1.99_09'; # workaround for warning caused by underscore char in $VERSION $VERSION = eval $VERSION; *************** *** 641,647 **** I<NON-CORE PARAMETER> from L<HTTP::WebTest::Plugin::Click> ! 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 --- 641,647 ---- I<NON-CORE PARAMETER> from L<HTTP::WebTest::Plugin::Click> ! Given name of submit button (i.e. C<<input type="submit"E<gt>> tag or ! C<<input type="image"E<gt>> inside of C<<formE<gt>> tag) on previously ! requested HTML page, builds test request to the submitted page. Note that you still need to pass all form parameters yourself using *************** *** 1042,1045 **** --- 1042,1055 ---- directly to the htdocs directory, use a pathname of C<.> or C<./.>. + =head2 form_name + + I<NON-CORE PARAMETER> from L<HTTP::WebTest::Plugin::Click> + + Give form name attribute (i.e. C<<form name="foo"E<gt>>) on previously + 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. + =head2 handle_redirects *************** *** 1222,1225 **** --- 1232,1247 ---- Any number less than C<max_rtime> (if C<max_rtime> is specified). + =head2 on_finish + + I<NON-CORE PARAMETER> from L<HTTP::WebTest::Plugin::Hooks> + + The value of this test parameter is ignored. However, it is evaluted + before the test sequence is run, so it can be used to run finalization + code when the test sequence is finished. + + =head3 Example + + See example in L<HTTP::WebTest::Cookbook|HTTP::WebTest::Cookbook>. + =head2 on_request *************** *** 1227,1231 **** The value of this test parameter is ignored. However, it is evaluted ! before the HTTP request is done, so it can be used to do initalization before the request. --- 1249,1253 ---- The value of this test parameter is ignored. However, it is evaluted ! before the HTTP request is done, so it can be used to do initalization before the request. *************** *** 1251,1254 **** --- 1273,1288 ---- C<yes> if test is successful or C<no> if it is not. C<COMMENT> is a comment associated with this test. + + =head3 Example + + See example in L<HTTP::WebTest::Cookbook|HTTP::WebTest::Cookbook>. + + =head2 on_start + + I<NON-CORE PARAMETER> from L<HTTP::WebTest::Plugin::Hooks> + + The value of this test parameter is ignored. However, it is evaluted + before the test sequence is run, so it can be used to do initalization + before the test sequence run. =head3 Example |
From: Ilya M. <m_...@us...> - 2002-08-22 09:09:22
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP In directory usw-pr-cvs1:/tmp/cvs-serv7970/lib/HTTP Modified Files: WebTest.pm.in Log Message: Bump version Index: WebTest.pm.in =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest.pm.in,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** WebTest.pm.in 31 Jul 2002 15:17:22 -0000 1.18 --- WebTest.pm.in 22 Aug 2002 09:09:20 -0000 1.19 *************** *** 5,9 **** package HTTP::WebTest; ! $VERSION = '1.99_08'; # workaround for warning caused by underscore char in $VERSION $VERSION = eval $VERSION; --- 5,9 ---- package HTTP::WebTest; ! $VERSION = '1.99_09'; # workaround for warning caused by underscore char in $VERSION $VERSION = eval $VERSION; |
From: Ilya M. <m_...@us...> - 2002-08-22 09:08:31
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv7668 Modified Files: Changes Log Message: Updated Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** Changes 22 Aug 2002 08:36:13 -0000 1.51 --- Changes 22 Aug 2002 09:08:26 -0000 1.52 *************** *** 3,7 **** Revision history for Perl module HTTP::WebTest. ! Current version ENHANCEMENTS: --- 3,7 ---- Revision history for Perl module HTTP::WebTest. ! 1.99_09 Thu Aug 22 2002 ENHANCEMENTS: |
From: Ilya M. <m_...@us...> - 2002-08-22 08:37:44
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin In directory usw-pr-cvs1:/tmp/cvs-serv32518/lib/HTTP/WebTest/Plugin Modified Files: Hooks.pm Log Message: Added on_start and on_finish test parameters Index: Hooks.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/Hooks.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Hooks.pm 21 Jun 2002 06:48:16 -0000 1.9 --- Hooks.pm 22 Aug 2002 08:37:41 -0000 1.10 *************** *** 11,18 **** plugins = ( ::Hooks ) test_name = Name1 .... # do some test initialization ! on_request = { My::init() } end_test --- 11,24 ---- plugins = ( ::Hooks ) + # do some test sequence initialization + on_start = { My::init() } + + # do some test sequence deinitialization + on_finish = { My::stop() } + test_name = Name1 .... # do some test initialization ! on_request = { My::local_init() } end_test *************** *** 48,55 **** =for pod_merge copy opt_params =head2 on_request The value of this test parameter is ignored. However, it is evaluted ! before the HTTP request is done, so it can be used to do initalization before the request. --- 54,81 ---- =for pod_merge copy opt_params + =head2 on_start + + The value of this test parameter is ignored. However, it is evaluted + before the test sequence is run, so it can be used to do initalization + before the test sequence run. + + =head3 Example + + See example in L<HTTP::WebTest::Cookbook|HTTP::WebTest::Cookbook>. + + =head2 on_finish + + The value of this test parameter is ignored. However, it is evaluted + before the test sequence is run, so it can be used to run finalization + code when the test sequence is finished. + + =head3 Example + + See example in L<HTTP::WebTest::Cookbook|HTTP::WebTest::Cookbook>. + =head2 on_request The value of this test parameter is ignored. However, it is evaluted ! before the HTTP request is done, so it can be used to do initalization before the request. *************** *** 81,86 **** sub param_types { ! return q(on_request anything ! on_response test_results); } --- 107,114 ---- sub param_types { ! return q(on_start anything ! on_request anything ! on_response test_results ! on_finish anything); } *************** *** 107,114 **** } sub prepare_request { my $self = shift; ! # this both checks and evaluates test parameter $self->validate_params(qw(on_request)); } --- 135,156 ---- } + sub start_tests { + my $self = shift; + + # both checks and evaluates test parameter + $self->validate_params(qw(on_start)); + } + + sub end_tests { + my $self = shift; + + # both checks and evaluates test parameter + $self->validate_params(qw(on_finish)); + } + sub prepare_request { my $self = shift; ! # both checks and evaluates test parameter $self->validate_params(qw(on_request)); } |
From: Ilya M. <m_...@us...> - 2002-08-22 08:36:52
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory usw-pr-cvs1:/tmp/cvs-serv32316/lib/HTTP/WebTest Modified Files: Cookbook.pod Log Message: Extended 'User-Defined Tests' example Index: Cookbook.pod =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Cookbook.pod,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Cookbook.pod 21 Jun 2002 10:51:54 -0000 1.15 --- Cookbook.pod 22 Aug 2002 08:36:50 -0000 1.16 *************** *** 151,157 **** # load HTTP::WebTest::Plugin::Hooks module which provides test ! # parameter 'on_response' plugins = ( ::Hooks ) .... --- 151,168 ---- # load HTTP::WebTest::Plugin::Hooks module which provides test ! # parameters 'on_start', 'on_finish' and 'on_response' plugins = ( ::Hooks ) + on_start = { + # initialize a database handle used later in the tests + require DBI; + $dbh = DBI->connect('dbi:mysql:test', 'login', 'password'); + } + + on_finish = { + # disconnect from the database + $dbh->disconnect; + } + .... *************** *** 163,168 **** # define check on_response = { ! # it is assumed that $Test::dbh is database handler ! my $has_record = $Test::dbh->selectrow_array( 'SELECT COUNT(*) FROM USERS ' . 'WHERE NAME = ?', --- 174,178 ---- # define check on_response = { ! my $has_record = $dbh->selectrow_array( 'SELECT COUNT(*) FROM USERS ' . 'WHERE NAME = ?', |
From: Ilya M. <m_...@us...> - 2002-08-22 08:36:20
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory usw-pr-cvs1:/tmp/cvs-serv32146/t Modified Files: 09-hooks.t Log Message: Updated Index: 09-hooks.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/09-hooks.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 09-hooks.t 15 Feb 2002 15:42:20 -0000 1.2 --- 09-hooks.t 22 Aug 2002 08:36:13 -0000 1.3 *************** *** 19,23 **** use vars qw($HOSTNAME $PORT $URL $TEST); ! BEGIN { plan tests => 7 } # init tests --- 19,23 ---- use vars qw($HOSTNAME $PORT $URL $TEST); ! BEGIN { plan tests => 13 } # init tests *************** *** 57,61 **** my $tests1 = [ { url => abs_url($URL, '/inc_counter'), ! on_response => sub { $counter_value = counter(); [] } } ]; $WEBTEST->run_tests($tests1, $OPTS); --- 57,62 ---- my $tests1 = [ { url => abs_url($URL, '/inc_counter'), ! on_response => sub { $counter_value = counter(); [] } } ! ]; $WEBTEST->run_tests($tests1, $OPTS); *************** *** 72,76 **** } ! # 7: test response parameter which returns some test results { my $tests = [ { url => abs_url($URL, '/inc_counter'), --- 73,77 ---- } ! # 7: test on_response parameter returning some test results { my $tests = [ { url => abs_url($URL, '/inc_counter'), *************** *** 91,94 **** --- 92,147 ---- } + # 8-10: test on_start parameter + { + init_counter(); + + my $counter_value1 = undef; + my $counter_value2 = undef; + + my $opts = { %$OPTS, + on_start => sub { inc_counter() } }; + + my $tests1 = [ { url => abs_url($URL, '/inc_counter'), + on_request => sub { $counter_value1 = counter() } }, + { url => abs_url($URL, '/inc_counter'), + on_request => sub { $counter_value2 = counter() } } + ]; + + $WEBTEST->run_tests($tests1, $opts); + # this counter is set to one as it is increased by on_start hook + ok($counter_value1 == 1); + # this counter get ++ because it is increased by '/inc_counter' request + ok($counter_value2 == 2); + # this counter get ++ because it is increased by second + # '/inc_counter' request + ok(counter() == 3); + } + + # 11-13: test on_finish parameter + { + init_counter(); + + my $counter_value1 = undef; + my $counter_value2 = undef; + + my $opts = { %$OPTS, + on_finish => sub { inc_counter() } }; + + my $tests1 = [ { url => abs_url($URL, '/inc_counter'), + on_request => sub { $counter_value1 = counter() } }, + { url => abs_url($URL, '/inc_counter'), + on_request => sub { $counter_value2 = counter() } } + ]; + + $WEBTEST->run_tests($tests1, $opts); + # this counter is set to zero as no '/inc_counter' request and no + # hook that increase counter are run + ok($counter_value1 == 0); + # this counter get ++ because it is increased by '/inc_counter' request + ok($counter_value2 == 1); + # this counter get += 2 because it is increased by second + # '/inc_counter' request and by on_finish hook + ok(counter() == 3); + } # try to stop server even we have been crashed |
From: Ilya M. <m_...@us...> - 2002-08-22 08:36:20
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv32146 Modified Files: TODO Changes Log Message: Updated Index: TODO =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/TODO,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** TODO 22 Aug 2002 07:58:16 -0000 1.26 --- TODO 22 Aug 2002 08:36:13 -0000 1.27 *************** *** 5,10 **** * Consider using XPath expressions (in Click plugin and on their own) - * Add start/end test sequence hooks into Hook plugin - * rewrite HarnessReport plugin using Test::Builder --- 5,8 ---- *************** *** 30,35 **** * Support including of test scripts into other test scripts ! * More work on cookbook. Example with $Test::dbh should be ! clarified. Probably I need one example of very simple plugin. * Add test name into errors text --- 28,33 ---- * Support including of test scripts into other test scripts ! * More work on cookbook. Probably I need one example of very simple ! plugin. * Add test name into errors text Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** Changes 22 Aug 2002 07:39:38 -0000 1.50 --- Changes 22 Aug 2002 08:36:13 -0000 1.51 *************** *** 21,24 **** --- 21,30 ---- Paul Hamingson for patch. + * Added two test parameters 'on_start' and 'on_finish' to + HTTP::WebTest::Plugin::Hook plugin. + + * Extended example 'User-Defined Tests' in Cookbook. Suggested by + William McKee. + BUG FIXES: |