http-webtest-commits Mailing List for HTTP-WebTest (Page 13)
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-14 16:55:24
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/Bundle/HTTP In directory sc8-pr-cvs1:/tmp/cvs-serv8934 Modified Files: WebTest.pm Log Message: Updated Index: WebTest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/Bundle/HTTP/WebTest.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** WebTest.pm 13 Dec 2002 00:51:39 -0000 1.6 --- WebTest.pm 14 Dec 2002 16:55:16 -0000 1.7 *************** *** 37,43 **** Time::HiRes ! Test::Builder::Tester - only required to run C<make test> ! Test::More URI --- 37,43 ---- Time::HiRes ! Test::Builder ! Test::Builder::Tester - only required to run C<make test> URI |
From: Ilya M. <m_...@us...> - 2002-12-13 01:36:43
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv32606 Modified Files: README Log Message: Minor doc updates Index: README =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/README,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** README 19 Oct 2002 23:14:17 -0000 1.8 --- README 13 Dec 2002 01:36:40 -0000 1.9 *************** *** 46,1061 **** ------------ - Getting started - This module has complex functionality, but using it to run simple tests is - simple. Create a file of test parameters in the wtscript format and use - the wt program to process the file using the command "wt filename". The - only required parameters are "test_name" and "url". - - This document describes: - [...987 lines suppressed...] - doesn't start with "http://", "ftp://", etc) then "http://" is implied. - - user_agent - Set the product token that is used to identify the user agent on the - network. - - Default value - "HTTP-WebTest/NN" - - where "NN" is version number of HTTP-WebTest. - RESTRICTIONS / BUGS This module have been tested only on Unix (e.g., Solaris, Linux, AIX, etc.) but it should work on Win32 systems. - - The module's HTTP requests time out after 3 minutes (the default value for - LWP::UserAgent). If you want to test https:// web sites you may have to install additional --- 46,52 ---- |
From: Ilya M. <m_...@us...> - 2002-12-13 01:36:43
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP In directory sc8-pr-cvs1:/tmp/cvs-serv32606/lib/HTTP Modified Files: WebTest.pm.in WebTest.pm Log Message: Minor doc updates Index: WebTest.pm.in =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest.pm.in,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** WebTest.pm.in 19 Oct 2002 23:52:50 -0000 1.26 --- WebTest.pm.in 13 Dec 2002 01:36:39 -0000 1.27 *************** *** 496,502 **** etc.) but it should work on Win32 systems. - The module's HTTP requests time out after 3 minutes (the default value - for L<LWP::UserAgent|LWP::UserAgent>). - If you want to test https:// web sites you may have to install additional modules to enable SSL support in L<LWP>. In short you may --- 496,499 ---- Index: WebTest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest.pm,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** WebTest.pm 18 Nov 2002 07:59:30 -0000 1.31 --- WebTest.pm 13 Dec 2002 01:36:39 -0000 1.32 *************** *** 1345,1348 **** --- 1345,1356 ---- See also the C<regex_require> and C<ignore_case> parameters. + =head2 timeout + + Set the timeout value in seconds. + + =head3 Default value + + C<180> + =head2 url *************** *** 1376,1382 **** This module have been tested only on Unix (e.g., Solaris, Linux, AIX, etc.) but it should work on Win32 systems. - - The module's HTTP requests time out after 3 minutes (the default value - for L<LWP::UserAgent|LWP::UserAgent>). If you want to test https:// web sites you may have to install --- 1384,1387 ---- |
From: Ilya M. <m_...@us...> - 2002-12-13 01:35:40
|
Update of /cvsroot/http-webtest/HTTP-WebTest/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv32399/scripts Modified Files: make_readme.PL pod_merge.PL Log Message: Don't rely on removed t/utils.pl Index: make_readme.PL =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/scripts/make_readme.PL,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** make_readme.PL 24 Jan 2002 12:26:33 -0000 1.1.1.1 --- make_readme.PL 13 Dec 2002 01:35:27 -0000 1.2 *************** *** 7,11 **** use Pod::Text; ! require 't/utils.pl'; my($webtest_pm, $readme) = @ARGV; --- 7,12 ---- use Pod::Text; ! use lib qw(lib); ! use HTTP::WebTest::SelfTest; my($webtest_pm, $readme) = @ARGV; *************** *** 21,25 **** $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 $data =~ s/\nSEE ALSO.*//s; --- 22,26 ---- $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 $data =~ s/\nSEE ALSO.*//s; Index: pod_merge.PL =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/scripts/pod_merge.PL,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pod_merge.PL 19 Oct 2002 22:37:54 -0000 1.4 --- pod_merge.PL 13 Dec 2002 01:35:27 -0000 1.5 *************** *** 10,14 **** use File::Spec; ! require 't/utils.pl'; my ($sourcedir, $in_file, $out_file) = @ARGV; --- 10,15 ---- use File::Spec; ! use lib qw(lib); ! use HTTP::WebTest::SelfTest; my ($sourcedir, $in_file, $out_file) = @ARGV; |
From: Ilya M. <m_...@us...> - 2002-12-13 01:23:19
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv29342 Modified Files: Changes Log Message: HTTP::WebTest::Plugin::HarnessReport is rewritten using Test::Builder. As side effect now you can freely intermix HTTP::WebTest based tests with tests written using other testing libraries like Test::More or Test::Differences. Unfortunately this change breaks existing test scripts which were using HTTP::WebTest::Plugin::HarnessReport because now number of tests in test scripts should be declared explictly with 'use Test::More plan => NN' or 'use Test::More qw(no_plan)'. Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** Changes 12 Dec 2002 23:25:17 -0000 1.62 --- Changes 13 Dec 2002 01:23:11 -0000 1.63 *************** *** 29,32 **** --- 29,41 ---- schema is less confusing. + * HTTP::WebTest::Plugin::HarnessReport is rewritten using + Test::Builder. As side effect now you can freely intermix + HTTP::WebTest based tests with tests written using other testing + libraries like Test::More or Test::Differences. Unfortunately this + change breaks existing test scripts which were using + HTTP::WebTest::Plugin::HarnessReport because now number of tests in + test scripts should be declared explictly with 'use Test::More plan => + NN' or 'use Test::More qw(no_plan)'. + BUG FIXES: |
From: Ilya M. <m_...@us...> - 2002-12-13 01:23:19
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin In directory sc8-pr-cvs1:/tmp/cvs-serv29342/lib/HTTP/WebTest/Plugin Modified Files: HarnessReport.pm Log Message: HTTP::WebTest::Plugin::HarnessReport is rewritten using Test::Builder. As side effect now you can freely intermix HTTP::WebTest based tests with tests written using other testing libraries like Test::More or Test::Differences. Unfortunately this change breaks existing test scripts which were using HTTP::WebTest::Plugin::HarnessReport because now number of tests in test scripts should be declared explictly with 'use Test::More plan => NN' or 'use Test::More qw(no_plan)'. Index: HarnessReport.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/HarnessReport.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** HarnessReport.pm 13 Dec 2002 00:54:22 -0000 1.9 --- HarnessReport.pm 13 Dec 2002 01:23:11 -0000 1.10 *************** *** 9,35 **** =head1 SYNOPSIS ! plugins = ( ::HarnessReport ) ! default_report = no =head1 DESCRIPTION This plugin creates reports that are compatible with ! L<Test::Harness|Test::Harness>. ! By default, this plugin is not loaded by ! L<HTTP::WebTest|HTTP::WebTest>. To load it, use the global test parameter ! C<plugins>. ! Unless you want to get mix of outputs from the default report and this report, ! the default report plugin should be disabled. See parameter ! C<default_report> (value C<no>). Test parameters C<plugins> and C<default_report> are documented in L<HTTP::WebTest|HTTP::WebTest>. =cut use strict; ! use base qw(HTTP::WebTest::ReportPlugin); use HTTP::WebTest::Utils qw(make_access_method); --- 9,41 ---- =head1 SYNOPSIS ! N/A =head1 DESCRIPTION This plugin creates reports that are compatible with ! L<Test::Harness|Test::Harness>. By default, this plugin is not loaded ! by L<HTTP::WebTest|HTTP::WebTest>. To load it, use the global test ! parameter C<plugins>. Internally this plugin uses ! L<Test::Builder|Test::Builder> module so it should be compatible with ! other testing libraries (like L<Test::More|Test::More> or ! L<Test::Differences|Test::Differences>). You should be able to ! intermix them freely in one test script. ! Unless you want to get mix of outputs from the default report and this ! report (normally you don't want it), the default report plugin should ! be disabled. See parameter C<default_report> (value C<no>). Test parameters C<plugins> and C<default_report> are documented in L<HTTP::WebTest|HTTP::WebTest>. + =head1 EXAMPLE + + See L<HTTP::WebTest::Cookbook|HTTP::WebTest::Cookbook> for example. + =cut use strict; ! use base qw(HTTP::WebTest::Plugin); use HTTP::WebTest::Utils qw(make_access_method); *************** *** 44,47 **** --- 50,58 ---- my $TEST = Test::Builder->new; + # declare supported test params + sub param_types { + return q(test_name scalar); + } + sub report_test { my $self = shift; *************** *** 99,105 **** L<HTTP::WebTest::Plugin|HTTP::WebTest::Plugin> - L<HTTP::WebTest::ReportPlugin|HTTP::WebTest::ReportPlugin> - L<HTTP::WebTest::Plugins|HTTP::WebTest::Plugins> =cut --- 110,116 ---- L<HTTP::WebTest::Plugin|HTTP::WebTest::Plugin> L<HTTP::WebTest::Plugins|HTTP::WebTest::Plugins> + + L<Test::Builder|Test::Builder> =cut |
From: Ilya M. <m_...@us...> - 2002-12-13 01:23:19
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv29342/lib/HTTP/WebTest Modified Files: Cookbook.pod Log Message: HTTP::WebTest::Plugin::HarnessReport is rewritten using Test::Builder. As side effect now you can freely intermix HTTP::WebTest based tests with tests written using other testing libraries like Test::More or Test::Differences. Unfortunately this change breaks existing test scripts which were using HTTP::WebTest::Plugin::HarnessReport because now number of tests in test scripts should be declared explictly with 'use Test::More plan => NN' or 'use Test::More qw(no_plan)'. Index: Cookbook.pod =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Cookbook.pod,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Cookbook.pod 12 Dec 2002 23:22:15 -0000 1.17 --- Cookbook.pod 13 Dec 2002 01:23:11 -0000 1.18 *************** *** 135,138 **** --- 135,139 ---- generates L<Test::Harness|Test::Harness> compatible output: + use Test::More qw(no_plan); use HTTP::WebTest; *************** *** 143,146 **** --- 144,156 ---- plugins => [ '::HarnessReport' ] }); + + This script uses reporting plugin + L<HTTP::WebTest::Plugin::HarnessReport|HTTP::WebTest::Plugin::HarnessReport> + 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. =head2 User-Defined Tests |
From: Ilya M. <m_...@us...> - 2002-12-13 00:55:54
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv21040 Modified Files: TODO Log Message: Updated Index: TODO =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/TODO,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** TODO 12 Dec 2002 23:05:08 -0000 1.28 --- TODO 13 Dec 2002 00:55:51 -0000 1.29 *************** *** 5,10 **** * Consider using XPath expressions (in Click plugin and on their own) - * rewrite HarnessReport plugin using Test::Builder - * support hidden fields in Click plugin --- 5,8 ---- |
From: Ilya M. <m_...@us...> - 2002-12-13 00:54:26
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin In directory sc8-pr-cvs1:/tmp/cvs-serv20616/lib/HTTP/WebTest/Plugin Modified Files: HarnessReport.pm Log Message: Use Test::Builder Index: HarnessReport.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/HarnessReport.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** HarnessReport.pm 12 Dec 2002 23:22:13 -0000 1.8 --- HarnessReport.pm 13 Dec 2002 00:54:22 -0000 1.9 *************** *** 16,20 **** This plugin creates reports that are compatible with L<Test::Harness|Test::Harness>. ! By default, this plugin is not loaded by L<HTTP::WebTest|HTTP::WebTest>. To load it, use the global test parameter C<plugins>. --- 16,20 ---- This plugin creates reports that are compatible with L<Test::Harness|Test::Harness>. ! By default, this plugin is not loaded by L<HTTP::WebTest|HTTP::WebTest>. To load it, use the global test parameter C<plugins>. *************** *** 34,37 **** --- 34,39 ---- use HTTP::WebTest::Utils qw(make_access_method); + use Test::Builder; + =head1 TEST PARAMETERS *************** *** 40,52 **** =cut ! sub start_tests { ! my $self = shift; ! ! $self->SUPER::start_tests; ! ! my $test_num = @{$self->webtest->tests}; ! ! $self->print(1, '..', $test_num, "\n"); ! } sub report_test { --- 42,46 ---- =cut ! my $TEST = Test::Builder->new; sub report_test { *************** *** 63,69 **** } ! $self->print("\n"); ! $self->print("# URL: $url\n"); ! $self->print("# Test Name: $test_name\n") if defined $test_name; my $all_ok = 1; --- 57,63 ---- } ! $TEST->diag('-' x 60); ! $TEST->diag("URL: $url"); ! $TEST->diag("Test Name: $test_name") if defined $test_name; my $all_ok = 1; *************** *** 75,79 **** my @results = @$result[1 .. @$result - 1]; ! $self->print("# ", uc($group_comment), "\n"); for my $subresult (@$result[1 .. @$result - 1]) { --- 69,73 ---- my @results = @$result[1 .. @$result - 1]; ! $TEST->diag(uc($group_comment)); for my $subresult (@$result[1 .. @$result - 1]) { *************** *** 82,90 **** $all_ok &&= $subresult->ok; ! $self->print("# $comment: $ok\n"); } } ! $self->print(($all_ok ? 'ok' : 'not ok'), "\n"); } --- 76,85 ---- $all_ok &&= $subresult->ok; ! $TEST->diag(" $comment: $ok\n"); } } ! local $Test::Builder::Level = 3; ! $TEST->ok($all_ok); } |
From: Ilya M. <m_...@us...> - 2002-12-13 00:53:45
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory sc8-pr-cvs1:/tmp/cvs-serv20293/t Modified Files: 05-report.t Added Files: 13-harness.t Log Message: Move Harness plugin tests to 13-harness.t from 05-report.t --- NEW FILE: 13-harness.t --- #!/usr/bin/perl -w # $Id: 13-harness.t,v 1.1 2002/12/13 00:53:42 m_ilya Exp $ # This script tests core plugins of HTTP::WebTest. use strict; use HTTP::Status; use HTTP::WebTest; use HTTP::WebTest::SelfTest; # init tests my $PID = start_webserver(port => $PORT, server_sub => \&server_sub); my $WEBTEST = HTTP::WebTest->new; my $TEST = { url => abs_url($URL, '/test-file1'), text_require => [ '987654' ] }; require Test::Builder::Tester; import Test::Builder::Tester tests => 2; # 1: test HTTP::WebTest::Plugin::HarnessReport plugin (with some # tests failing) { my $tests = [ $TEST, { url => abs_url($URL, '/non-existent') }, { test_name => 'BlaBla', url => abs_url($URL, '/non-existent') }, ]; my $opts = { plugins => [ '::HarnessReport' ], default_report => 'no' }; test_diag('-' x 60, 'URL: ' . abs_url($URL, '/test-file1'), 'STATUS CODE CHECK', ' Expected \'200\' and got: 200 OK: SUCCEED', 'REQUIRED TEXT', ' 987654: SUCCEED'); test_out('ok 1'); test_diag('-' x 60, 'URL: ' . abs_url($URL, '/non-existent'), 'STATUS CODE CHECK', ' Expected \'200\' and got: 404 Not Found: FAIL'); test_out('not ok 2'); test_fail(9); test_diag('-' x 60, 'URL: ' . abs_url($URL, '/non-existent'), 'Test Name: BlaBla', 'STATUS CODE CHECK', ' Expected \'200\' and got: 404 Not Found: FAIL'); test_out('not ok 3'); test_fail(2); $WEBTEST->run_tests($tests, $opts); test_test('test HarnessReport plugin (with some tests failing)'); } # 2: test HTTP::WebTest::Plugin::HarnessReport plugin (with all tests # passing) { my $tests = [ $TEST, $TEST ]; my $opts = { plugins => [ '::HarnessReport' ], default_report => 'no' }; test_diag('-' x 60, 'URL: ' . abs_url($URL, '/test-file1'), 'STATUS CODE CHECK', ' Expected \'200\' and got: 200 OK: SUCCEED', 'REQUIRED TEXT', ' 987654: SUCCEED'); test_out('ok 1'); test_diag('-' x 60, 'URL: ' . abs_url($URL, '/test-file1'), 'STATUS CODE CHECK', ' Expected \'200\' and got: 200 OK: SUCCEED', 'REQUIRED TEXT', ' 987654: SUCCEED'); test_out('ok 2'); $WEBTEST->run_tests($tests, $opts); test_test('test HarnessReport plugin (with all tests passing)'); } # try to stop server even we have been crashed END { stop_webserver($PID) if defined $PID } # here we handle connects to our mini web server sub server_sub { my %param = @_; my $request = $param{request}; my $connect = $param{connect}; my $path = $request->url->path; if($path eq '/test-file1' ) { $connect->send_file_response('t/test1.txt'); } else { $connect->send_error(RC_NOT_FOUND); } } Index: 05-report.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/05-report.t,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** 05-report.t 12 Dec 2002 21:43:11 -0000 1.7 --- 05-report.t 13 Dec 2002 00:53:42 -0000 1.8 *************** *** 7,13 **** use strict; use CGI::Cookie; - use HTTP::Response; - use HTTP::Status; use IO::File; use Test; --- 7,12 ---- use strict; use CGI::Cookie; use IO::File; + use HTTP::Status; use Test; *************** *** 15,19 **** use HTTP::WebTest::SelfTest; ! BEGIN { plan tests => 14 } # init tests --- 14,18 ---- use HTTP::WebTest::SelfTest; ! BEGIN { plan tests => 12 } # init tests *************** *** 135,173 **** } ! # 10: test HTTP::WebTest::Plugin::HarnessReport plugin (with some ! # tests failing) ! { ! my $tests = [ $TEST, ! { url => abs_url($URL, '/non-existent') }, ! { test_name => 'BlaBla', ! url => abs_url($URL, '/non-existent') }, ! ]; ! ! my $opts = { plugins => [ '::HarnessReport' ], ! default_report => 'no' }; ! ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! opts => $opts, ! tests => $tests, ! check_file => 't/test.out/test-harness-not-ok') ! } ! ! # 11: test HTTP::WebTest::Plugin::HarnessReport plugin (with all tests ! # passing) ! { ! my $tests = [ $TEST, $TEST ]; ! ! my $opts = { plugins => [ '::HarnessReport' ], ! default_report => 'no' }; ! ! check_webtest(webtest => $WEBTEST, ! server_url => $URL, ! opts => $opts, ! tests => $tests, ! check_file => 't/test.out/test-harness-ok') ! } ! ! # 12: test show_headers parameter { # remove cookies from cookie jar - it affects output of report plugin --- 134,138 ---- } ! # 10: test show_headers parameter { # remove cookies from cookie jar - it affects output of report plugin *************** *** 193,197 **** } ! # 13-14: test show_html, show_cookie, show_headers with terse parameter { my $skip = $HOSTNAME !~ /\..*\./ ? --- 158,162 ---- } ! # 11-12: test show_html, show_cookie, show_headers with terse parameter { my $skip = $HOSTNAME !~ /\..*\./ ? |
From: Ilya M. <m_...@us...> - 2002-12-13 00:52:59
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t/test.out In directory sc8-pr-cvs1:/tmp/cvs-serv20033/t/test.out Removed Files: test-harness-ok test-harness-not-ok Log Message: Is not used anymore --- test-harness-ok DELETED --- --- test-harness-not-ok DELETED --- |
From: Ilya M. <m_...@us...> - 2002-12-13 00:51:43
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv19721 Modified Files: Makefile.PL INSTALL Log Message: Update Index: Makefile.PL =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Makefile.PL,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Makefile.PL 20 Oct 2002 00:00:38 -0000 1.12 --- Makefile.PL 13 Dec 2002 00:51:40 -0000 1.13 *************** *** 14,28 **** WriteMakefile( NAME => 'HTTP::WebTest', VERSION_FROM => 'lib/HTTP/WebTest.pm.in', ! PREREQ_PM => { 'Algorithm::Diff' => 0, ! 'CGI::Cookie' => 0, ! 'LWP' => 5.60, ! 'MIME::Base64' => 0, ! 'Net::SMTP' => 0, ! 'Text::Balanced' => 0, ! 'Pod::Usage' => 0, ! 'Pod::Man' => 1.14, ! 'Time::HiRes' => 0, ! 'Test::More' => 0, ! 'URI' => 0 }, EXE_FILES => [ File::Spec->catfile(qw(bin wt)) ], AUTHOR => $AUTHOR, --- 14,29 ---- WriteMakefile( NAME => 'HTTP::WebTest', VERSION_FROM => 'lib/HTTP/WebTest.pm.in', ! PREREQ_PM => { 'Algorithm::Diff' => 0, ! 'CGI::Cookie' => 0, ! 'LWP' => 5.60, ! 'MIME::Base64' => 0, ! 'Net::SMTP' => 0, ! 'Text::Balanced' => 0, ! 'Pod::Usage' => 0, ! 'Pod::Man' => 1.14, ! 'Time::HiRes' => 0, ! 'Test::More' => 0, ! 'Test::Builder::Tester' => 0, ! 'URI' => 0 }, EXE_FILES => [ File::Spec->catfile(qw(bin wt)) ], AUTHOR => $AUTHOR, Index: INSTALL =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/INSTALL,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** INSTALL 19 Oct 2002 23:52:51 -0000 1.8 --- INSTALL 13 Dec 2002 00:51:40 -0000 1.9 *************** *** 22,25 **** --- 22,26 ---- * Algorithm::Diff + * Test::Builder::Tester INSTALLATION |
From: Ilya M. <m_...@us...> - 2002-12-13 00:51:43
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/Bundle/HTTP In directory sc8-pr-cvs1:/tmp/cvs-serv19721/lib/Bundle/HTTP Modified Files: WebTest.pm Log Message: Update Index: WebTest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/Bundle/HTTP/WebTest.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** WebTest.pm 12 Dec 2002 23:41:41 -0000 1.5 --- WebTest.pm 13 Dec 2002 00:51:39 -0000 1.6 *************** *** 37,40 **** --- 37,44 ---- Time::HiRes + Test::Builder::Tester - only required to run C<make test> + + Test::More + URI |
From: Ilya M. <m_...@us...> - 2002-12-13 00:51:24
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv19673 Modified Files: MANIFEST Log Message: Update Index: MANIFEST =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/MANIFEST,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** MANIFEST 18 Nov 2002 08:59:37 -0000 1.28 --- MANIFEST 13 Dec 2002 00:51:21 -0000 1.29 *************** *** 47,50 **** --- 47,51 ---- t/11-delay.t t/12-request.t + t/13-harness.t t/HTTP/WebTest/Plugin/Counter.pm t/HelloWorld.pm *************** *** 119,124 **** t/test.out/subparam1 t/test.out/subparam2 - t/test.out/test-harness-not-ok - t/test.out/test-harness-ok t/test.out/test_name t/test.out/text_match1 --- 120,123 ---- *************** *** 127,131 **** t/test.out/timeout t/test.out/user_agent - t/test.shtml t/test1.html t/test1.txt --- 126,129 ---- *************** *** 137,139 **** t/test5.html t/test6.html - t/utils.pl --- 135,136 ---- |
From: Ilya M. <m_...@us...> - 2002-12-13 00:50:54
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory sc8-pr-cvs1:/tmp/cvs-serv19514/t Modified Files: 09-hooks.t 07-compat.t 06-parser.t Log Message: Remove use Module for unused modules Index: 09-hooks.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/09-hooks.t,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** 09-hooks.t 12 Dec 2002 21:43:11 -0000 1.6 --- 09-hooks.t 13 Dec 2002 00:50:45 -0000 1.7 *************** *** 7,13 **** use strict; use CGI::Cookie; - use HTTP::Response; use HTTP::Status; - use IO::File; use Test; --- 7,11 ---- Index: 07-compat.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/07-compat.t,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** 07-compat.t 12 Dec 2002 21:43:11 -0000 1.5 --- 07-compat.t 13 Dec 2002 00:50:45 -0000 1.6 *************** *** 7,11 **** use strict; use HTTP::Status; - use IO::File; use Test; --- 7,10 ---- Index: 06-parser.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/06-parser.t,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** 06-parser.t 12 Dec 2002 21:43:11 -0000 1.16 --- 06-parser.t 13 Dec 2002 00:50:45 -0000 1.17 *************** *** 6,10 **** use strict; - use IO::File; use Test; --- 6,9 ---- |
From: Ilya M. <m_...@us...> - 2002-12-12 23:41:49
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/Bundle/HTTP In directory sc8-pr-cvs1:/tmp/cvs-serv1018 Modified Files: WebTest.pm Log Message: File::Temp is not required anymore Index: WebTest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/Bundle/HTTP/WebTest.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** WebTest.pm 11 Oct 2002 21:34:14 -0000 1.4 --- WebTest.pm 12 Dec 2002 23:41:41 -0000 1.5 *************** *** 3,7 **** # $Id$ ! $VERSION = '0.02'; =head1 NAME --- 3,7 ---- # $Id$ ! $VERSION = '0.03'; =head1 NAME *************** *** 20,25 **** Crypt::SSLeay - SSL support - - File::Temp HTTP::WebTest --- 20,23 ---- |
From: Ilya M. <m_...@us...> - 2002-12-12 23:25:23
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv28762 Modified Files: Changes Log Message: Updated Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** Changes 12 Dec 2002 23:22:16 -0000 1.61 --- Changes 12 Dec 2002 23:25:17 -0000 1.62 *************** *** 27,31 **** * Renamed all last_xxx methods to current_xxx since the latest naming ! schema makes more sense for them. BUG FIXES: --- 27,31 ---- * Renamed all last_xxx methods to current_xxx since the latest naming ! schema is less confusing. BUG FIXES: |
From: Ilya M. <m_...@us...> - 2002-12-12 23:22:52
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin In directory sc8-pr-cvs1:/tmp/cvs-serv27485/lib/HTTP/WebTest/Plugin Modified Files: TextMatchTest.pm StatusTest.pm SetRequest.pm ResponseTimeTest.pm HarnessReport.pm DefaultReport.pm ContentSizeTest.pm Click.pm Log Message: Renamed all last_xxx methods to current_xxx since the latest naming schema makes more sense for them. Index: TextMatchTest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/TextMatchTest.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TextMatchTest.pm 21 Jun 2002 06:48:16 -0000 1.6 --- TextMatchTest.pm 12 Dec 2002 23:22:10 -0000 1.7 *************** *** 87,91 **** # response content ! my $content = $self->webtest->last_response->content; $self->validate_params(qw(ignore_case --- 87,91 ---- # response content ! my $content = $self->webtest->current_response->content; $self->validate_params(qw(ignore_case Index: StatusTest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/StatusTest.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** StatusTest.pm 17 Aug 2002 12:40:17 -0000 1.7 --- StatusTest.pm 12 Dec 2002 23:22:11 -0000 1.8 *************** *** 46,51 **** $self->validate_params(qw(status_code)); ! my $code = $self->webtest->last_response->code; ! my $status_line = $self->webtest->last_response->status_line; my $expected_code = $self->test_param('status_code', RC_OK); --- 46,51 ---- $self->validate_params(qw(status_code)); ! my $code = $self->webtest->current_response->code; ! my $status_line = $self->webtest->current_response->status_line; my $expected_code = $self->test_param('status_code', RC_OK); Index: SetRequest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/SetRequest.pm,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** SetRequest.pm 18 Nov 2002 08:40:27 -0000 1.18 --- SetRequest.pm 12 Dec 2002 23:22:11 -0000 1.19 *************** *** 214,218 **** # get request object ! my $request = $self->webtest->last_request; $self->validate_params(qw(url relative_urls method params --- 214,218 ---- # get request object ! my $request = $self->webtest->current_request; $self->validate_params(qw(url relative_urls method params *************** *** 240,247 **** if(defined $url) { if($relative_urls) { ! my $last_test_num = $self->webtest->last_test_num; ! my $prev_url = $last_test_num > 0 ? ! $self->webtest->tests->[$last_test_num - 1]->request->uri : 'http://localhost/'; --- 240,247 ---- if(defined $url) { if($relative_urls) { ! my $current_test_num = $self->webtest->current_test_num; ! my $prev_url = $current_test_num > 0 ? ! $self->webtest->tests->[$current_test_num - 1]->request->uri : 'http://localhost/'; Index: ResponseTimeTest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/ResponseTimeTest.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ResponseTimeTest.pm 21 Jun 2002 06:48:16 -0000 1.5 --- ResponseTimeTest.pm 12 Dec 2002 23:22:12 -0000 1.6 *************** *** 53,57 **** # response time ! my $rtime = $self->webtest->last_response_time; $self->validate_params(qw(min_rtime max_rtime)); --- 53,57 ---- # response time ! my $rtime = $self->webtest->current_response_time; $self->validate_params(qw(min_rtime max_rtime)); Index: HarnessReport.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/HarnessReport.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** HarnessReport.pm 21 Jun 2002 06:48:16 -0000 1.7 --- HarnessReport.pm 12 Dec 2002 23:22:13 -0000 1.8 *************** *** 53,57 **** my $self = shift; ! my @results = @{$self->webtest->last_test->results}; $self->validate_params(qw(test_name)); --- 53,57 ---- my $self = shift; ! my @results = @{$self->webtest->current_test->results}; $self->validate_params(qw(test_name)); *************** *** 59,64 **** my $test_name = $self->test_param('test_name'); my $url = 'N/A'; ! if($self->webtest->last_request) { ! $url = $self->webtest->last_request->uri; } --- 59,64 ---- my $test_name = $self->test_param('test_name'); my $url = 'N/A'; ! if($self->webtest->current_request) { ! $url = $self->webtest->current_request->uri; } *************** *** 69,73 **** my $all_ok = 1; ! for my $result (@{$self->webtest->last_results}) { # test results my $group_comment = $$result[0]; --- 69,73 ---- my $all_ok = 1; ! for my $result (@{$self->webtest->current_results}) { # test results my $group_comment = $$result[0]; Index: DefaultReport.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/DefaultReport.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DefaultReport.pm 31 Jul 2002 09:07:12 -0000 1.8 --- DefaultReport.pm 12 Dec 2002 23:22:14 -0000 1.9 *************** *** 156,161 **** my $url = 'N/A'; ! if($self->webtest->last_request) { ! $url = $self->webtest->last_request->uri; } --- 156,161 ---- my $url = 'N/A'; ! if($self->webtest->current_request) { ! $url = $self->webtest->current_request->uri; } *************** *** 171,175 **** my $not_ok_num = 0; ! for my $result (@{$self->webtest->last_results}) { # test results my $group_comment = $$result[0]; --- 171,175 ---- my $not_ok_num = 0; ! for my $result (@{$self->webtest->current_results}) { # test results my $group_comment = $$result[0]; *************** *** 203,208 **** my $show_xxx = $terse eq 'failed_only' ? $not_ok_num > 0 : 1; ! my $response = $self->webtest->last_response; ! my $request = $self->webtest->last_request; if($show_headers and $show_xxx) { --- 203,208 ---- my $show_xxx = $terse eq 'failed_only' ? $not_ok_num > 0 : 1; ! my $response = $self->webtest->current_response; ! my $request = $self->webtest->current_request; if($show_headers and $show_xxx) { Index: ContentSizeTest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/ContentSizeTest.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ContentSizeTest.pm 21 Jun 2002 06:48:16 -0000 1.7 --- ContentSizeTest.pm 12 Dec 2002 23:22:14 -0000 1.8 *************** *** 53,57 **** # response content length ! my $nbytes = length $self->webtest->last_response->content; $self->validate_params(qw(min_bytes max_bytes)); --- 53,57 ---- # response content length ! my $nbytes = length $self->webtest->current_response->content; $self->validate_params(qw(min_bytes max_bytes)); Index: Click.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/Click.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Click.pm 20 Aug 2002 20:58:36 -0000 1.14 --- Click.pm 12 Dec 2002 23:22:14 -0000 1.15 *************** *** 80,87 **** # get current request object ! my $request = $self->webtest->last_request; # get number of previous test if any ! my $prev_test_num = $self->webtest->last_test_num - 1; return if $prev_test_num < 0; --- 80,87 ---- # get current request object ! my $request = $self->webtest->current_request; # get number of previous test if any ! my $prev_test_num = $self->webtest->current_test_num - 1; return if $prev_test_num < 0; |
From: Ilya M. <m_...@us...> - 2002-12-12 23:22:46
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory sc8-pr-cvs1:/tmp/cvs-serv27485/t Modified Files: HelloWorld.pm 02-generic.t 01-api.t Log Message: Renamed all last_xxx methods to current_xxx since the latest naming schema makes more sense for them. Index: HelloWorld.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/HelloWorld.pm,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** HelloWorld.pm 24 Jan 2002 12:26:18 -0000 1.1.1.1 --- HelloWorld.pm 12 Dec 2002 23:22:07 -0000 1.2 *************** *** 10,14 **** my $self = shift; ! my $path = $self->webtest->last_request->uri->path; my $ok = $path eq '/hello'; --- 10,14 ---- my $self = shift; ! my $path = $self->webtest->current_request->uri->path; my $ok = $path eq '/hello'; Index: 02-generic.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/02-generic.t,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** 02-generic.t 12 Dec 2002 21:43:12 -0000 1.21 --- 02-generic.t 12 Dec 2002 23:22:08 -0000 1.22 *************** *** 606,610 **** # insert a new test after the current test ! splice @{$webtest->tests}, $webtest->last_test_num + 1, 0, $webtest->convert_tests({ url => abs_url($URL, '/status-forbidden') }); --- 606,610 ---- # insert a new test after the current test ! splice @{$webtest->tests}, $webtest->current_test_num + 1, 0, $webtest->convert_tests({ url => abs_url($URL, '/status-forbidden') }); Index: 01-api.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/t/01-api.t,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** 01-api.t 12 Dec 2002 21:43:12 -0000 1.11 --- 01-api.t 12 Dec 2002 23:22:09 -0000 1.12 *************** *** 47,52 **** my $test = { url => $url }; $WEBTEST->run_test($test); ! my $request = $WEBTEST->last_request; ! my $response = $WEBTEST->last_response; ok($request->uri eq $url); ok($response->is_success); --- 47,52 ---- my $test = { url => $url }; $WEBTEST->run_test($test); ! my $request = $WEBTEST->current_request; ! my $response = $WEBTEST->current_response; ok($request->uri eq $url); ok($response->is_success); *************** *** 128,132 **** } ! # 15: test last_test after running $WEBTEST->run_tests { my $tests = [ { url => abs_url($URL, '/test-file1') }, --- 128,132 ---- } ! # 15: test current_test after running $WEBTEST->run_tests { my $tests = [ { url => abs_url($URL, '/test-file1') }, *************** *** 136,140 **** $WEBTEST->run_tests($tests, { output_ref => \$output }); ! ok($WEBTEST->last_test->request->uri eq abs_url($URL, '/doesnt-exist')); } --- 136,140 ---- $WEBTEST->run_tests($tests, { output_ref => \$output }); ! ok($WEBTEST->current_test->request->uri eq abs_url($URL, '/doesnt-exist')); } |
From: Ilya M. <m_...@us...> - 2002-12-12 23:22:21
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv27485/lib/HTTP/WebTest Modified Files: Plugin.pm Cookbook.pod API.pm Log Message: Renamed all last_xxx methods to current_xxx since the latest naming schema makes more sense for them. Index: Plugin.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Plugin.pm 21 Jun 2002 06:48:16 -0000 1.12 --- Plugin.pm 12 Dec 2002 23:22:15 -0000 1.13 *************** *** 101,106 **** my $value; ! if(defined $self->webtest->last_test) { ! $value = $self->webtest->last_test->param($param); $value = defined $value ? $value : $global_value; } else { --- 101,106 ---- my $value; ! if(defined $self->webtest->current_test) { ! $value = $self->webtest->current_test->param($param); $value = defined $value ? $value : $global_value; } else { Index: Cookbook.pod =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Cookbook.pod,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Cookbook.pod 22 Aug 2002 08:36:50 -0000 1.16 --- Cookbook.pod 12 Dec 2002 23:22:15 -0000 1.17 *************** *** 209,213 **** # find ID in the returned page ! ($ID) = $webtest->last_response->content =~ /ID=(\d+)/; # because no checks are defined a reference on empty array --- 209,213 ---- # find ID in the returned page ! ($ID) = $webtest->current_response->content =~ /ID=(\d+)/; # because no checks are defined a reference on empty array Index: API.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/API.pm,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** API.pm 19 Oct 2002 22:37:54 -0000 1.25 --- API.pm 12 Dec 2002 23:22:16 -0000 1.26 *************** *** 92,97 **** $self->reset_plugins; ! # reset last test object ! $self->last_test(undef); # convert tests to canonic representation --- 92,97 ---- $self->reset_plugins; ! # reset current test object ! $self->current_test(undef); # convert tests to canonic representation *************** *** 128,132 **** for(my $i = 0; $i < @{$self->tests}; $i ++) { my $test = $self->tests->[$i]; ! $self->last_test_num($i); $self->run_test($test, $self->_global_test_params); } --- 128,132 ---- for(my $i = 0; $i < @{$self->tests}; $i ++) { my $test = $self->tests->[$i]; ! $self->current_test_num($i); $self->run_test($test, $self->_global_test_params); } *************** *** 441,505 **** } ! =head2 last_test_num () =head3 Returns ! The number of the current test or, if no test is running, the last test run. =cut ! *last_test_num = make_access_method('LAST_TEST_NUM'); ! =head2 last_test () =head3 Returns The L<HTTP::WebTest::Test|HTTP::WebTest::Test> object which corresponds ! to the current test or, if no test is running, the last test run. =cut ! *last_test = make_access_method('LAST_TEST'); ! =head2 last_request () =head3 Returns ! The L<HTTP::WebTest::Request|HTTP::WebTest::Request> object used in last test. =cut ! sub last_request { shift->last_test->request(@_) } ! =head2 last_response () =head3 Returns ! The L<HTTP::Response|HTTP::Response> object used in last test. =cut ! sub last_response { shift->last_test->response(@_) } ! =head2 last_response_time () =head3 Returns ! The response time for the last request. =cut ! sub last_response_time { shift->last_test->response_time(@_) } ! =head2 last_results () =head3 Returns A reference to an array that contains the results of checks made by plugins ! for the last test. =cut ! sub last_results { shift->last_test->results(@_) } =head2 run_test ($test, $optional_params) --- 441,505 ---- } ! =head2 current_test_num () =head3 Returns ! The number of the current test or, if no test is running, the current test run. =cut ! *current_test_num = make_access_method('CURRENT_TEST_NUM'); ! =head2 current_test () =head3 Returns The L<HTTP::WebTest::Test|HTTP::WebTest::Test> object which corresponds ! to the current test or, if no test is running, the current test run. =cut ! *current_test = make_access_method('CURRENT_TEST'); ! =head2 current_request () =head3 Returns ! The L<HTTP::WebTest::Request|HTTP::WebTest::Request> object used in current test. =cut ! sub current_request { shift->current_test->request(@_) } ! =head2 current_response () =head3 Returns ! The L<HTTP::Response|HTTP::Response> object used in current test. =cut ! sub current_response { shift->current_test->response(@_) } ! =head2 current_response_time () =head3 Returns ! The response time for the HTTP request used in current test. =cut ! sub current_response_time { shift->current_test->response_time(@_) } ! =head2 current_results () =head3 Returns A reference to an array that contains the results of checks made by plugins ! for the current test. =cut ! sub current_results { shift->current_test->results(@_) } =head2 run_test ($test, $optional_params) *************** *** 530,534 **** # convert test to canonic representation $test = $self->convert_tests($test); ! $self->last_test($test); $self->_global_test_params($params); --- 530,534 ---- # convert test to canonic representation $test = $self->convert_tests($test); ! $self->current_test($test); $self->_global_test_params($params); *************** *** 538,542 **** my $request = HTTP::WebTest::Request->new('GET' => 'http://MISSING_HOSTNAME/'); ! $self->last_request($request); # set request object with plugins --- 538,542 ---- my $request = HTTP::WebTest::Request->new('GET' => 'http://MISSING_HOSTNAME/'); ! $self->current_request($request); # set request object with plugins *************** *** 557,561 **** # get response my $response = $self->user_agent->request($request); ! $self->last_response($response); # measure current time --- 557,561 ---- # get response my $response = $self->user_agent->request($request); ! $self->current_response($response); # measure current time *************** *** 563,567 **** # calculate response time ! $self->last_response_time($time2 - $time1); # init results --- 563,567 ---- # calculate response time ! $self->current_response_time($time2 - $time1); # init results *************** *** 574,578 **** } } ! $self->last_results(\@results); # report test results --- 574,578 ---- } } ! $self->current_results(\@results); # report test results |
From: Ilya M. <m_...@us...> - 2002-12-12 23:22:20
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv27485 Modified Files: Changes Log Message: Renamed all last_xxx methods to current_xxx since the latest naming schema makes more sense for them. Index: Changes =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/Changes,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** Changes 12 Dec 2002 21:43:13 -0000 1.60 --- Changes 12 Dec 2002 23:22:16 -0000 1.61 *************** *** 26,29 **** --- 26,32 ---- will no longer be loaded by default even if it is available. + * Renamed all last_xxx methods to current_xxx since the latest naming + schema makes more sense for them. + BUG FIXES: |
From: Ilya M. <m_...@us...> - 2002-12-12 23:05:44
|
Update of /cvsroot/http-webtest/HTTP-WebTest/t In directory sc8-pr-cvs1:/tmp/cvs-serv22982/t Removed Files: test.shtml Log Message: Removed (is was used only for Apache plugin tests) --- test.shtml DELETED --- |
From: Ilya M. <m_...@us...> - 2002-12-12 23:05:19
|
Update of /cvsroot/http-webtest/HTTP-WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv22832 Modified Files: TODO .cvsignore Log Message: Updated Index: TODO =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/TODO,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** TODO 22 Aug 2002 08:36:13 -0000 1.27 --- TODO 12 Dec 2002 23:05:08 -0000 1.28 *************** *** 9,15 **** * support hidden fields in Click plugin - * polish local mode tests - they are *very* non portable now (or just - move Apache plugin in separate distro for the starters) - * automated tests for mail sending (even better unit tests for all code) --- 9,12 ---- Index: .cvsignore =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/.cvsignore,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** .cvsignore 19 Oct 2002 22:37:55 -0000 1.4 --- .cvsignore 12 Dec 2002 23:05:09 -0000 1.5 *************** *** 1,3 **** - wt blib pm_to_blib --- 1,2 ---- |
From: Ilya M. <m_...@us...> - 2002-12-12 22:51:00
|
Update of /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/t In directory sc8-pr-cvs1:/tmp/cvs-serv15414/t Modified Files: 01-apache.t Log Message: Various fixes to make test suite work again Index: 01-apache.t =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/t/01-apache.t,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** 01-apache.t 15 Nov 2002 21:47:01 -0000 1.1.1.1 --- 01-apache.t 12 Dec 2002 22:50:57 -0000 1.2 *************** *** 15,24 **** use HTTP::WebTest; use HTTP::WebTest::Utils qw(copy_dir); ! require 't/config.pl'; ! require 't/utils.pl'; ! use vars qw($HOSTNAME $APACHE_EXEC $PORT $URL $TEST_NUM); BEGIN { $TEST_NUM = 19; plan tests => $TEST_NUM } --- 15,25 ---- use HTTP::WebTest; + use HTTP::WebTest::SelfTest; use HTTP::WebTest::Utils qw(copy_dir); ! use vars qw($HOSTNAME $PORT $URL $TEST_NUM %CONFIG); ! require '.config'; ! my $APACHE_EXEC = $CONFIG{APACHE_EXEC}; BEGIN { $TEST_NUM = 19; plan tests => $TEST_NUM } *************** *** 29,33 **** my $TEST = { file_path => [ 't/test1.txt', '.' ], text_require => [ 'abcde', '123' ] }; ! my %OPTS = (apache_exec => $APACHE_EXEC, apache_dir => $APACHE_DIR); my $ERROR_LOG = 't/error_log'; my $PID = start_webserver(port => $PORT, server_sub => \&server_sub); --- 30,35 ---- my $TEST = { file_path => [ 't/test1.txt', '.' ], text_require => [ 'abcde', '123' ] }; ! my %OPTS = (plugins => [ '::Apache' ], ! apache_exec => $APACHE_EXEC, apache_dir => $APACHE_DIR); my $ERROR_LOG = 't/error_log'; my $PID = start_webserver(port => $PORT, server_sub => \&server_sub); *************** *** 47,51 **** check_webtest(webtest => $WEBTEST, ! opts => { error_log => $ERROR_LOG }, server_url => $URL, tests => $tests, --- 49,54 ---- check_webtest(webtest => $WEBTEST, ! opts => { plugins => [ '::Apache' ], ! error_log => $ERROR_LOG }, server_url => $URL, tests => $tests, *************** *** 62,66 **** check_webtest(webtest => $WEBTEST, ! opts => { error_log => $ERROR_LOG }, server_url => $URL, tests => $tests, --- 65,70 ---- check_webtest(webtest => $WEBTEST, ! opts => { plugins => [ '::Apache' ], ! error_log => $ERROR_LOG }, server_url => $URL, tests => $tests, *************** *** 172,176 **** my $start = time; eval { ! $WEBTEST->run_test($TEST, $opts); }; if($@) { --- 176,180 ---- my $start = time; eval { ! $WEBTEST->run_tests([ $TEST ], $opts); }; if($@) { *************** *** 193,207 **** my $test = { file_path => [ 't/test.shtml', '.' ], ! include_file_path => [ 't/test1.txt', '/inc', ! 't/test2.txt', '/inc' ], ! text_require => [ 'abcde', '123', ! 'begin', '644' ], ! text_forbid => [ '#include', 'virtual', 'error' ] }; check_webtest(webtest => $WEBTEST, ! opts => \%OPTS, ! tests => [ $test ], ! server_hostname => 'localhost', ! check_file => 't/test.out/apache2'); } --- 197,211 ---- my $test = { file_path => [ 't/test.shtml', '.' ], ! include_file_path => [ 't/test1.txt', '/inc', ! 't/test2.txt', '/inc' ], ! text_require => [ 'abcde', '123', ! 'begin', '644' ], ! text_forbid => [ '#include', 'virtual', 'error' ] }; check_webtest(webtest => $WEBTEST, ! opts => \%OPTS, ! tests => [ $test ], ! server_hostname => 'localhost', ! check_file => 't/test.out/apache2'); } |
From: Ilya M. <m_...@us...> - 2002-12-12 22:50:31
|
Update of /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/lib/HTTP/WebTest/Plugin In directory sc8-pr-cvs1:/tmp/cvs-serv15227/lib/HTTP/WebTest/Plugin Modified Files: Apache.pm Log Message: Cosmetic fixes Index: Apache.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest-Plugin-Apache/lib/HTTP/WebTest/Plugin/Apache.pm,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Apache.pm 15 Nov 2002 21:47:11 -0000 1.1.1.1 --- Apache.pm 12 Dec 2002 22:50:27 -0000 1.2 *************** *** 561,567 **** if($apache_pid == 0) { # child process ! exec $self->apache_exec . ! ' -f ' . $self->temp_dir . '/conf/httpd.conf' . ! ' ' . $self->apache_options . ' -X'; die "HTTP::WebTest: Perl exec statement failed to start Apache: $!"; } --- 561,568 ---- if($apache_pid == 0) { # child process ! my $cmd = ($self->apache_exec . ! ' -f ' . $self->temp_dir . '/conf/httpd.conf' . ! ' ' . $self->apache_options . ' -X'); ! exec $cmd; die "HTTP::WebTest: Perl exec statement failed to start Apache: $!"; } *************** *** 651,655 **** =head1 RESTRICTIONS / BUGS ! Local file tests probably don't work on Win32 systems. =head1 AUTHORS --- 652,658 ---- =head1 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). =head1 AUTHORS |