http-webtest-commits Mailing List for HTTP-WebTest (Page 29)
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-01-29 03:54:23
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv20287 Modified Files: MANIFEST Log Message: Updated Index: MANIFEST =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/MANIFEST,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MANIFEST 2002/01/28 17:05:55 1.2 --- MANIFEST 2002/01/29 03:54:19 1.3 *************** *** 48,51 **** --- 48,56 ---- t/borked2.wt t/borked3.wt + t/borked4.wt + t/borked5.wt + t/borked6.wt + t/borked7.wt + t/borked8.wt t/config.pl t/good.wt.in *************** *** 65,68 **** --- 70,78 ---- t/test.out/borked2.err t/test.out/borked3.err + t/test.out/borked4.err + t/test.out/borked5.err + t/test.out/borked6.err + t/test.out/borked7.err + t/test.out/borked8.err t/test.out/broken-test t/test.out/check-global-params |
From: Ilya M. <m_...@us...> - 2002-01-29 03:52:45
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t/test.out In directory usw-pr-cvs1:/tmp/cvs-serv19904/t/test.out Added Files: borked8.err borked7.err borked6.err borked5.err borked4.err Log Message: Improve syntax error reporting in parser of wtscript files Support for embeded Perl in wtscript files in parser --- NEW FILE: borked8.err --- HTTP::WebTest: wtscript parsing error Line 4: Missing right bracket --- NEW FILE: borked7.err --- HTTP::WebTest: wtscript parsing error Line 3: Eval error Bareword "code" not allowed while "strict subs" in use at (eval 42) line 2. near --- NEW FILE: borked6.err --- HTTP::WebTest: wtscript parsing error Line 3: Missing right curly --- NEW FILE: borked5.err --- HTTP::WebTest: wtscript parsing error Line 3: Can't find string terminator "'" anywhere before EOF --- NEW FILE: borked4.err --- HTTP::WebTest: wtscript parsing error Line 3: Can't find string terminator """ anywhere before EOF |
From: Ilya M. <m_...@us...> - 2002-01-29 03:52:45
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory usw-pr-cvs1:/tmp/cvs-serv19904/t Modified Files: simple.wt 06-parser.t Added Files: borked8.wt borked7.wt borked6.wt borked5.wt borked4.wt Log Message: Improve syntax error reporting in parser of wtscript files Support for embeded Perl in wtscript files in parser --- NEW FILE: borked8.wt --- # $Id: borked8.wt,v 1.1 2002/01/29 03:52:40 m_ilya Exp $ param = ( unfinished --- NEW FILE: borked7.wt --- # $Id: borked7.wt,v 1.1 2002/01/29 03:52:40 m_ilya Exp $ param = { use strict; This is bad Perl code } --- NEW FILE: borked6.wt --- # $Id: borked6.wt,v 1.1 2002/01/29 03:52:40 m_ilya Exp $ param = { unfinished --- NEW FILE: borked5.wt --- # $Id: borked5.wt,v 1.1 2002/01/29 03:52:40 m_ilya Exp $ param = 'unfinished --- NEW FILE: borked4.wt --- # $Id: borked4.wt,v 1.1 2002/01/29 03:52:40 m_ilya Exp $ param = "unfinished Index: simple.wt =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/simple.wt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** simple.wt 2002/01/24 12:26:09 1.1.1.1 --- simple.wt 2002/01/29 03:52:40 1.2 *************** *** 53,54 **** --- 53,62 ---- What a tasty cookie! ) end_test + + test_name = { 'Some evals are here' } + file = { 1 + 2 + 3 . '.ext' } + params = ( { 'name' } => value + name1 + { my $a = 'blabla'; $a =~ s/bla//; $a } ) + auth = { [ http => 'http://some.proxy.com/' ] } + end_test Index: 06-parser.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/06-parser.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 06-parser.t 2002/01/28 09:49:55 1.2 --- 06-parser.t 2002/01/29 03:52:40 1.3 *************** *** 13,19 **** require 't/utils.pl'; ! BEGIN { plan tests => 27 } ! # 1-24: check parsing wt script (contain all syntax variants) { my $filename = shift; --- 13,19 ---- require 't/utils.pl'; ! BEGIN { plan tests => 39 } ! # 1-31: check parsing wt script (contain all syntax variants) { my $filename = shift; *************** *** 23,26 **** --- 23,27 ---- # check $tests + ok(@$tests == 3); ok($tests->[0]{test_name} eq 'Some name here'); ok($tests->[0]{auth}[0] eq 'name'); *************** *** 41,44 **** --- 42,57 ---- 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/'); # check $opts *************** *** 51,58 **** } ! # 25-27: check error handling for borked wtscript files parse_error_check('t/borked1.wt', 't/test.out/borked1.err'); parse_error_check('t/borked2.wt', 't/test.out/borked2.err'); parse_error_check('t/borked3.wt', 't/test.out/borked3.err'); sub parse_error_check { --- 64,76 ---- } ! # 32-39: check error handling for borked wtscript files parse_error_check('t/borked1.wt', 't/test.out/borked1.err'); parse_error_check('t/borked2.wt', 't/test.out/borked2.err'); parse_error_check('t/borked3.wt', 't/test.out/borked3.err'); + parse_error_check('t/borked4.wt', 't/test.out/borked4.err'); + parse_error_check('t/borked5.wt', 't/test.out/borked5.err'); + parse_error_check('t/borked6.wt', 't/test.out/borked6.err'); + parse_error_check('t/borked7.wt', 't/test.out/borked7.err'); + parse_error_check('t/borked8.wt', 't/test.out/borked8.err'); sub parse_error_check { |
From: Ilya M. <m_...@us...> - 2002-01-29 03:52:45
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv19904 Modified Files: Changes Log Message: Improve syntax error reporting in parser of wtscript files Support for embeded Perl in wtscript files in parser Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Changes 2002/01/28 16:58:47 1.9 --- Changes 2002/01/29 03:52:40 1.10 *************** *** 7,10 **** --- 7,18 ---- Revision history for Perl module HTTP::WebTest. + Current Version + + ENHANCEMENTS: + + * Improve syntax error reporting in parser of wtscript files + + * Support for embeded Perl in wtscript files in parser + 1.99_03 Mon Jan 28 2002 |
From: Ilya M. <m_...@us...> - 2002-01-29 03:52:44
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory usw-pr-cvs1:/tmp/cvs-serv19904/lib/HTTP/WebTest Modified Files: Parser.pm Log Message: Improve syntax error reporting in parser of wtscript files Support for embeded Perl in wtscript files in parser Index: Parser.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Parser.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Parser.pm 2002/01/28 09:49:56 1.2 --- Parser.pm 2002/01/29 03:52:40 1.3 *************** *** 25,28 **** --- 25,29 ---- use IO::File; use Parse::RecDescent; + use Text::Balanced qw(extract_codeblock extract_delimited); use vars qw(@ERRORS); *************** *** 33,37 **** # wtscript grammar my $parser = new Parse::RecDescent (q{ ! file: chunk(s) eofile { [ @{$item[1]} ] } | { for my $error (@{$thisparser->{errors}}) { --- 34,38 ---- # wtscript grammar my $parser = new Parse::RecDescent (q{ ! file: chunk(s) eofile { [ @{$item{chunk}} ] } | { for my $error (@{$thisparser->{errors}}) { *************** *** 53,57 **** test: starttest testchunk(s) endtest ! { [ 'test', [ [ 'param', 'test_name', $item[1] ], @{$item[2]} ] ] } testchunk: comment --- 54,65 ---- test: starttest testchunk(s) endtest ! { ! [ 'test', ! [ ! [ 'param', 'test_name', $item{starttest} ], ! @{$item{testchunk}} ! ] ! ] ! } testchunk: comment *************** *** 59,87 **** | <error: Test parameter or end of test block is expected near @{[$text =~ /(.*)/]}> ! starttest: 'test_name' '=' scalar { $item[3] } endtest: 'end_test' ! param: name '=' value { [ 'param', $item[1], $item[3] ] } name : /[a-zA-Z_]+/ { $item[1] eq 'test_name' ? undef : $item[1] } ! value: '(' list ')' { $item[2] } ! | scalar { $item[1] } ! list: listelem(s) { [ map ref($_) eq 'ARRAY' ? @$_ : $_, @{$item[1]} ] } listelem: scalar '=>' scalar { [$item[1], $item[3]] } | scalar ! scalar: qscalar | uscalar ! qscalar: /'([^\']*)'/ { $1 } ! | /"([^\"]*)"/ { $1 } uscalar: <rulevar: $word_re = qr/ (?: [^=)\s] | [^)\s] (?!>) ) /x> uscalar: / (?: $word_re+ [ \t]+ )* $word_re+ /xo eofile: /^\Z/ --- 67,124 ---- | <error: Test parameter or end of test block is expected near @{[$text =~ /(.*)/]}> ! starttest: 'test_name' '=' scalar { $item{scalar} } endtest: 'end_test' ! param: name '=' value { [ 'param', $item{name}, $item{value} ] } name : /[a-zA-Z_]+/ { $item[1] eq 'test_name' ? undef : $item[1] } ! value: '(' <commit> list ')' { $item{list} } ! | <error?: Missing right bracket> ! | scalar { $item{scalar} } ! list: listelem(s) { [ map ref($_) eq 'ARRAY' ? ! @$_ : ! $_, @{$item{listelem}} ] } listelem: scalar '=>' scalar { [$item[1], $item[3]] } | scalar ! scalar: <rulevar: $delim > ! ! scalar: /(?=')/ <commit> qscalar { $item{qscalar} } ! | <error?: Can't find string terminator "'" anywhere before EOF> ! | /(?=")/ <commit> qscalar { $item{qscalar} } ! | <error?: Can't find string terminator """ anywhere before EOF> ! | /(?=\{)/ <commit> eval ! | <error?: Missing right curly> | uscalar ! qscalar: <rulevar: $extracted > ! ! qscalar: { $extracted = extract_delimited($text) } ! { substr $extracted, 1, length($extracted) - 2 } uscalar: <rulevar: $word_re = qr/ (?: [^=)\s] | [^)\s] (?!>) ) /x> uscalar: / (?: $word_re+ [ \t]+ )* $word_re+ /xo + + eval: <rulevar: $extracted > + + eval: <rulevar: $exception > + + eval: { + $extracted = extract_codeblock($text); + defined $extracted ? 1 : undef; + } + <commit> + { + my $sub = eval "package HTTP::WebTest::PlayGround;\n" . + "sub { $extracted }\n"; + $exception = $@; + $sub; + } + | <error?: Eval error\n$exception\nnear @{[$text =~ /(.*)/]}> eofile: /^\Z/ |
From: Ilya M. <m_...@us...> - 2002-01-28 17:06:02
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv671 Modified Files: MANIFEST Log Message: Updated Index: MANIFEST =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/MANIFEST,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** MANIFEST 2002/01/24 12:26:02 1.1.1.1 --- MANIFEST 2002/01/28 17:05:55 1.2 *************** *** 66,69 **** --- 66,70 ---- t/test.out/borked3.err t/test.out/broken-test + t/test.out/check-global-params t/test.out/check-params t/test.out/cookie1 |
From: Ilya M. <m_...@us...> - 2002-01-28 16:59:00
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv31098 Modified Files: Changes Log Message: Updated Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Changes 2002/01/28 11:16:02 1.8 --- Changes 2002/01/28 16:58:47 1.9 *************** *** 7,11 **** Revision history for Perl module HTTP::WebTest. ! Current version * Numerous documentation fixes. Thanks to Richard Anderson for --- 7,11 ---- Revision history for Perl module HTTP::WebTest. ! 1.99_03 Mon Jan 28 2002 * Numerous documentation fixes. Thanks to Richard Anderson for |
From: Ilya M. <m_...@us...> - 2002-01-28 11:16:15
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv6602 Modified Files: Changes Log Message: Fix typo Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Changes 2002/01/28 11:01:08 1.7 --- Changes 2002/01/28 11:16:02 1.8 *************** *** 27,31 **** parameters instead of test object. ! * Now HTTP::WebTest do validates global test parameters. * Names of tests specified in wtscript files was ignored. It is --- 27,31 ---- parameters instead of test object. ! * Now HTTP::WebTest does validate global test parameters. * Names of tests specified in wtscript files was ignored. It is |
From: Ilya M. <m_...@us...> - 2002-01-28 11:01:12
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv3618 Modified Files: Changes Log Message: Fix typo Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Changes 2002/01/28 10:43:45 1.6 --- Changes 2002/01/28 11:01:08 1.7 *************** *** 32,39 **** fixed now. ! * Added some content to HTTP::WebTest::Cookbook ! * wt program will read test specification from standart input of no ! wtscript filenames were specified as its arguments 1.99_02 Fri Jan 18 2002 --- 32,39 ---- fixed now. ! * Added some content to HTTP::WebTest::Cookbook. ! * wt program will read test specification from standart input if no ! wtscript filenames were specified as its arguments. 1.99_02 Fri Jan 18 2002 |
From: Ilya M. <m_...@us...> - 2002-01-28 10:59:35
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory usw-pr-cvs1:/tmp/cvs-serv3213 Modified Files: Cookbook.pod Log Message: Added example on usage of ::HarnessReport plugin Index: Cookbook.pod =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Cookbook.pod,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Cookbook.pod 2002/01/28 10:08:53 1.4 --- Cookbook.pod 2002/01/28 10:59:30 1.5 *************** *** 20,24 **** =head2 Check Statis Website ! Wtscript: test_name = First page --- 20,24 ---- =head2 Check Statis Website ! This wtscript tests couple of static pages on my website: test_name = First page *************** *** 34,38 **** end_test ! Perl script: use HTTP::WebTest; --- 34,38 ---- end_test ! Same test in form of Perl script: use HTTP::WebTest; *************** *** 58,62 **** =head2 Check Login Form ! Wtscript: test_name = Login page --- 58,62 ---- =head2 Check Login Form ! This wtscripts tests login form on http://fsck.com/rt2/: test_name = Login page *************** *** 81,84 **** --- 81,100 ---- regex_require = ( Signed in as.*?guest.*?\. ) end_test + + =head1 ADVANCED + + =head2 Test::Harness compatible output + + This Perl script reads test specification from file C<test.wt> and + generates L<Test::Harness|Test::Harness> compatible output: + + use HTTP::WebTest; + + my $webtest = new HTTP::WebTest; + $webtest->run_wtscript('test.wt', + { + default_report => 'no', + plugins => [ '::HarnessReport' ] + }); =head1 COPYRIGHT |
From: Ilya M. <m_...@us...> - 2002-01-28 10:43:51
|
Update of /cvsroot/http-webtest/HTTP-WebTest/bin In directory usw-pr-cvs1:/tmp/cvs-serv31978/bin Modified Files: wt.PL Log Message: wt program will read test specification from standart input of no wtscript filenames were specified as its arguments Index: wt.PL =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/bin/wt.PL,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** wt.PL 2002/01/24 12:26:33 1.1.1.1 --- wt.PL 2002/01/28 10:43:45 1.2 *************** *** 61,64 **** --- 61,68 ---- 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. *************** *** 123,127 **** } ! pod2usage(1) if @ARGV < 1; my $webtest = HTTP::WebTest->new(); --- 127,131 ---- } ! @ARGV = '-' if @ARGV < 1; my $webtest = HTTP::WebTest->new(); |
From: Ilya M. <m_...@us...> - 2002-01-28 10:43:51
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv31978 Modified Files: Changes Log Message: wt program will read test specification from standart input of no wtscript filenames were specified as its arguments Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Changes 2002/01/28 10:06:22 1.5 --- Changes 2002/01/28 10:43:45 1.6 *************** *** 34,37 **** --- 34,40 ---- * Added some content to HTTP::WebTest::Cookbook + * wt program will read test specification from standart input of no + wtscript filenames were specified as its arguments + 1.99_02 Fri Jan 18 2002 |
From: Ilya M. <m_...@us...> - 2002-01-28 10:08:56
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory usw-pr-cvs1:/tmp/cvs-serv24265 Modified Files: Cookbook.pod Log Message: Reformat example perl code to fit 80 chars width text formating Index: Cookbook.pod =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Cookbook.pod,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Cookbook.pod 2002/01/28 10:07:03 1.3 --- Cookbook.pod 2002/01/28 10:08:53 1.4 *************** *** 40,57 **** my $webtest = new HTTP::WebTest; ! $webtest->run_tests([ { ! test_name => 'First page', ! url => 'http://martynov.org/', ! text_require => [ "Ilya Martynov's Web Site" ] ! }, ! { ! test_name => 'Mail-CheckUser page', ! url => 'http://martynov.org/checkuser', ! text_require => [ 'Mail-CheckUser', ! 'Download' ], ! regex_require => ! [ 'Mail-CheckUser-[\d\.]+\.tar\.gz' ] ! } ! ]); =head2 Check Login Form --- 40,58 ---- my $webtest = new HTTP::WebTest; ! $webtest->run_tests( ! [ { ! test_name => 'First page', ! url => 'http://martynov.org/', ! text_require => [ "Ilya Martynov's Web Site" ] ! }, ! { ! test_name => 'Mail-CheckUser page', ! url => 'http://martynov.org/checkuser', ! text_require => [ 'Mail-CheckUser', ! 'Download' ], ! regex_require => ! [ 'Mail-CheckUser-[\d\.]+\.tar\.gz' ] ! } ! ]); =head2 Check Login Form |
From: Ilya M. <m_...@us...> - 2002-01-28 10:07:05
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory usw-pr-cvs1:/tmp/cvs-serv23961 Modified Files: Cookbook.pod Log Message: Minor fix Index: Cookbook.pod =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Cookbook.pod,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Cookbook.pod 2002/01/28 10:05:17 1.2 --- Cookbook.pod 2002/01/28 10:07:03 1.3 *************** *** 59,64 **** Wtscript: - show_cookies=yes - test_name = Login page url = http://fsck.com/rt2/ --- 59,62 ---- |
From: Ilya M. <m_...@us...> - 2002-01-28 10:06:27
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv23775 Modified Files: Changes Log Message: *** empty log message *** Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Changes 2002/01/28 09:49:56 1.4 --- Changes 2002/01/28 10:06:22 1.5 *************** *** 32,35 **** --- 32,37 ---- fixed now. + * Added some content to HTTP::WebTest::Cookbook + 1.99_02 Fri Jan 18 2002 |
From: Ilya M. <m_...@us...> - 2002-01-28 10:05:21
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory usw-pr-cvs1:/tmp/cvs-serv23576 Modified Files: Cookbook.pod Log Message: Add some content for the start Index: Cookbook.pod =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Cookbook.pod,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Cookbook.pod 2002/01/24 12:26:28 1.1.1.1 --- Cookbook.pod 2002/01/28 10:05:17 1.2 *************** *** 9,13 **** =head1 DESCRIPTION ! TODO =head1 COPYRIGHT --- 9,85 ---- =head1 DESCRIPTION ! This document contains some examples of L<HTTP::WebTest|HTTP::WebTest> ! usage. ! ! All examples are either runnable programs (see ! L<HTTP::WebTest::API|HTTP::WebTest::API>) or runnable wtscript files ! (see L<perldoc wt|wt>). ! ! =head1 BASICS ! ! =head2 Check Statis Website ! ! Wtscript: ! ! test_name = First page ! url = http://martynov.org/ ! text_require = ( Ilya Martynov's Web Site ) ! end_test ! ! test_name = Mail-CheckUser page ! url = http://martynov.org/checkuser ! text_require = ( Mail-CheckUser ! Download ) ! regex_require = ( Mail-CheckUser-[\d\.]+\.tar\.gz ) ! end_test ! ! Perl script: ! ! use HTTP::WebTest; ! ! my $webtest = new HTTP::WebTest; ! ! $webtest->run_tests([ { ! test_name => 'First page', ! url => 'http://martynov.org/', ! text_require => [ "Ilya Martynov's Web Site" ] ! }, ! { ! test_name => 'Mail-CheckUser page', ! url => 'http://martynov.org/checkuser', ! text_require => [ 'Mail-CheckUser', ! 'Download' ], ! regex_require => ! [ 'Mail-CheckUser-[\d\.]+\.tar\.gz' ] ! } ! ]); ! ! =head2 Check Login Form ! ! Wtscript: ! ! show_cookies=yes ! ! test_name = Login page ! url = http://fsck.com/rt2/ ! text_require = ( Login ! Username: ! Password:) ! end_test ! ! test_name = Submit wrong username & password ! url = http://fsck.com/rt2/ ! params = ( user => unknownUser ! pass => somePassword ) ! text_require = ( Error ! Your username or password is incorrect ) ! end_test ! ! test_name = Submit correct username & password ! url = http://fsck.com/rt2/ ! params = ( user => guest ! pass => guest ) ! regex_require = ( Signed in as.*?guest.*?\. ) ! end_test =head1 COPYRIGHT |
From: Ilya M. <m_...@us...> - 2002-01-28 09:52:50
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t/test.out In directory usw-pr-cvs1:/tmp/cvs-serv20432/t/test.out Modified Files: run-wtscript Log Message: Names of tests specified in wtscript files was ignored. It is fixed now. Index: run-wtscript =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/test.out/run-wtscript,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** run-wtscript 2002/01/24 12:26:18 1.1.1.1 --- run-wtscript 2002/01/28 09:52:47 1.2 *************** *** 1,7 **** Failed Succeeded Test Name ! 1 2 *** no name *** ! 1 1 *** no name *** URL: http://http.web.test/test-file1 --- 1,8 ---- Failed Succeeded Test Name ! 1 2 Some name here ! 1 1 Another name + Test Name: Some name here URL: http://http.web.test/test-file1 *************** *** 14,17 **** --- 15,19 ---- + Test Name: Another name URL: http://http.web.test/no-such-file |
From: Ilya M. <m_...@us...> - 2002-01-28 09:50:02
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv19671 Modified Files: Changes Log Message: Names of tests specified in wtscript files was ignored. It is fixed now. Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Changes 2002/01/28 07:11:05 1.3 --- Changes 2002/01/28 09:49:56 1.4 *************** *** 29,32 **** --- 29,35 ---- * Now HTTP::WebTest do validates global test parameters. + * Names of tests specified in wtscript files was ignored. It is + fixed now. + 1.99_02 Fri Jan 18 2002 |
From: Ilya M. <m_...@us...> - 2002-01-28 09:50:02
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory usw-pr-cvs1:/tmp/cvs-serv19671/lib/HTTP/WebTest Modified Files: Parser.pm Log Message: Names of tests specified in wtscript files was ignored. It is fixed now. Index: Parser.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Parser.pm,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Parser.pm 2002/01/24 12:26:25 1.1.1.1 --- Parser.pm 2002/01/28 09:49:56 1.2 *************** *** 53,57 **** test: starttest testchunk(s) endtest ! { [ 'test', [ [ 'param', 'name', $item[1] ], @{$item[2]} ] ] } testchunk: comment --- 53,57 ---- test: starttest testchunk(s) endtest ! { [ 'test', [ [ 'param', 'test_name', $item[1] ], @{$item[2]} ] ] } testchunk: comment |
From: Ilya M. <m_...@us...> - 2002-01-28 09:50:02
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory usw-pr-cvs1:/tmp/cvs-serv19671/t Modified Files: 06-parser.t 01-api.t Log Message: Names of tests specified in wtscript files was ignored. It is fixed now. Index: 06-parser.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/06-parser.t,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** 06-parser.t 2002/01/24 12:26:10 1.1.1.1 --- 06-parser.t 2002/01/28 09:49:55 1.2 *************** *** 23,27 **** # check $tests ! ok($tests->[0]{name} eq 'Some name here'); ok($tests->[0]{auth}[0] eq 'name'); ok($tests->[0]{auth}[1] eq 'value'); --- 23,27 ---- # check $tests ! ok($tests->[0]{test_name} eq 'Some name here'); ok($tests->[0]{auth}[0] eq 'name'); ok($tests->[0]{auth}[1] eq 'value'); *************** *** 35,39 **** ok($tests->[0]{regex_forbid}[4] eq 'abcdef 1234'); ok($tests->[0]{regex_forbid}[5] eq ' a b c d \' e f '); ! ok($tests->[1]{name} eq 'Another name'); ok($tests->[1]{url} eq 'www.tiv.net'); ok($tests->[1]{cookie}[0][0] eq '0'); --- 35,39 ---- ok($tests->[0]{regex_forbid}[4] eq 'abcdef 1234'); ok($tests->[0]{regex_forbid}[5] eq ' a b c d \' e f '); ! ok($tests->[1]{test_name} eq 'Another name'); ok($tests->[1]{url} eq 'www.tiv.net'); ok($tests->[1]{cookie}[0][0] eq '0'); Index: 01-api.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/01-api.t,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** 01-api.t 2002/01/28 07:11:05 1.3 --- 01-api.t 2002/01/28 09:49:56 1.4 *************** *** 147,151 **** my ($tests, $opts) = $WEBTEST->parse($data); ! ok($tests->[0]{name} eq 'Some name here'); ok($opts->{text_require}[0] eq 'Require some'); } --- 147,151 ---- my ($tests, $opts) = $WEBTEST->parse($data); ! ok($tests->[0]{test_name} eq 'Some name here'); ok($opts->{text_require}[0] eq 'Require some'); } |
From: Ilya M. <m_...@us...> - 2002-01-28 07:11:13
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory usw-pr-cvs1:/tmp/cvs-serv6159/lib/HTTP/WebTest Modified Files: API.pm Log Message: Now HTTP::WebTest do validates global test parameters. Index: API.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/API.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** API.pm 2002/01/28 06:32:02 1.2 --- API.pm 2002/01/28 07:11:05 1.3 *************** *** 103,106 **** --- 103,119 ---- $self->_global_test_params($params); + # validate global test parameters + my %checks = $self->validate_params($params); + # be sure that checks are sorted by param name + my @broken = grep { not $_->ok } map $checks{$_}, sort keys %checks; + + # is is hard to report errors nicely (i.e. via report plugins) + # here because plugins are not initialized yet. Just die right now + # if there are any bad global test parameters + if(@broken) { + my $die = join "\n", 'HTTP::WebTest:', map $_->comment, @broken; + die $die; + } + # start tests hook for my $plugin (@{$self->plugins}) { |
From: Ilya M. <m_...@us...> - 2002-01-28 07:11:12
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv6159 Modified Files: TODO Changes Log Message: Now HTTP::WebTest do validates global test parameters. Index: TODO =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/TODO,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TODO 2002/01/24 12:26:09 1.1.1.1 --- TODO 2002/01/28 07:11:05 1.2 *************** *** 5,10 **** * write cookbook - * global parameters are not validated - * resurrect all parameter checks from old HTTP::WebTest --- 5,8 ---- Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Changes 2002/01/28 06:33:59 1.2 --- Changes 2002/01/28 07:11:05 1.3 *************** *** 27,30 **** --- 27,32 ---- parameters instead of test object. + * Now HTTP::WebTest do validates global test parameters. + 1.99_02 Fri Jan 18 2002 |
From: Ilya M. <m_...@us...> - 2002-01-28 07:11:12
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory usw-pr-cvs1:/tmp/cvs-serv6159/t Modified Files: 01-api.t Log Message: Now HTTP::WebTest do validates global test parameters. Index: 01-api.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/01-api.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 01-api.t 2002/01/28 06:32:02 1.2 --- 01-api.t 2002/01/28 07:11:05 1.3 *************** *** 16,20 **** use vars qw($HOSTNAME $PORT $URL); ! BEGIN { plan tests => 15 } # init test --- 16,20 ---- use vars qw($HOSTNAME $PORT $URL); ! BEGIN { plan tests => 16 } # init test *************** *** 113,127 **** } ! # 10: check how webtest handlers broken tests { my $tests = [ { url => [] } ]; check_webtest(webtest => $WEBTEST, server_url => $URL, tests => $tests, check_file => 't/test.out/broken-test'); } ! # 11-12: parse wt script { my $data = read_file('t/simple.wt'); --- 113,146 ---- } ! # 10-11: check how webtest handles broken tests { my $tests = [ { url => [] } ]; + # no bad global params check_webtest(webtest => $WEBTEST, server_url => $URL, tests => $tests, check_file => 't/test.out/broken-test'); + + # some bad global params + eval { + my $opts = { plugins => '', + mail_addresses => '', + mail => {}, + mail_server => {}, + mail_from => [] }; + $WEBTEST->run_tests($tests, $opts); + }; + if($@) { + my $res = $@; + $res =~ s/(at )\S+( line )\d+(\.)$/$1SomeFile$2SomeLine$3/; + compare_output(output_ref => \$res, + check_file => 't/test.out/check-global-params'); + } else { + ok(0); + } } ! # 12-13: parse wt script { my $data = read_file('t/simple.wt'); *************** *** 132,136 **** } ! # 13: run tests defined in wt script { generate_wscript(file => 't/real.wt', server_url => $URL); --- 151,155 ---- } ! # 14: run tests defined in wt script { generate_wscript(file => 't/real.wt', server_url => $URL); *************** *** 145,149 **** } ! # 14-15: test num_fail and num_succeed { my $tests = [ { url => abs_url($URL, '/test-file1') }, --- 164,168 ---- } ! # 15-16: test num_fail and num_succeed { my $tests = [ { url => abs_url($URL, '/test-file1') }, |
From: Ilya M. <m_...@us...> - 2002-01-28 07:11:12
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t/test.out In directory usw-pr-cvs1:/tmp/cvs-serv6159/t/test.out Added Files: check-global-params Log Message: Now HTTP::WebTest do validates global test parameters. --- NEW FILE: check-global-params --- HTTP::WebTest: Parameter mail should be of string type. Parameter mail_addresses should be of list type. Parameter mail_from should be of string type. Parameter mail_server should be of string type. Parameter plugins should be of list type. at SomeFile line SomeLine. |
From: Ilya M. <m_...@us...> - 2002-01-28 06:34:03
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory usw-pr-cvs1:/tmp/cvs-serv32451 Modified Files: Changes Log Message: *** empty log message *** Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Changes 2002/01/24 12:26:04 1.1.1.1 --- Changes 2002/01/28 06:33:59 1.2 *************** *** 21,25 **** * Added report plugin HTTP::WebTest::Plugin::TestHarness which ! provides report output compatible with Test::Harness 1.99_02 Fri Jan 18 2002 --- 21,29 ---- * Added report plugin HTTP::WebTest::Plugin::TestHarness which ! provides report output compatible with Test::Harness. ! ! * Renamed method HTTP::WebTest::validate_test to ! HTTP::WebTest::validate_params. Make it validate hash with test ! parameters instead of test object. 1.99_02 Fri Jan 18 2002 |