http-webtest-commits Mailing List for HTTP-WebTest (Page 12)
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-12-22 21:25:58
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory sc8-pr-cvs1:/tmp/cvs-serv10051/t Modified Files: 12-request.t 11-delay.t 10-click.t 09-hooks.t 08-plugins.t 07-compat.t 06-parser.t 05-report.t 03-proxy.t 02-generic.t 01-api.t Log Message: Port self-test suite from Test to Test::More Index: 12-request.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/12-request.t,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** 12-request.t 31 Jul 2002 15:26:23 -0000 1.3 --- 12-request.t 22 Dec 2002 21:25:49 -0000 1.4 *************** *** 6,12 **** use strict; - use Test; ! BEGIN { plan tests => 25 } use HTTP::WebTest::Request; --- 6,11 ---- use strict; ! use Test::More tests => 25; use HTTP::WebTest::Request; Index: 11-delay.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/11-delay.t,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** 11-delay.t 22 Dec 2002 20:35:38 -0000 1.6 --- 11-delay.t 22 Dec 2002 21:25:49 -0000 1.7 *************** *** 7,11 **** use strict; use HTTP::Status; - use Test; use Time::HiRes qw(gettimeofday); --- 7,10 ---- *************** *** 14,18 **** use HTTP::WebTest::Utils qw(start_webserver stop_webserver); ! BEGIN { plan tests => 4 } # init tests --- 13,17 ---- use HTTP::WebTest::Utils qw(start_webserver stop_webserver); ! use Test::More tests => 4; # init tests *************** *** 37,82 **** } ! { ! if(defined $ENV{TEST_FAST}) { ! for (1..2) { ! skip('skip: delay tests are disabled', 1); ! } ! } else { ! my $start = gettimeofday; ! my $tests = [ { url => abs_url($URL, '/test'), ! delay => 2 } ]; ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! opts => $OPTS, ! tests => $tests, ! check_file => 't/test.out/delay'); ! my $delay = gettimeofday - $start; ! ok(1 < $delay and $delay < 3); ! } } ! { ! if(defined $ENV{TEST_FAST}) { ! for (1..2) { ! skip('skip: delay tests are disabled', 1); ! } ! } else { ! my $start = gettimeofday; ! my $tests = [ { url => abs_url($URL, '/test'), ! delay => 4 } ]; ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! opts => $OPTS, ! tests => $tests, ! check_file => 't/test.out/delay'); ! my $delay = gettimeofday - $start; ! ok(3 < $delay and $delay < 5); ! } } --- 36,73 ---- } ! SKIP: { ! skip 'skip: delay tests are disabled', 2 if defined $ENV{TEST_FAST}; ! my $start = gettimeofday; ! my $tests = [ { url => abs_url($URL, '/test'), ! delay => 2 } ]; ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! opts => $OPTS, ! tests => $tests, ! check_file => 't/test.out/delay'); ! ! my $delay = gettimeofday - $start; ! ok(1 < $delay and $delay < 3); } ! SKIP: { ! skip 'skip: delay tests are disabled', 2 if defined $ENV{TEST_FAST}; ! my $start = gettimeofday; ! my $tests = [ { url => abs_url($URL, '/test'), ! delay => 4 } ]; ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! opts => $OPTS, ! tests => $tests, ! check_file => 't/test.out/delay'); ! ! my $delay = gettimeofday - $start; ! ok(3 < $delay and $delay < 5); } Index: 10-click.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/10-click.t,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** 10-click.t 22 Dec 2002 20:35:38 -0000 1.11 --- 10-click.t 22 Dec 2002 21:25:49 -0000 1.12 *************** *** 7,11 **** use strict; use HTTP::Status; - use Test; use HTTP::WebTest; --- 7,10 ---- *************** *** 13,17 **** use HTTP::WebTest::Utils qw(start_webserver stop_webserver); ! BEGIN { plan tests => 9 } # init tests --- 12,16 ---- use HTTP::WebTest::Utils qw(start_webserver stop_webserver); ! use Test::More tests => 9; # init tests Index: 09-hooks.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/09-hooks.t,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** 09-hooks.t 22 Dec 2002 20:35:38 -0000 1.8 --- 09-hooks.t 22 Dec 2002 21:25:49 -0000 1.9 *************** *** 8,12 **** use CGI::Cookie; use HTTP::Status; - use Test; use HTTP::WebTest; --- 8,11 ---- *************** *** 14,18 **** use HTTP::WebTest::Utils qw(start_webserver stop_webserver); ! BEGIN { plan tests => 13 } # init tests --- 13,17 ---- use HTTP::WebTest::Utils qw(start_webserver stop_webserver); ! use Test::More tests => 13; # init tests Index: 08-plugins.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/08-plugins.t,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** 08-plugins.t 22 Dec 2002 20:35:38 -0000 1.6 --- 08-plugins.t 22 Dec 2002 21:25:49 -0000 1.7 *************** *** 7,11 **** use strict; use HTTP::Status; - use Test; use HTTP::WebTest; --- 7,10 ---- *************** *** 15,19 **** use lib 't'; ! BEGIN { plan tests => 4 } # init tests --- 14,18 ---- use lib 't'; ! use Test::More tests => 4; # init tests Index: 07-compat.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/07-compat.t,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** 07-compat.t 22 Dec 2002 20:35:38 -0000 1.7 --- 07-compat.t 22 Dec 2002 21:25:49 -0000 1.8 *************** *** 7,11 **** use strict; use HTTP::Status; - use Test; use HTTP::WebTest qw(run_web_test); --- 7,10 ---- *************** *** 13,17 **** use HTTP::WebTest::Utils qw(start_webserver stop_webserver); ! BEGIN { plan tests => 10 } # init test --- 12,16 ---- use HTTP::WebTest::Utils qw(start_webserver stop_webserver); ! use Test::More tests => 10; # init test Index: 06-parser.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/06-parser.t,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** 06-parser.t 13 Dec 2002 00:50:45 -0000 1.17 --- 06-parser.t 22 Dec 2002 21:25:49 -0000 1.18 *************** *** 6,15 **** use strict; - use Test; use HTTP::WebTest::Parser; use HTTP::WebTest::SelfTest; ! BEGIN { plan tests => 68 } # 1-60: check parsed wt script (which contains all variants of --- 6,14 ---- use strict; use HTTP::WebTest::Parser; use HTTP::WebTest::SelfTest; ! use Test::More tests => 68; # 1-60: check parsed wt script (which contains all variants of *************** *** 109,113 **** parse_error_check(wtscript => 't/borked6.wt', check_file => 't/test.out/borked6.err'); ! if($] >= 5.006) { my $out_filter = sub { $_[0] =~ s/\(eval \d+\) line \d+/(eval NN) line N/; --- 108,115 ---- parse_error_check(wtscript => 't/borked6.wt', check_file => 't/test.out/borked6.err'); ! SKIP: { ! skip 'skip: test is skipped because it triggers Perl bug', 1 ! if $] < 5.006; ! my $out_filter = sub { $_[0] =~ s/\(eval \d+\) line \d+/(eval NN) line N/; *************** *** 116,121 **** check_file => 't/test.out/borked7.err', out_filter => $out_filter); - } else { - skip('skip: test is skipped because it triggers Perl bug', 1); } parse_error_check(wtscript => 't/borked8.wt', --- 118,121 ---- Index: 05-report.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/05-report.t,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** 05-report.t 22 Dec 2002 20:35:38 -0000 1.9 --- 05-report.t 22 Dec 2002 21:25:49 -0000 1.10 *************** *** 9,13 **** use IO::File; use HTTP::Status; - use Test; use HTTP::WebTest; --- 9,12 ---- *************** *** 15,19 **** use HTTP::WebTest::Utils qw(start_webserver stop_webserver); ! BEGIN { plan tests => 12 } # init tests --- 14,18 ---- use HTTP::WebTest::Utils qw(start_webserver stop_webserver); ! use Test::More tests => 12; # init tests *************** *** 55,104 **** # 3-4: test show_cookie parameter ! { my $skip = $HOSTNAME !~ /\..*\./ ? 'skip: cannot test cookies - ' . 'hostname does not contain two dots' : undef; ! if($skip) { ! skip($skip, 1) for 1 .. 2; ! } else { ! my $opts = { show_cookies => 'yes' }; ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! opts => $opts, ! out_filter => $COOKIE_FILTER, ! tests => [ $COOKIE_TEST ], ! check_file => 't/test.out/report-cookie1'); ! # note that second time we should send cookie ourselves ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! opts => $opts, ! out_filter => $COOKIE_FILTER, ! tests => [ $COOKIE_TEST ], ! check_file => 't/test.out/report-cookie2'); ! } } # 5: test show_cookie and show_html parameters ! { my $skip = $HOSTNAME !~ /\..*\./ ? 'skip: cannot test cookies - ' . 'hostname does not contain two dots' : undef; ! if($skip) { ! skip($skip, 1); ! } else { ! my $opts = { show_html => 'yes', ! show_cookies => 'yes' }; ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! opts => $opts, ! out_filter => $COOKIE_FILTER, ! tests => [ $COOKIE_TEST ], ! check_file => 't/test.out/report-html-cookie'); ! } } --- 54,99 ---- # 3-4: test show_cookie parameter ! SKIP: { my $skip = $HOSTNAME !~ /\..*\./ ? 'skip: cannot test cookies - ' . 'hostname does not contain two dots' : undef; ! skip $skip, 2 if $skip; ! my $opts = { show_cookies => 'yes' }; ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! opts => $opts, ! out_filter => $COOKIE_FILTER, ! tests => [ $COOKIE_TEST ], ! check_file => 't/test.out/report-cookie1'); ! ! # note that second time we should send cookie ourselves ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! opts => $opts, ! out_filter => $COOKIE_FILTER, ! tests => [ $COOKIE_TEST ], ! check_file => 't/test.out/report-cookie2'); } # 5: test show_cookie and show_html parameters ! SKIP: { my $skip = $HOSTNAME !~ /\..*\./ ? 'skip: cannot test cookies - ' . 'hostname does not contain two dots' : undef; ! skip $skip, 1 if $skip; ! my $opts = { show_html => 'yes', ! show_cookies => 'yes' }; ! ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! opts => $opts, ! out_filter => $COOKIE_FILTER, ! tests => [ $COOKIE_TEST ], ! check_file => 't/test.out/report-html-cookie'); } *************** *** 160,194 **** # 11-12: test show_html, show_cookie, show_headers with terse parameter ! { ! my $skip = $HOSTNAME !~ /\..*\./ ? 'skip: cannot test cookies - ' . 'hostname does not contain two dots' : undef; ! if($skip) { ! skip($skip, 1) for 1 .. 2; ! } else { ! my $tests = [ $COOKIE_TEST, ! { url => abs_url($URL, '/non-existent') } ]; ! my $out_filter = sub { ! $_[0] =~ s/: .*?GMT/: SOMEDAY/g; ! $_[0] =~ s|Server: libwww-perl-daemon/[\w\.]*|Server: libwww-perl-daemon/NN|g; ! $_[0] =~ s|User-Agent: HTTP-WebTest/[\w\.]*|User-Agent: HTTP-WebTest/NN|g; ! $COOKIE_FILTER->($_[0]); ! }; ! for my $terse (qw(summary failed_only)) { ! my $opts = { terse => $terse, ! show_html => 'yes', ! show_cookie => 'yes', ! show_headers => 'yes' }; ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! opts => $opts, ! tests => $tests, ! out_filter => $out_filter, ! check_file => "t/test.out/report-terse-show-$terse"); ! } } } --- 155,187 ---- # 11-12: test show_html, show_cookie, show_headers with terse parameter ! SKIP: { ! my $skip = $HOSTNAME !~ /\..*\./ ? 'skip: cannot test cookies - ' . 'hostname does not contain two dots' : undef; ! skip $skip, 2 if $skip; ! my $tests = [ $COOKIE_TEST, ! { url => abs_url($URL, '/non-existent') } ]; ! my $out_filter = sub { ! $_[0] =~ s/: .*?GMT/: SOMEDAY/g; ! $_[0] =~ s|Server: libwww-perl-daemon/[\w\.]*|Server: libwww-perl-daemon/NN|g; ! $_[0] =~ s|User-Agent: HTTP-WebTest/[\w\.]*|User-Agent: HTTP-WebTest/NN|g; ! $COOKIE_FILTER->($_[0]); ! }; ! for my $terse (qw(summary failed_only)) { ! my $opts = { terse => $terse, ! show_html => 'yes', ! show_cookie => 'yes', ! show_headers => 'yes' }; ! ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! opts => $opts, ! tests => $tests, ! out_filter => $out_filter, ! check_file => "t/test.out/report-terse-show-$terse"); } } Index: 03-proxy.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/03-proxy.t,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** 03-proxy.t 22 Dec 2002 20:35:39 -0000 1.5 --- 03-proxy.t 22 Dec 2002 21:25:49 -0000 1.6 *************** *** 8,12 **** use HTTP::Response; use HTTP::Status; - use Test; use HTTP::WebTest; --- 8,11 ---- *************** *** 14,18 **** use HTTP::WebTest::Utils qw(start_webserver stop_webserver); ! BEGIN { plan tests => 2 } # init tests --- 13,17 ---- use HTTP::WebTest::Utils qw(start_webserver stop_webserver); ! use Test::More tests => 2; # init tests Index: 02-generic.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/02-generic.t,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** 02-generic.t 22 Dec 2002 20:35:39 -0000 1.23 --- 02-generic.t 22 Dec 2002 21:25:50 -0000 1.24 *************** *** 9,13 **** use HTTP::Response; use HTTP::Status; - use Test; use HTTP::WebTest; --- 9,12 ---- *************** *** 15,19 **** use HTTP::WebTest::Utils qw(start_webserver stop_webserver); ! BEGIN { plan tests => 35 } # init tests --- 14,18 ---- use HTTP::WebTest::Utils qw(start_webserver stop_webserver); ! use Test::More tests => 35; # init tests *************** *** 128,162 **** # 7: run response time tests ! { ! if(defined $ENV{TEST_FAST}) { ! skip('skip: long response time tests are disabled', 1); ! } else { ! my $tests = [ { url => abs_url($URL, '/sleep-2'), ! min_rtime => 1, ! max_rtime => 3 }, ! { url => abs_url($URL, '/sleep-4'), ! min_rtime => 1, ! max_rtime => 3 }, ! { url => abs_url($URL, '/sleep-2'), ! min_rtime => 3, ! max_rtime => 6 }, ! { url => abs_url($URL, '/sleep-4'), ! min_rtime => 3, ! max_rtime => 6 } ! ]; ! my $out_filter = sub { ! $_[0] =~ s|( Response \s+ time \s+ \( \s+ ) ! ( \d+ \. ) ( \d+ ) ! ( \s+ \) ) ! |"$1$2" . ('0' x length($3)) . "$4"|xge; ! }; ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! tests => $tests, ! check_file => 't/test.out/time', ! out_filter => $out_filter); ! } } --- 127,160 ---- # 7: run response time tests ! SKIP: { ! skip 'skip: long response time tests are disabled', 1 ! if defined $ENV{TEST_FAST}; ! my $tests = [ { url => abs_url($URL, '/sleep-2'), ! min_rtime => 1, ! max_rtime => 3 }, ! { url => abs_url($URL, '/sleep-4'), ! min_rtime => 1, ! max_rtime => 3 }, ! { url => abs_url($URL, '/sleep-2'), ! min_rtime => 3, ! max_rtime => 6 }, ! { url => abs_url($URL, '/sleep-4'), ! min_rtime => 3, ! max_rtime => 6 } ! ]; ! my $out_filter = sub { ! $_[0] =~ s|( Response \s+ time \s+ \( \s+ ) ! ( \d+ \. ) ( \d+ ) ! ( \s+ \) ) ! |"$1$2" . ('0' x length($3)) . "$4"|xge; ! }; ! ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! tests => $tests, ! check_file => 't/test.out/time', ! out_filter => $out_filter); } *************** *** 176,354 **** # 9: test cookies - accept-cookies, send-cookies params ! { my $skip = $HOSTNAME !~ /\..*\./ ? 'skip: cannot test cookies - ' . 'hostname does not contain two dots' : undef; ! if($skip) { ! skip($skip, 1); ! } else { ! my $tests = [ { url => abs_url($URL, '/set-cookie-c1-v1') }, ! { url => abs_url($URL, '/show-cookies'), ! text_require => [ '<c1>=<v1>' ] }, ! { url => abs_url($URL, '/set-cookie-c2-v2'), ! accept_cookies => 'no' }, ! { url => abs_url($URL, '/show-cookies'), ! text_forbid => [ '<c2>=<v2>' ] }, ! { url => abs_url($URL, '/set-cookie-c3-v3'), ! accept_cookies => 'yes' }, ! { url => abs_url($URL, '/show-cookies'), ! text_require => [ '<c3>=<v3>' ] }, ! { url => abs_url($URL, '/show-cookies'), ! send_cookies => 'no', ! text_forbid => [ '<c1>=<v1>', ! '<c3>=<v3>'] }, ! { url => abs_url($URL, '/show-cookies'), ! send_cookies => 'yes', ! text_require => [ '<c1>=<v1>', ! '<c3>=<v3>'] }, ! ]; ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! tests => $tests, ! check_file => 't/test.out/cookie1'); ! } } # 10: test cookies - cookies param (deprecated syntax) ! { my $skip = $HOSTNAME !~ /\..*\./ ? 'skip: cannot test cookies - ' . 'hostname does not contain two dots' : undef; ! if($skip) { ! skip($skip, 1); ! } else { ! my $tests = [ { url => abs_url($URL, '/show-cookies'), ! cookies => [ [ 0, 'c4', 'v4', '/', $HOSTNAME ], ! [ 0, 'c5', 'v5', '/', $HOSTNAME, ! '', '', '', '', '' ], ! [ 0, 'c6', 'v6', '/', $HOSTNAME, ! undef, undef, undef, undef, undef ], ! [ 0, 'c7', 'v7', '/', $HOSTNAME, ! '', '', '', '', '', ! 'attr1', 'avalue1' ] ], ! text_require => [ '<c4>=<v4>', ! '<c5>=<v5>', ! '<c6>=<v6>', ! '<c7>=<v7>' ] }, ! { url => abs_url($URL, '/show-cookies'), ! cookies => [ [ 0, 'c8', 'v8', ! '/wrong-path', $HOSTNAME ], ! [ 0, 'c9', 'v9', '/', ! 'wrong.hostname.com' ] ], ! text_forbid => [ '<c8>=<v8>', ! '<c9>=<v9>' ] } ! ]; ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! tests => $tests, ! check_file => 't/test.out/cookie2'); ! } } # 11-14: test cookies - cookies param (new syntax) ! { my $skip = $HOSTNAME !~ /\..*\./ ? 'skip: cannot test cookies - ' . 'hostname does not contain two dots' : undef; ! if($skip) { ! skip($skip, 1) for 1..4; ! } else { ! my $tests = [ { url => abs_url($URL, '/show-cookies'), ! cookies => [ [ name => 'N001', ! value => 'V001', ! path => '/', ! domain => $HOSTNAME ], ! [ name => 'N002', ! value => 'V002', ! path => '/', ! domain => $HOSTNAME, ! rest => [ Comment => 'test' ] ] ], ! text_require => [ '<N001>=<V001>', ! '<N002>=<V002>' ] }, ! { url => abs_url($URL, '/show-cookies'), ! cookies => [ [ name => 'N003', ! value => 'V003', ! path => '/', ! domain => 'wrong.hostname.com' ], ! [ name => 'N004', ! value => 'V004', ! domain => $HOSTNAME, ! path => '/wrong/path' ] ], ! text_forbid => [ '<N003>=<V003>', ! '<N004>=<V004>' ] } ! ]; ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! tests => $tests, ! check_file => 't/test.out/cookie2a'); ! my $cookie_jar = $WEBTEST->user_agent->cookie_jar; ! my $n001a_ok = 0; ! my $n001b_ok = 0; ! my $n002_ok = 0; ! $cookie_jar->scan(sub { ! my @cookie = @_; ! # test cookie N001 for correct path ! if( $cookie[1] eq 'N001') { ! $n001a_ok = 1 ! if $cookie[3] eq '/'; ! } ! # test cookie N001 for correct domain ! if( $cookie[1] eq 'N001') { ! $n001b_ok = 1 ! if $cookie[4] eq $HOSTNAME; ! } ! # test cookie N002 for correct comment ! # field ! if( $cookie[1] eq 'N002') { ! $n002_ok = 1 ! if $cookie[10]{Comment} eq 'test'; ! } ! }); ! ok($n001a_ok); ! ok($n001b_ok); ! ok($n002_ok); ! } } # 15: and another cookie test (tests alias parameter) ! { my $skip = $HOSTNAME !~ /\..*\./ ? 'skip: cannot test cookies - ' . 'hostname does not contain two dots' : undef; ! if($skip) { ! skip($skip, 1); ! } else { ! my $domain = $HOSTNAME; ! $domain =~ s/^.*\././; ! my $tests = [ { url => abs_url($URL, '/show-cookies'), ! cookie => [ 0, ! 'webtest', ! 'This is the cookie value', ! '/', ! $domain, ! '', ! 0, ! '', ! 2592000, ! '', ! 'Comment', ! 'What a tasty cookie!' ], ! text_require => [ '<webtest>=<This is the cookie value>' ] } ! ]; ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! tests => $tests, ! check_file => 't/test.out/cookie3', ! opts => { show_html => 'yes' }); ! } } --- 174,344 ---- # 9: test cookies - accept-cookies, send-cookies params ! SKIP: { my $skip = $HOSTNAME !~ /\..*\./ ? 'skip: cannot test cookies - ' . 'hostname does not contain two dots' : undef; ! skip $skip, 1 if $skip; ! my $tests = [ { url => abs_url($URL, '/set-cookie-c1-v1') }, ! { url => abs_url($URL, '/show-cookies'), ! text_require => [ '<c1>=<v1>' ] }, ! { url => abs_url($URL, '/set-cookie-c2-v2'), ! accept_cookies => 'no' }, ! { url => abs_url($URL, '/show-cookies'), ! text_forbid => [ '<c2>=<v2>' ] }, ! { url => abs_url($URL, '/set-cookie-c3-v3'), ! accept_cookies => 'yes' }, ! { url => abs_url($URL, '/show-cookies'), ! text_require => [ '<c3>=<v3>' ] }, ! { url => abs_url($URL, '/show-cookies'), ! send_cookies => 'no', ! text_forbid => [ '<c1>=<v1>', ! '<c3>=<v3>'] }, ! { url => abs_url($URL, '/show-cookies'), ! send_cookies => 'yes', ! text_require => [ '<c1>=<v1>', ! '<c3>=<v3>'] }, ! ]; ! ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! tests => $tests, ! check_file => 't/test.out/cookie1'); } # 10: test cookies - cookies param (deprecated syntax) ! SKIP: { my $skip = $HOSTNAME !~ /\..*\./ ? 'skip: cannot test cookies - ' . 'hostname does not contain two dots' : undef; ! skip $skip, 1 if $skip; ! my $tests = [ { url => abs_url($URL, '/show-cookies'), ! cookies => [ [ 0, 'c4', 'v4', '/', $HOSTNAME ], ! [ 0, 'c5', 'v5', '/', $HOSTNAME, ! '', '', '', '', '' ], ! [ 0, 'c6', 'v6', '/', $HOSTNAME, ! undef, undef, undef, undef, undef ], ! [ 0, 'c7', 'v7', '/', $HOSTNAME, ! '', '', '', '', '', ! 'attr1', 'avalue1' ] ], ! text_require => [ '<c4>=<v4>', ! '<c5>=<v5>', ! '<c6>=<v6>', ! '<c7>=<v7>' ] }, ! { url => abs_url($URL, '/show-cookies'), ! cookies => [ [ 0, 'c8', 'v8', ! '/wrong-path', $HOSTNAME ], ! [ 0, 'c9', 'v9', '/', ! 'wrong.hostname.com' ] ], ! text_forbid => [ '<c8>=<v8>', ! '<c9>=<v9>' ] } ! ]; ! ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! tests => $tests, ! check_file => 't/test.out/cookie2'); } # 11-14: test cookies - cookies param (new syntax) ! SKIP: { my $skip = $HOSTNAME !~ /\..*\./ ? 'skip: cannot test cookies - ' . 'hostname does not contain two dots' : undef; ! skip $skip, 4 if $skip; ! my $tests = [ { url => abs_url($URL, '/show-cookies'), ! cookies => [ [ name => 'N001', ! value => 'V001', ! path => '/', ! domain => $HOSTNAME ], ! [ name => 'N002', ! value => 'V002', ! path => '/', ! domain => $HOSTNAME, ! rest => [ Comment => 'test' ] ] ], ! text_require => [ '<N001>=<V001>', ! '<N002>=<V002>' ] }, ! { url => abs_url($URL, '/show-cookies'), ! cookies => [ [ name => 'N003', ! value => 'V003', ! path => '/', ! domain => 'wrong.hostname.com' ], ! [ name => 'N004', ! value => 'V004', ! domain => $HOSTNAME, ! path => '/wrong/path' ] ], ! text_forbid => [ '<N003>=<V003>', ! '<N004>=<V004>' ] } ! ]; ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! tests => $tests, ! check_file => 't/test.out/cookie2a'); ! ! my $cookie_jar = $WEBTEST->user_agent->cookie_jar; ! my $n001a_ok = 0; ! my $n001b_ok = 0; ! my $n002_ok = 0; ! $cookie_jar->scan(sub { ! my @cookie = @_; ! # test cookie N001 for correct path ! if( $cookie[1] eq 'N001') { ! $n001a_ok = 1 ! if $cookie[3] eq '/'; ! } ! # test cookie N001 for correct domain ! if( $cookie[1] eq 'N001') { ! $n001b_ok = 1 ! if $cookie[4] eq $HOSTNAME; ! } ! # test cookie N002 for correct comment ! # field ! if( $cookie[1] eq 'N002') { ! $n002_ok = 1 ! if $cookie[10]{Comment} eq 'test'; ! } ! }); ! ok($n001a_ok); ! ok($n001b_ok); ! ok($n002_ok); } # 15: and another cookie test (tests alias parameter) ! SKIP: { my $skip = $HOSTNAME !~ /\..*\./ ? 'skip: cannot test cookies - ' . 'hostname does not contain two dots' : undef; ! skip $skip, 1 if $skip; ! my $domain = $HOSTNAME; ! $domain =~ s/^.*\././; ! my $tests = [ { url => abs_url($URL, '/show-cookies'), ! cookie => [ 0, ! 'webtest', ! 'This is the cookie value', ! '/', ! $domain, ! '', ! 0, ! '', ! 2592000, ! '', ! 'Comment', ! 'What a tasty cookie!' ], ! text_require => [ '<webtest>=<This is the cookie value>' ] } ! ]; ! ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! tests => $tests, ! check_file => 't/test.out/cookie3', ! opts => { show_html => 'yes' }); } *************** *** 645,676 **** # 35: run timeout tests ! { ! if(defined $ENV{TEST_FAST}) { ! skip('skip: long response time tests are disabled', 1); ! } else { ! my $tests = [ { url => abs_url($URL, '/sleep-2'), ! max_rtime => 10, ! timeout => 4 }, ! { url => abs_url($URL, '/sleep-3'), ! max_rtime => 10, ! timeout => 2 }, ! { url => abs_url($URL, '/sleep-4'), ! max_rtime => 10, ! timeout => 1 }, ! ]; ! my $out_filter = sub { ! $_[0] =~ s|( Response \s+ time \s+ \( \s+ ) ! ( \d+ \. ) ( \d+ ) ! ( \s+ \) ) ! |"$1$2" . ('0' x length($3)) . "$4"|xge; ! }; ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! tests => $tests, ! check_file => 't/test.out/timeout', ! out_filter => $out_filter); ! } } --- 635,665 ---- # 35: run timeout tests ! SKIP: { ! skip 'skip: long response time tests are disabled', 1 ! if defined $ENV{TEST_FAST}; ! my $tests = [ { url => abs_url($URL, '/sleep-2'), ! max_rtime => 10, ! timeout => 4 }, ! { url => abs_url($URL, '/sleep-3'), ! max_rtime => 10, ! timeout => 2 }, ! { url => abs_url($URL, '/sleep-4'), ! max_rtime => 10, ! timeout => 1 }, ! ]; ! my $out_filter = sub { ! $_[0] =~ s|( Response \s+ time \s+ \( \s+ ) ! ( \d+ \. ) ( \d+ ) ! ( \s+ \) ) ! |"$1$2" . ('0' x length($3)) . "$4"|xge; ! }; ! ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! tests => $tests, ! check_file => 't/test.out/timeout', ! out_filter => $out_filter); } Index: 01-api.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/01-api.t,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** 01-api.t 22 Dec 2002 20:35:39 -0000 1.13 --- 01-api.t 22 Dec 2002 21:25:50 -0000 1.14 *************** *** 7,11 **** use strict; use HTTP::Status; - use Test; use HTTP::WebTest; --- 7,10 ---- *************** *** 13,17 **** use HTTP::WebTest::Utils qw(start_webserver stop_webserver); ! BEGIN { plan tests => 15 } # init test --- 12,16 ---- use HTTP::WebTest::Utils qw(start_webserver stop_webserver); ! use Test::More tests => 15; # init test |
From: Ilya M. <m_...@us...> - 2002-12-22 21:25:58
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv10051 Modified Files: Makefile.PL INSTALL Changes Log Message: Port self-test suite from Test to Test::More Index: Makefile.PL =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Makefile.PL,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Makefile.PL 14 Dec 2002 16:56:31 -0000 1.14 --- Makefile.PL 22 Dec 2002 21:25:50 -0000 1.15 *************** *** 23,27 **** 'Pod::Man' => 1.14, 'Time::HiRes' => 0, ! 'Test::Builder' => 0, 'Test::Builder::Tester' => 0, 'URI' => 0 }, --- 23,27 ---- 'Pod::Man' => 1.14, 'Time::HiRes' => 0, ! 'Test::More' => 0, 'Test::Builder::Tester' => 0, 'URI' => 0 }, Index: INSTALL =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/INSTALL,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** INSTALL 14 Dec 2002 16:57:08 -0000 1.10 --- INSTALL 22 Dec 2002 21:25:50 -0000 1.11 *************** *** 6,10 **** * libwww 5.60 or later * libnet (is included in Perl 5.8.0 and later) ! * Test::Builder (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) --- 6,10 ---- * 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) Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** Changes 22 Dec 2002 20:35:39 -0000 1.65 --- Changes 22 Dec 2002 21:25:50 -0000 1.66 *************** *** 5,11 **** CURRENT VERSION DEPRECATIONS: ! Subroutines 'start_webserver' and 'stop_webserver' was moved from HTTP::WebTest::SelfTest to HTTP::WebTest::Utils. They still can be exported from HTTP::WebTest::SelfTest but their usage from this module --- 5,15 ---- CURRENT VERSION + ENHANCEMENTS: + + * Port self test suite from Test to Test::More. + DEPRECATIONS: ! * Subroutines 'start_webserver' and 'stop_webserver' was moved from HTTP::WebTest::SelfTest to HTTP::WebTest::Utils. They still can be exported from HTTP::WebTest::SelfTest but their usage from this module |
From: Ilya M. <m_...@us...> - 2002-12-22 21:25:58
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv10051/lib/HTTP/WebTest Modified Files: SelfTest.pm Log Message: Port self-test suite from Test to Test::More Index: SelfTest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/SelfTest.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SelfTest.pm 22 Dec 2002 20:35:39 -0000 1.4 --- SelfTest.pm 22 Dec 2002 21:25:50 -0000 1.5 *************** *** 43,47 **** use MIME::Base64; use Sys::Hostname; - use Test; use URI; --- 43,46 ---- *************** *** 62,66 **** =cut ! $PORT = find_port(hostname => $HOSTNAME); die "Can't find free port" unless defined $PORT; --- 61,65 ---- =cut ! $PORT = find_port(); die "Can't find free port" unless defined $PORT; *************** *** 337,341 **** my $output1 = read_file($check_file, 1); _print_diff($output1, $output2); ! ok(($output1 eq $output2) or defined $ENV{TEST_FIX}); if(defined $ENV{TEST_FIX} and $output1 ne $output2) { --- 336,340 ---- my $output1 = read_file($check_file, 1); _print_diff($output1, $output2); ! _ok(($output1 eq $output2) or defined $ENV{TEST_FIX}); if(defined $ENV{TEST_FIX} and $output1 ne $output2) { *************** *** 343,346 **** --- 342,358 ---- write_file($check_file, $output2); + } + } + + # ok compatible with Test and Test::Builder + sub _ok { + # if Test is already loaded use its ok + if(Test->can('ok')) { + @_ = $_[0]; + goto \&Test::ok; + } else { + require Test::Builder; + local $Test::Builder::Level = $Test::Builder::Level + 1; + Test::Builder->new->ok(@_); } } |
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory sc8-pr-cvs1:/tmp/cvs-serv4586/t Modified Files: 13-harness.t 11-delay.t 10-click.t 09-hooks.t 08-plugins.t 07-compat.t 05-report.t 03-proxy.t 02-generic.t 01-api.t Log Message: Subroutines 'start_webserver' and 'stop_webserver' was moved from HTTP::WebTest::SelfTest to HTTP::WebTest::Utils. They still can be exported from HTTP::WebTest::SelfTest but their usage from this module is deprecated. Index: 13-harness.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/13-harness.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 13-harness.t 13 Dec 2002 00:53:42 -0000 1.1 --- 13-harness.t 22 Dec 2002 20:35:38 -0000 1.2 *************** *** 10,13 **** --- 10,14 ---- use HTTP::WebTest; use HTTP::WebTest::SelfTest; + use HTTP::WebTest::Utils qw(start_webserver stop_webserver); # init tests Index: 11-delay.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/11-delay.t,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** 11-delay.t 12 Dec 2002 21:43:10 -0000 1.5 --- 11-delay.t 22 Dec 2002 20:35:38 -0000 1.6 *************** *** 12,15 **** --- 12,16 ---- use HTTP::WebTest; use HTTP::WebTest::SelfTest; + use HTTP::WebTest::Utils qw(start_webserver stop_webserver); BEGIN { plan tests => 4 } Index: 10-click.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/10-click.t,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** 10-click.t 12 Dec 2002 21:43:11 -0000 1.10 --- 10-click.t 22 Dec 2002 20:35:38 -0000 1.11 *************** *** 11,14 **** --- 11,15 ---- use HTTP::WebTest; use HTTP::WebTest::SelfTest; + use HTTP::WebTest::Utils qw(start_webserver stop_webserver); BEGIN { plan tests => 9 } Index: 09-hooks.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/09-hooks.t,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** 09-hooks.t 13 Dec 2002 00:50:45 -0000 1.7 --- 09-hooks.t 22 Dec 2002 20:35:38 -0000 1.8 *************** *** 12,15 **** --- 12,16 ---- use HTTP::WebTest; use HTTP::WebTest::SelfTest; + use HTTP::WebTest::Utils qw(start_webserver stop_webserver); BEGIN { plan tests => 13 } Index: 08-plugins.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/08-plugins.t,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** 08-plugins.t 12 Dec 2002 21:43:11 -0000 1.5 --- 08-plugins.t 22 Dec 2002 20:35:38 -0000 1.6 *************** *** 11,14 **** --- 11,15 ---- use HTTP::WebTest; use HTTP::WebTest::SelfTest; + use HTTP::WebTest::Utils qw(start_webserver stop_webserver); use lib 't'; Index: 07-compat.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/07-compat.t,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** 07-compat.t 13 Dec 2002 00:50:45 -0000 1.6 --- 07-compat.t 22 Dec 2002 20:35:38 -0000 1.7 *************** *** 11,14 **** --- 11,15 ---- use HTTP::WebTest qw(run_web_test); use HTTP::WebTest::SelfTest; + use HTTP::WebTest::Utils qw(start_webserver stop_webserver); BEGIN { plan tests => 10 } Index: 05-report.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/05-report.t,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** 05-report.t 13 Dec 2002 00:53:42 -0000 1.8 --- 05-report.t 22 Dec 2002 20:35:38 -0000 1.9 *************** *** 13,16 **** --- 13,17 ---- use HTTP::WebTest; use HTTP::WebTest::SelfTest; + use HTTP::WebTest::Utils qw(start_webserver stop_webserver); BEGIN { plan tests => 12 } Index: 03-proxy.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/03-proxy.t,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** 03-proxy.t 12 Dec 2002 21:43:12 -0000 1.4 --- 03-proxy.t 22 Dec 2002 20:35:39 -0000 1.5 *************** *** 12,15 **** --- 12,16 ---- use HTTP::WebTest; use HTTP::WebTest::SelfTest; + use HTTP::WebTest::Utils qw(start_webserver stop_webserver); BEGIN { plan tests => 2 } Index: 02-generic.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/02-generic.t,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** 02-generic.t 12 Dec 2002 23:22:08 -0000 1.22 --- 02-generic.t 22 Dec 2002 20:35:39 -0000 1.23 *************** *** 13,16 **** --- 13,17 ---- use HTTP::WebTest; use HTTP::WebTest::SelfTest; + use HTTP::WebTest::Utils qw(start_webserver stop_webserver); BEGIN { plan tests => 35 } Index: 01-api.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/01-api.t,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** 01-api.t 12 Dec 2002 23:22:09 -0000 1.12 --- 01-api.t 22 Dec 2002 20:35:39 -0000 1.13 *************** *** 11,14 **** --- 11,15 ---- use HTTP::WebTest; use HTTP::WebTest::SelfTest; + use HTTP::WebTest::Utils qw(start_webserver stop_webserver); BEGIN { plan tests => 15 } |
From: Ilya M. <m_...@us...> - 2002-12-22 20:35:52
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv4586/lib/HTTP/WebTest Modified Files: Utils.pm SelfTest.pm Log Message: Subroutines 'start_webserver' and 'stop_webserver' was moved from HTTP::WebTest::SelfTest to HTTP::WebTest::Utils. They still can be exported from HTTP::WebTest::SelfTest but their usage from this module is deprecated. Index: Utils.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Utils.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Utils.pm 21 Jun 2002 10:51:27 -0000 1.7 --- Utils.pm 22 Dec 2002 20:35:39 -0000 1.8 *************** *** 10,16 **** use HTTP::WebTest::Utils; - 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); --- 10,13 ---- *************** *** 19,22 **** --- 16,21 ---- find_port(hostname => $hostname); + my $pid = start_webserver(port => $port, server_sub => sub { ... }); + stop_webserver($pid); copy_dir($src_dir, $dst_dir); *************** *** 29,34 **** =head1 DESCRIPTION ! This packages contains utility subroutines used by ! L<HTTP::WebTest|HTTP::WebTest>. =head1 SUBROUTINES --- 28,34 ---- =head1 DESCRIPTION ! This packages contains utility subroutines used by ! L<HTTP::WebTest|HTTP::WebTest>. All of them can be exported but none ! of them is exported by default. =head1 SUBROUTINES *************** *** 51,55 **** @EXPORT_OK = qw(make_access_method find_port copy_dir load_package ! eval_in_playground make_sub_in_playground); =head2 make_access_method($field, $optional_default_value) --- 51,56 ---- @EXPORT_OK = qw(make_access_method find_port copy_dir load_package ! eval_in_playground make_sub_in_playground ! start_webserver stop_webserver); =head2 make_access_method($field, $optional_default_value) *************** *** 133,136 **** --- 134,228 ---- return undef; + } + + =head2 start_webserver(%params) + + Starts separate process with a test webserver. + + =head3 Parameters + + =over 4 + + =item port => $port + + A port number where the test webserver listens for incoming connections. + + =item server_sub => $server_sub + + A reference on a subroutine to handle requests. It get passed two + named parameters: C<connect> and C<request>. + + =back + + =cut + + sub start_webserver { + my %param = @_; + + my $daemon = HTTP::Daemon->new(LocalPort => $param{port}, Reuse => 1) + or die; + + # create daemon process + my $pid = fork; + die unless defined $pid; + return $pid if $pid != 0; + + # when we are run under debugger do not stop and call debugger at + # the exit of the forked process. This helps to workaround problem + # when forked process tries to takeover and to screw the terminal + $DB::inhibit_exit = 0; + + # if we are running with Test::Builder do not let it output + # anything for daemon process + if(Test::Builder->can('new')) { + Test::Builder->new->no_ending(1); + } + + # set 'we are working' flag + my $done = 0; + + # exit on SIGTERM + $SIG{TERM} = sub { $done = 1 }; + # handle connections closed by client + $SIG{PIPE} = 'IGNORE'; + + # handle requests till process is killed + eval { + until($done) { + # wait one tenth of second for connection + my $rbits = ''; + vec($rbits, $daemon->fileno, 1) = 1; + my $nfound = select $rbits, '', '', 0.1; + + # handle incoming connections + if($nfound > 0) { + my $connect = $daemon->accept; + die unless defined $connect; + + while (my $request = $connect->get_request) { + $param{server_sub}->(connect => $connect, + request => $request); + } + $connect->close; + } + } + }; + # in any event try to shutdown daemon nicely + $daemon->close; + if($@) { die $@ }; + + exit 0; + } + + =head2 stop_webserver($pid) + + Kills a test webserver specified by its PID. + + =cut + + sub stop_webserver { + my $pid = shift; + + return kill 'SIGTERM', $pid; } Index: SelfTest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/SelfTest.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SelfTest.pm 19 Dec 2002 23:24:42 -0000 1.3 --- SelfTest.pm 22 Dec 2002 20:35:39 -0000 1.4 *************** *** 42,51 **** use Algorithm::Diff qw(diff); use MIME::Base64; - use POSIX qw(SIGTERM); use Sys::Hostname; use Test; use URI; ! use HTTP::WebTest::Utils qw(find_port); =head2 $HOSTNAME --- 42,50 ---- use Algorithm::Diff qw(diff); use MIME::Base64; use Sys::Hostname; use Test; use URI; ! use HTTP::WebTest::Utils qw(find_port start_webserver stop_webserver); =head2 $HOSTNAME *************** *** 361,455 **** } - =head2 start_webserver(%params) - - Starts separate process with a test webserver. - - =head3 Parameters - - =over 4 - - =item port => $port - - A port number where the test webserver listens for incoming connections. - - =item server_sub => $server_sub - - A reference on a subroutine to handle requests. It get passed two - named parameters: C<connect> and C<request>. - - =back - - =cut - - sub start_webserver { - my %param = @_; - - my $daemon = HTTP::Daemon->new(LocalPort => $param{port}, Reuse => 1) - or die; - - # create daemon process - my $pid = fork; - die unless defined $pid; - return $pid if $pid != 0; - - # when we are run under debugger do not stop and call debugger at - # the exit of the forked process. This helps to workaround problem - # when forked process tries to takeover and to screw the terminal - $DB::inhibit_exit = 0; - - # if we are running with Test::Builder do not let it output - # anything for daemon process - if(Test::Builder->can('new')) { - Test::Builder->new->no_ending(1); - } - - # set 'we are working' flag - my $done = 0; - - # exit on SIGTERM - $SIG{TERM} = sub { $done = 1 }; - # handle connections closed by client - $SIG{PIPE} = 'IGNORE'; - - # handle requests till process is killed - eval { - until($done) { - # wait one tenth of second for connection - my $rbits = ''; - vec($rbits, $daemon->fileno, 1) = 1; - my $nfound = select $rbits, '', '', 0.1; - - # handle incoming connections - if($nfound > 0) { - my $connect = $daemon->accept; - die unless defined $connect; - - while (my $request = $connect->get_request) { - $param{server_sub}->(connect => $connect, - request => $request); - } - $connect->close; - } - } - }; - # in any event try to shutdown daemon nicely - $daemon->close; - if($@) { die $@ }; - - exit 0; - } - - =head2 stop_webserver($pid) - - Kills a test webserver specified by its PID. - - =cut - - sub stop_webserver { - my $pid = shift; - - return kill SIGTERM, $pid; - } - =head2 parse_basic_credentials($credentials) --- 360,363 ---- *************** *** 475,478 **** --- 383,404 ---- return ($user, $password); } + + =head1 DEPRECATED SUBROUTINES + + This module imports in namespace of test script following helper + subroutines but they are deprecated and may be removed in the future + from this module. + + =head2 start_webserver + + This subroutine was moved into + L<HTTP::WebTest::Utils|HTTP::WebTest::Utils> but for backward + compatibility purposes can be exported from this module. + + =head2 stop_webserver + + This subroutine was moved into + L<HTTP::WebTest::Utils|HTTP::WebTest::Utils> but for backward + compatibility purposes can be exported from this module. =head1 COPYRIGHT |
From: Ilya M. <m_...@us...> - 2002-12-22 20:35:52
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv4586 Modified Files: Changes Log Message: Subroutines 'start_webserver' and 'stop_webserver' was moved from HTTP::WebTest::SelfTest to HTTP::WebTest::Utils. They still can be exported from HTTP::WebTest::SelfTest but their usage from this module is deprecated. Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** Changes 14 Dec 2002 17:31:11 -0000 1.64 --- Changes 22 Dec 2002 20:35:39 -0000 1.65 *************** *** 3,6 **** --- 3,15 ---- Revision history for Perl module HTTP::WebTest. + CURRENT VERSION + + DEPRECATIONS: + + Subroutines 'start_webserver' and 'stop_webserver' was moved from + HTTP::WebTest::SelfTest to HTTP::WebTest::Utils. They still can be + exported from HTTP::WebTest::SelfTest but their usage from this module + is deprecated. + 2.00 Sat Dec 14 2002 |
From: Ilya M. <m_...@us...> - 2002-12-19 23:24:51
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv3862/lib/HTTP/WebTest Modified Files: SelfTest.pm Log Message: Play better with Test::Builder and older version of Perl Index: SelfTest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/SelfTest.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SelfTest.pm 12 Dec 2002 21:43:12 -0000 1.2 --- SelfTest.pm 19 Dec 2002 23:24:42 -0000 1.3 *************** *** 385,393 **** my %param = @_; ! # try to start server ! my $daemon = HTTP::Daemon->new(LocalPort => $param{port}, ReuseAddr => 1) or die; ! # fork server to separate process my $pid = fork; die unless defined $pid; --- 385,392 ---- my %param = @_; ! my $daemon = HTTP::Daemon->new(LocalPort => $param{port}, Reuse => 1) or die; ! # create daemon process my $pid = fork; die unless defined $pid; *************** *** 399,402 **** --- 398,407 ---- $DB::inhibit_exit = 0; + # if we are running with Test::Builder do not let it output + # anything for daemon process + if(Test::Builder->can('new')) { + Test::Builder->new->no_ending(1); + } + # set 'we are working' flag my $done = 0; *************** *** 404,411 **** # exit on SIGTERM $SIG{TERM} = sub { $done = 1 }; ! # handle closed connection $SIG{PIPE} = 'IGNORE'; ! # handle requests untill we are killed eval { until($done) { --- 409,416 ---- # exit on SIGTERM $SIG{TERM} = sub { $done = 1 }; ! # handle connections closed by client $SIG{PIPE} = 'IGNORE'; ! # handle requests till process is killed eval { until($done) { *************** *** 415,419 **** my $nfound = select $rbits, '', '', 0.1; ! # if we have connection then handle it if($nfound > 0) { my $connect = $daemon->accept; --- 420,424 ---- my $nfound = select $rbits, '', '', 0.1; ! # handle incoming connections if($nfound > 0) { my $connect = $daemon->accept; *************** *** 425,433 **** } $connect->close; - undef $connect; } } }; ! # in any case try to shutdown daemon correctly $daemon->close; if($@) { die $@ }; --- 430,437 ---- } $connect->close; } } }; ! # in any event try to shutdown daemon nicely $daemon->close; if($@) { die $@ }; |
From: Ilya M. <m_...@us...> - 2002-12-16 22:19:45
|
Update of /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache In directory sc8-pr-cvs1:/tmp/cvs-serv11328 Modified Files: Changes Log Message: Minor corrections Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/Changes,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Changes 16 Dec 2002 21:17:18 -0000 1.2 --- Changes 16 Dec 2002 22:19:35 -0000 1.3 *************** *** 7,11 **** BUG FIXES: ! * Fix bug in test suite triggered when 'make test' is run non-interactively. --- 7,11 ---- BUG FIXES: ! * Fix bug in test suite which is triggered when 'make test' is run non-interactively. |
From: Ilya M. <m_...@us...> - 2002-12-16 21:17:21
|
Update of /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache In directory sc8-pr-cvs1:/tmp/cvs-serv20218 Modified Files: Changes Log Message: Updated Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/Changes,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Changes 12 Dec 2002 22:48:32 -0000 1.1 --- Changes 16 Dec 2002 21:17:18 -0000 1.2 *************** *** 3,7 **** Revision history for Perl module HTTP::WebTest::Plugin::Apache. ! CURRENT VERSION * First version (based on code used to be in HTTP::WebTest distro). --- 3,14 ---- Revision history for Perl module HTTP::WebTest::Plugin::Apache. ! 1.01 Sat Dec 17 2002 ! ! BUG FIXES: ! ! * Fix bug in test suite triggered when 'make test' is run ! non-interactively. ! ! 1.00 Sat Dec 14 2002 * First version (based on code used to be in HTTP::WebTest distro). |
From: Ilya M. <m_...@us...> - 2002-12-16 21:16:54
|
Update of /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/lib/HTTP/WebTest/Plugin In directory sc8-pr-cvs1:/tmp/cvs-serv19912/lib/HTTP/WebTest/Plugin Modified Files: Apache.pm Log Message: Bump version and fix some comments Index: Apache.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/lib/HTTP/WebTest/Plugin/Apache.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Apache.pm 14 Dec 2002 20:15:00 -0000 1.4 --- Apache.pm 16 Dec 2002 21:16:51 -0000 1.5 *************** *** 3,7 **** package HTTP::WebTest::Plugin::Apache; ! $VERSION = '1.00'; =head1 NAME --- 3,7 ---- package HTTP::WebTest::Plugin::Apache; ! $VERSION = '1.01'; =head1 NAME *************** *** 445,451 **** } ! # 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 { my $self = shift; --- 445,451 ---- } ! # forks a child process that starts Apache on a random private/dynamic ! # port number. Checks if Apache was started by fetching a test page ! # and searching the fetched page for a tag line. sub start_apache { my $self = shift; |
From: Ilya M. <m_...@us...> - 2002-12-16 21:14:11
|
Update of /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/t In directory sc8-pr-cvs1:/tmp/cvs-serv18827/t Modified Files: 01-apache.t Log Message: Fix bug in test suite triggered when 'make test' is run non-interactively. Index: 01-apache.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/t/01-apache.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 01-apache.t 12 Dec 2002 22:50:57 -0000 1.2 --- 01-apache.t 16 Dec 2002 21:14:00 -0000 1.3 *************** *** 20,24 **** use vars qw($HOSTNAME $PORT $URL $TEST_NUM %CONFIG); ! require '.config'; my $APACHE_EXEC = $CONFIG{APACHE_EXEC}; --- 20,24 ---- use vars qw($HOSTNAME $PORT $URL $TEST_NUM %CONFIG); ! do '.config'; my $APACHE_EXEC = $CONFIG{APACHE_EXEC}; |
From: Ilya M. <m_...@us...> - 2002-12-14 20:15:05
|
Update of /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/lib/HTTP/WebTest/Plugin In directory sc8-pr-cvs1:/tmp/cvs-serv27840/lib/HTTP/WebTest/Plugin Modified Files: Apache.pm Log Message: Minor doc corrections Index: Apache.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/lib/HTTP/WebTest/Plugin/Apache.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Apache.pm 14 Dec 2002 20:11:36 -0000 1.3 --- Apache.pm 14 Dec 2002 20:15:00 -0000 1.4 *************** *** 15,23 **** =head1 DESCRIPTION ! This plugins adds to L<HTTP::WebTest> support for local web file test ! mode. In this mode Apache is started on a private/dynamic port with a ! configuration file in a temporary directory and L<HTTP::WebTest> runs ! its tests against local web files using this temporary local instance ! of Apache. Data flow diagram for C<HTTP::WebTest> using a local web file: --- 15,23 ---- =head1 DESCRIPTION ! This plugin adds support for local web file test mode to ! L<HTTP::WebTest>. In this mode Apache is started on a private/dynamic ! port with a configuration file in a temporary directory and ! L<HTTP::WebTest> runs its tests against local web files using this ! temporary local instance of Apache. Data flow diagram for C<HTTP::WebTest> using a local web file: |
From: Ilya M. <m_...@us...> - 2002-12-14 20:15:05
|
Update of /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache In directory sc8-pr-cvs1:/tmp/cvs-serv27840 Modified Files: README Log Message: Minor doc corrections Index: README =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README 14 Dec 2002 20:08:53 -0000 1.1 --- README 14 Dec 2002 20:15:00 -0000 1.2 *************** *** 3,11 **** DESCRIPTION ! This plugins adds to HTTP::WebTest support for local web file test mode. ! In this mode Apache is started on a private/dynamic port with a ! configuration file in a temporary directory and HTTP::WebTest runs its ! tests against local web files using this temporary local instance of ! Apache. Data flow diagram for "HTTP::WebTest" using a local web file: --- 3,10 ---- DESCRIPTION ! This plugin adds support for local web file test mode to HTTP::WebTest. In ! this mode Apache is started on a private/dynamic port with a configuration ! file in a temporary directory and HTTP::WebTest runs its tests against ! local web files using this temporary local instance of Apache. Data flow diagram for "HTTP::WebTest" using a local web file: |
From: Ilya M. <m_...@us...> - 2002-12-14 20:11:40
|
Update of /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/lib/HTTP/WebTest/Plugin In directory sc8-pr-cvs1:/tmp/cvs-serv27161/lib/HTTP/WebTest/Plugin Modified Files: Apache.pm Log Message: Updated to conform new HTTP-WebTest API Index: Apache.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/lib/HTTP/WebTest/Plugin/Apache.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Apache.pm 12 Dec 2002 22:50:27 -0000 1.2 --- Apache.pm 14 Dec 2002 20:11:36 -0000 1.3 *************** *** 324,328 **** # get request object ! my $request = $self->webtest->last_request; $self->global_validate_params(qw(apache_dir apache_loglevel --- 324,328 ---- # get request object ! my $request = $self->webtest->current_request; $self->global_validate_params(qw(apache_dir apache_loglevel |
From: Ilya M. <m_...@us...> - 2002-12-14 20:10:41
|
Update of /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache In directory sc8-pr-cvs1:/tmp/cvs-serv26900 Modified Files: Makefile.PL Log Message: Add targets to build README automatically Index: Makefile.PL =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/Makefile.PL,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.PL 15 Nov 2002 21:46:57 -0000 1.1.1.1 --- Makefile.PL 14 Dec 2002 20:10:37 -0000 1.2 *************** *** 44,47 **** --- 44,58 ---- } + sub dist_core { + my $self = shift; + + my $make = $self->SUPER::dist_core(); + + # add our hook for dist target + $make =~ s/^dist : /dist : distprepare /m; + + return $make; + } + sub postamble { my $make = ''; *************** *** 60,63 **** --- 71,93 ---- test_config: \t\$(PERL) $test_config_pl .config + MAKE + + # add README generation target + my $make_readme_pl = File::Spec->catfile(qw(scripts make_readme.PL)); + my $apache_pm = File::Spec->catfile(qw(lib HTTP WebTest Plugin Apache.pm)); + $make .= <<MAKE; + + README: $apache_pm $make_readme_pl + \t\$(PERL) $make_readme_pl $apache_pm README + MAKE + + # add distprepare target (dist target depends on it) + $make .= <<MAKE; + + distprepare :: README + \t\@\$(NOOP) + + distprepare :: $apache_pm + \t\@\$(NOOP) MAKE |
From: Ilya M. <m_...@us...> - 2002-12-14 20:10:08
|
Update of /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache In directory sc8-pr-cvs1:/tmp/cvs-serv26776 Modified Files: .cvsignore Log Message: Updated Index: .cvsignore =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 12 Dec 2002 22:48:32 -0000 1.1 --- .cvsignore 14 Dec 2002 20:10:05 -0000 1.2 *************** *** 1,2 **** --- 1,3 ---- + .config blib pm_to_blib |
From: Ilya M. <m_...@us...> - 2002-12-14 20:08:56
|
Update of /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache In directory sc8-pr-cvs1:/tmp/cvs-serv26455 Added Files: README MANIFEST Log Message: Added --- NEW FILE: README --- NAME HTTP::WebTest::Plugin::Apache - Plugin for local web file tests DESCRIPTION This plugins adds to HTTP::WebTest support for local web file test mode. In this mode Apache is started on a private/dynamic port with a configuration file in a temporary directory and HTTP::WebTest runs its tests against local web files using this temporary local instance of Apache. Data flow diagram for "HTTP::WebTest" using a local web file: -------------- --------------------- | | | | | Input | | Web page code | | parameters | | (Perl/HTML/etc.) | | | | | -------------- --------------------- | | | ----------------------------- | | V V ------------------------ ------------- | | | |---------->| Temporary Apache | | WebTest | | directories (htdocs, | | |<----------| conf, logs) | ------------- | | | ^ ------------------------ | | | ^ V | V | ------------ ---------------------- | | request | | | HTTP |------------>| Temporary local | | user | | instance of Apache | | agent |<------------| | | | response ---------------------- ------------ RESTRICTIONS / BUGS Local file test mode unlikely to work on Win32 systems (at least it have never been tested by authors there and nobody confirmed it to work). AUTHORS Richard Anderson <ri...@ri...> wrote HTTP::WebTest 1.xx, using some ideas from the CPAN Monkeywrench module. Ilya Martynov <il...@ma...> implemented the plug-in concept, the extended API and completely rewrote HTTP::WebTest. Later this plugin module was removed from HTTP::WebTest distribution and released separately. Please don't email authors directly. Use the SourceForge "HTTP::WebTest" mail list (see SUPPORT, next section). SUPPORT Please email bug reports, suggestions, questions, etc. to the SourceForge "HTTP::WebTest" maillist. You can sign up at http://lists.sourceforge.net/lists/listinfo/http-webtest-general . The email address is "htt...@li...". COPYRIGHT Copyright (c) 2000-2001 Richard Anderson. All rights reserved. Copyright (c) 2001-2002 Ilya Martynov. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. --- NEW FILE: MANIFEST --- Changes INSTALL MANIFEST Makefile.PL README http-webtest/conf/httpd.conf-dist http-webtest/htdocs/webtest/is_apache_responding.html http-webtest/logs/.placeholder lib/HTTP/WebTest/Plugin/Apache.pm scripts/README scripts/make_readme.PL scripts/test_config.PL t/01-apache.t t/README t/test.out/apache1 t/test.out/apache2 t/test.out/apache3 t/test.out/apache4 t/test.out/apache5 t/test.out/apache6 t/test.out/apache7 t/test.out/apache8 t/test.out/apache9 t/test.shtml t/test1.txt t/test2.txt |
From: Ilya M. <m_...@us...> - 2002-12-14 20:08:55
|
Update of /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv26455/scripts Added Files: make_readme.PL Log Message: Added --- NEW FILE: make_readme.PL --- #!/usr/bin/perl -w # $Id: make_readme.PL,v 1.1 2002/12/14 20:08:52 m_ilya Exp $ use strict; use Pod::Text; use lib qw(lib); use HTTP::WebTest::SelfTest; my($webtest_pm, $readme) = @ARGV; my $parser = Pod::Text->new(width => 78); # convert POD to text $parser->parse_from_file($webtest_pm, $readme); my $data = read_file($readme); # kill SYNOPSIS $data =~ s/\nSYNOPSIS.*?DESCRIPTION/\nDESCRIPTION/s; # kill everything from EXAMPLE till RESTRICTIONS section $data =~ s/\nEXAMPLE.*?RESTRICTIONS/\n\nRESTRICTIONS/s; # kill SEE ALSO section $data =~ s/\nSEE ALSO.*//s; write_file($readme, $data); |
From: Ilya M. <m_...@us...> - 2002-12-14 20:08:55
|
Update of /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/t In directory sc8-pr-cvs1:/tmp/cvs-serv26455/t Added Files: README Log Message: Added --- NEW FILE: README --- $Id: README,v 1.1 2002/12/14 20:08:52 m_ilya Exp $ This file contains information relevant to the tests that are run after building the software with "make" and testing with "make test". Unless you maintain this module you probably don't need to read it. Please note that cookie tests require your hostname to contain at least two periods (dots). Otherwise these tests will be skipped. If test script doesn't detect your hostname correctly you can set it with environment variable TEST_HOSTNAME. 'apache_max_wait' tests can take long time. It is possible to disable them by setting environment variable TEST_FAST. If HTTP::WebTest changes its output then it breaks test suite tests because they compare HTTP::WebTest output with reference files in t/test.out directory. Obviously it can be caused by bug in HTTP::WebTest. In this case that bug should be fixed. However test suite tests could be broken if HTTP::WebTest changes its output due to changes in its plugins. The simple way to update all reference files in t/test.out is setting environment variable TEST_FIX during 'make test'. Another useful environment variable is TEST_VERBOSE. If it set then on 'make test' it will be possible to see output from test scripts which helps debugging a lot. All tests that use reference files in t/test.out will print difference between reference files and actual test reports if any. |
From: Ilya M. <m_...@us...> - 2002-12-14 20:08:08
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory sc8-pr-cvs1:/tmp/cvs-serv26249/t Modified Files: README Log Message: Minor fixes Index: README =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** README 24 Jan 2002 12:26:18 -0000 1.1.1.1 --- README 14 Dec 2002 20:07:57 -0000 1.2 *************** *** 11,16 **** with environment variable TEST_HOSTNAME. ! Response time and 'apache_max_wait' tests can take long time. It is ! possible to disable them by setting environment variable TEST_FAST. If HTTP::WebTest changes its output then it breaks test suite tests --- 11,16 ---- with environment variable TEST_HOSTNAME. ! Response time tests can take long time. It is possible to disable them ! by setting environment variable TEST_FAST. If HTTP::WebTest changes its output then it breaks test suite tests |
From: Ilya M. <m_...@us...> - 2002-12-14 20:08:08
|
Update of /cvsroot/http-webtest/HTTP-WebTest/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv26249/scripts Modified Files: make_readme.PL Log Message: Minor fixes Index: make_readme.PL =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/scripts/make_readme.PL,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** make_readme.PL 13 Dec 2002 01:35:27 -0000 1.2 --- make_readme.PL 14 Dec 2002 20:07:58 -0000 1.3 *************** *** 21,25 **** # kill SYNOPSIS $data =~ s/\nSYNOPSIS.*?DESCRIPTION/\nDESCRIPTION/s; ! # kill all from Getting Started until RESTRICTIONS section $data =~ s/\n\s*Getting started.*?RESTRICTIONS/\n\nRESTRICTIONS/s; # kill SEE ALSO section --- 21,25 ---- # kill SYNOPSIS $data =~ s/\nSYNOPSIS.*?DESCRIPTION/\nDESCRIPTION/s; ! # kill everything from Getting Started till RESTRICTIONS section $data =~ s/\n\s*Getting started.*?RESTRICTIONS/\n\nRESTRICTIONS/s; # kill SEE ALSO section |
From: Ilya M. <m_...@us...> - 2002-12-14 17:31:20
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv18637 Modified Files: Changes Log Message: Updated Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** Changes 13 Dec 2002 01:23:11 -0000 1.63 --- Changes 14 Dec 2002 17:31:11 -0000 1.64 *************** *** 3,7 **** Revision history for Perl module HTTP::WebTest. ! CURRENT VERSION ENHANCEMENTS: --- 3,7 ---- Revision history for Perl module HTTP::WebTest. ! 2.00 Sat Dec 14 2002 ENHANCEMENTS: |
From: Ilya M. <m_...@us...> - 2002-12-14 17:30:18
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv18389/lib/HTTP/WebTest Modified Files: Cookbook.pod Log Message: Minor fixes Index: Cookbook.pod =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Cookbook.pod,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Cookbook.pod 13 Dec 2002 01:23:11 -0000 1.18 --- Cookbook.pod 14 Dec 2002 17:30:07 -0000 1.19 *************** *** 149,155 **** which internally uses L<Test::Builder|Test::Builder> module to generate L<Test::Harness|Test::Harness> compatible output. It should ! be compatible with other testing libraries (like ! L<Test::More|Test::More> or L<Test::Differences|Test::Differences>) ! built using L<Test::Builder|Test::Builder> so you can freely intermix them in one test script. --- 149,155 ---- which internally uses L<Test::Builder|Test::Builder> module to generate L<Test::Harness|Test::Harness> compatible output. It should ! be compatible with other testing libraries built using ! L<Test::Builder|Test::Builder> (like L<Test::More|Test::More> or ! L<Test::Differences|Test::Differences>) so you can freely intermix them in one test script. |
From: Ilya M. <m_...@us...> - 2002-12-14 16:57:11
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv9597 Modified Files: INSTALL Log Message: Updated Index: INSTALL =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/INSTALL,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** INSTALL 13 Dec 2002 00:51:40 -0000 1.9 --- INSTALL 14 Dec 2002 16:57:08 -0000 1.10 *************** *** 6,10 **** * 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) --- 6,10 ---- * libwww 5.60 or later * libnet (is included in Perl 5.8.0 and later) ! * Test::Builder (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) |
From: Ilya M. <m_...@us...> - 2002-12-14 16:56:34
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv9363 Modified Files: Makefile.PL Log Message: Update dependencies Index: Makefile.PL =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Makefile.PL,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Makefile.PL 13 Dec 2002 00:51:40 -0000 1.13 --- Makefile.PL 14 Dec 2002 16:56:31 -0000 1.14 *************** *** 23,27 **** 'Pod::Man' => 1.14, 'Time::HiRes' => 0, ! 'Test::More' => 0, 'Test::Builder::Tester' => 0, 'URI' => 0 }, --- 23,27 ---- 'Pod::Man' => 1.14, 'Time::HiRes' => 0, ! 'Test::Builder' => 0, 'Test::Builder::Tester' => 0, 'URI' => 0 }, |