Re: Test::Pod 0.95 is out
On Tue, Mar 04, 2003 at 09:19:57AM -0600, Andy Lester wrote: Not sure how I feel about this. If you were still using Pod::Checker, I'd definately say it won't fly since it throws so many silly warnings. You mentioned a few, the Empty Paragraph and that you can't use =item foo more than once. Pod::Simple is hopefully more realistic. Right, it's the silly warnings that I'm most concerned about getting rid of. Pod::Simple is indeed more realistic. Indeed, it is! MakeMaker's using it now.
Re: WWW::Mechanize 0.37 released
Le mercredi 05 mars 2003 à 19:38, Robert Spier écrivait: There really aren't many tests that are meaningful without that access. 00.load.t, 99.pod and add_header.t are all that seem to be valid without it. You could allow the user to choose between internal and external tests, where the internal tests are much simpler, maybe including a trivial self-contained webserver to make sure everything works. The server could be a HTTP::Daemon. That's how I test the basic workings of HTTP::Proxy. Some tests use google.com and other webservers. They can be skipped if the test script detects that for some reason the web does not work. (Oops, I seem to remember this is in version 0.08, which is not out yet. You can fetch a repository snapshot from http://http-proxy.mongueurs.net/ Have a look at t/22http.t and t/Utils.pm) -- Philippe BooK Bruhat Friends are people who are there when you need them. (also applies to dogs) (Moral from Groo The Wanderer #43 (Epic))
Re: WWW::Mechanize 0.37 released
You could allow the user to choose between internal and external tests, where the internal tests are much simpler, maybe including a trivial self-contained webserver to make sure everything works. Help me out here. I'm trying to imagine why someone would want WWW::Mechanize without a net connection. Or are you saying that people will want to use it strictly behind a restrictive firewall where google.com isn't accessible? xoa -- Andy Lester, lead singer driver of the Winnebago [EMAIL PROTECTED], AIM:petdance http://petdance.com/ http://use.perl.org/~petdance/
Re: WWW::Mechanize 0.37 released
Help me out here. I'm trying to imagine why someone would want WWW::Mechanize without a net connection. Or are you saying that people will want to use it strictly behind a restrictive firewall where google.com isn't accessible? Yes. -R
Re: WWW::Mechanize 0.37 released
Andy Lester sent the following bits through the ether: Or are you saying that people will want to use it strictly behind a restrictive firewall where google.com isn't accessible? For example, we use it at work for testing our web applications. The slightly overly-secure server we use for developing can not see the Internet, but it can test on localhost or other internal servers. (There's a local CPAN mirror and other such things to make it bearable). Leon ps thanks for the module! ;-) -- Leon Brocard.http://www.astray.com/ scribot.http://www.scribot.com/ ... Clap on! (clap, clap) Clap off! ([EMAIL PROTECTED]$NO CARRIER
Re: WWW::Mechanize 0.37 released
For example, we use it at work for testing our web applications. The slightly overly-secure server we use for developing can not see the Internet, but it can test on localhost or other internal servers. (There's a local CPAN mirror and other such things to make it bearable). I've created RT ticket #2185. If anyone would like to implement this and submit the patch to me, I'd appreciate it. I'm fresh out of tuits for implementing daemons on the fly. xoa -- Andy Lester, lead singer driver of the Winnebago [EMAIL PROTECTED], AIM:petdance http://petdance.com/ http://use.perl.org/~petdance/
Re: STDERR tests in Test::Warn?
Adrian Howard wrote at Fri, 28 Feb 2003 11:40:52 +: I'd argue that Test::Warn isn't the right place :-) To me sending output to STDERR and warnings are different things. Absolutely. If added to Test::Warn I'd argue for separate functions. I've had situations where warnings were logged, and STDERR was meant for user readable output. Having them merged would break some tests of mine (not many - I won't be *that* upset if everybody disagrees with me ;-). I always meant to revisit the idea for Test::Output which was intended to be a generic FILEHANDLE output testing module. Allows you to do things like: output_is { hello() } hello world\n, STDOUT, hello world; output_isnt { hello() } goodbye, STDOUT, not goodbye; output_unlike { hello() } qr/bye/, STDOUT, didn't print bye; output_like { hello() } qr/hello/, STDOUT, printed hello; like(Test::Output-last, qr/world/, ... and world); Which (I think) would do all that you need. (Draft implementation of above at http://www.quietstars.com/perl/) However, I'm not really happy with the above API and haven't had the time to think about it in any more detail. Suggestions welcome :-) Sorry for my late anser, but I also find the concept of a Test::Handle module for a great idea. I'm looking forward to the CPAN release. Greetings, Janek
Re: WWW::Mechanize 0.37 released
Le jeudi 06 mars 2003 à 10:43, Andy Lester écrivait: For example, we use it at work for testing our web applications. The slightly overly-secure server we use for developing can not see the Internet, but it can test on localhost or other internal servers. (There's a local CPAN mirror and other such things to make it bearable). I've created RT ticket #2185. If anyone would like to implement this and submit the patch to me, I'd appreciate it. I'm fresh out of tuits for implementing daemons on the fly. Here are (very) simple SKIP blocks with a basic web_ok() function. One could go one step further and put sample pages in t/, as well as a basic HTTP::Daemon script that would return them when asked for, and 404 when they are not found. I'll try to post a set of dummy_*.t files (reproducing the tests in your own test suite) doing just that in a few days (no promise, though). Then testing the module would not depend on the web at all. -- Philippe Only in WWW-Mechanize/t: Utils.pm package main; # check that the web connection is working sub web_ok { my $ua = LWP::UserAgent-new( env_proxy = 1 ); my $res = $ua-request( HTTP::Request-new( GET = 'http://www.google.com/intl/en/' ) ); return $res-is_success; } 1; diff -ru WWW-Mechanize-0.37/t/click.t WWW-Mechanize/t/click.t --- WWW-Mechanize-0.37/t/click.t2003-03-04 22:06:03.0 +0100 +++ WWW-Mechanize/t/click.t 2003-03-06 18:21:12.0 +0100 @@ -1,6 +1,7 @@ use warnings; use strict; use Test::More tests = 8; +use t::Utils; BEGIN { use_ok( 'WWW::Mechanize' ); @@ -9,6 +10,9 @@ my $t = WWW::Mechanize-new(); isa_ok( $t, 'WWW::Mechanize', 'Created the object' ); +SKIP: { +skip Web does not seem to work, 6 unless web_ok(); + my $response = $t-get( http://www.google.com/intl/en/;); isa_ok( $response, 'HTTP::Response', 'Got back a response' ); ok( $response-is_success, 'Got google' ) or die Can't even fetch google; @@ -21,3 +25,5 @@ ok( $response-is_success, Can click 'btnG' ('Google Search' button)); like($t-content, qr/foo\s?fighters/i, Found 'Foo Fighters'); + +} diff -ru WWW-Mechanize-0.37/t/follow.t WWW-Mechanize/t/follow.t --- WWW-Mechanize-0.37/t/follow.t 2003-02-04 17:29:18.0 +0100 +++ WWW-Mechanize/t/follow.t2003-03-06 18:20:24.0 +0100 @@ -2,6 +2,7 @@ use strict; use Test::More tests = 14; use constant START = 'http://www.google.com/intl/en/'; +use t::Utils; BEGIN { use_ok( 'WWW::Mechanize' ); @@ -11,6 +12,9 @@ isa_ok( $agent, 'WWW::Mechanize', 'Created object' ); $agent-quiet(1); +SKIP: { +skip Web does not seem to work, 12 unless web_ok(); + my $response = $agent-get( START ); ok( $response-is_success, 'Got some page' ); is( $agent-uri, START, 'Got Google' ); @@ -30,3 +34,5 @@ ok($agent-back(), Can still go back); is( $agent-uri, START, 'Back at the start page again' ); + +} diff -ru WWW-Mechanize-0.37/t/form.t WWW-Mechanize/t/form.t --- WWW-Mechanize-0.37/t/form.t 2003-02-04 17:44:46.0 +0100 +++ WWW-Mechanize/t/form.t 2003-03-06 18:21:50.0 +0100 @@ -3,6 +3,7 @@ use warnings; use strict; use Test::More tests = 14; +use t::Utils; use constant START = 'http://www.google.com/intl/en/'; @@ -13,6 +14,10 @@ my $t = WWW::Mechanize-new(); isa_ok( $t, 'WWW::Mechanize' ); $t-quiet(1); + +SKIP: { +skip Web does not seem to work, 12 unless web_ok(); + my $response = $t-get(START); ok( $response-is_success, Got a page ) or die Can't even get google; is( $t-uri, START, 'Got Google' ); @@ -37,3 +42,5 @@ my $form_f = $t-form('f'); ok( $form_f ); is( $form_f, $form_name_f ); + +} diff -ru WWW-Mechanize-0.37/t/get.t WWW-Mechanize/t/get.t --- WWW-Mechanize-0.37/t/get.t 2003-03-04 22:01:14.0 +0100 +++ WWW-Mechanize/t/get.t 2003-03-06 18:20:40.0 +0100 @@ -1,6 +1,7 @@ use warnings; use strict; use Test::More tests = 27; +use t::Utils; BEGIN { use_ok( 'WWW::Mechanize' ); @@ -9,6 +10,9 @@ my $agent = WWW::Mechanize-new; isa_ok( $agent, 'WWW::Mechanize', 'Created object' ); +SKIP: { +skip Web does not seem to work, 25 unless web_ok(); + ok($agent-get(http://www.google.com/intl/en/;)-is_success, Get google webpage); isa_ok($agent-uri, URI, Set uri); isa_ok($agent-req, 'HTTP::Request', req should be a HTTP::Request); @@ -39,3 +43,5 @@ ok( $agent-get( http://www.google.com/images/logo.gif; )-is_success, Got the logo ); ok( !$agent-is_html ); + +} diff -ru WWW-Mechanize-0.37/t/page_stack.t WWW-Mechanize/t/page_stack.t --- WWW-Mechanize-0.37/t/page_stack.t 2002-10-24 05:52:55.0 +0200 +++ WWW-Mechanize/t/page_stack.t2003-03-06 18:22:04.0 +0100 @@ -1,6 +1,7 @@ use warnings; use strict; use Test::More tests = 9; +use t::Utils; BEGIN { use_ok( 'WWW::Mechanize' ); @@ -9,6 +10,9 @@ my $t = WWW::Mechanize-new; isa_ok( $t, 'WWW::Mechanize', 'Created object' ); +SKIP: { +skip Web does not seem to work, 7 unless
Re: Test::Pod 0.95 is out
On Tue, Mar 04, 2003 at 09:19:57AM -0600, Andy Lester wrote: Not sure how I feel about this. If you were still using Pod::Checker, I'd definately say it won't fly since it throws so many silly warnings. You mentioned a few, the Empty Paragraph and that you can't use =item foo more than once. Pod::Simple is hopefully more realistic. Right, it's the silly warnings that I'm most concerned about getting rid of. Pod::Simple is indeed more realistic. Indeed, it is! MakeMaker's using it now.
Re: WWW::Mechanize 0.37 released
Le mercredi 05 mars 2003 à 19:38, Robert Spier écrivait: There really aren't many tests that are meaningful without that access. 00.load.t, 99.pod and add_header.t are all that seem to be valid without it. You could allow the user to choose between internal and external tests, where the internal tests are much simpler, maybe including a trivial self-contained webserver to make sure everything works. The server could be a HTTP::Daemon. That's how I test the basic workings of HTTP::Proxy. Some tests use google.com and other webservers. They can be skipped if the test script detects that for some reason the web does not work. (Oops, I seem to remember this is in version 0.08, which is not out yet. You can fetch a repository snapshot from http://http-proxy.mongueurs.net/ Have a look at t/22http.t and t/Utils.pm) -- Philippe BooK Bruhat Friends are people who are there when you need them. (also applies to dogs) (Moral from Groo The Wanderer #43 (Epic))
Re: WWW::Mechanize 0.37 released
You could allow the user to choose between internal and external tests, where the internal tests are much simpler, maybe including a trivial self-contained webserver to make sure everything works. Help me out here. I'm trying to imagine why someone would want WWW::Mechanize without a net connection. Or are you saying that people will want to use it strictly behind a restrictive firewall where google.com isn't accessible? xoa -- Andy Lester, lead singer driver of the Winnebago [EMAIL PROTECTED], AIM:petdance http://petdance.com/ http://use.perl.org/~petdance/
Re: WWW::Mechanize 0.37 released
For example, we use it at work for testing our web applications. The slightly overly-secure server we use for developing can not see the Internet, but it can test on localhost or other internal servers. (There's a local CPAN mirror and other such things to make it bearable). I've created RT ticket #2185. If anyone would like to implement this and submit the patch to me, I'd appreciate it. I'm fresh out of tuits for implementing daemons on the fly. xoa -- Andy Lester, lead singer driver of the Winnebago [EMAIL PROTECTED], AIM:petdance http://petdance.com/ http://use.perl.org/~petdance/
Re: WWW::Mechanize 0.37 released
-BEGIN PGP SIGNED MESSAGE- Moin, On 06-Mar-03 Andy Lester carved into stone: You could allow the user to choose between internal and external tests, where the internal tests are much simpler, maybe including a trivial self-contained webserver to make sure everything works. Help me out here. I'm trying to imagine why someone would want WWW::Mechanize without a net connection. Or are you saying that people will want to use it strictly behind a restrictive firewall where google.com isn't accessible? Yes. Cheers, Tels - -- Signed on Thu Mar 6 18:10:05 2003 with http://bloodgate.com/tels.asc perl -MDev::Bollocks -le'print Dev::Bollocks-rand()' paradigmatically enable third-generation ROI http://www.notcpa.org/ You have the freedom to run any code. Yet. http://bloodgate.com/perl My current Perl projects -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl. iQEVAwUBPmeA7XcLPEOTuEwVAQHP4gf9H8r1LrgODLOMyUOWJbDrh9sfeL8bWJA8 2CLfcxAQuYD//4NLW1h+HUKfJYR88uhZgcPZc9QnkEYurqKy1EUc9aOBMOHD6Vnx +ddoOO+tzyJz3neG5PY0ooOYmeGi8C4wmjJOoGpIXxs+Oep1uAT3JNs4SoYXG9Xu bWS/dKpFNWL1eY4oVrBZangHKwb0RX+Y6dkIoU5GkX62FKVTrFfPy8V3T8D3TIeM KZdhe2C9rvwmsCMv+e5m56eE2QG92KFrfeylZdDZEC1VLiP0l80oi0Q/a9rhjCQ7 awN2N3HZWpOi6w9q0jrBb5cGT+yG5To98W4wQPwxi7a+uRd4nORzDQ== =IwUP -END PGP SIGNATURE-
Re: STDERR tests in Test::Warn?
Adrian Howard wrote at Fri, 28 Feb 2003 11:40:52 +: I'd argue that Test::Warn isn't the right place :-) To me sending output to STDERR and warnings are different things. Absolutely. If added to Test::Warn I'd argue for separate functions. I've had situations where warnings were logged, and STDERR was meant for user readable output. Having them merged would break some tests of mine (not many - I won't be *that* upset if everybody disagrees with me ;-). I always meant to revisit the idea for Test::Output which was intended to be a generic FILEHANDLE output testing module. Allows you to do things like: output_is { hello() } hello world\n, STDOUT, hello world; output_isnt { hello() } goodbye, STDOUT, not goodbye; output_unlike { hello() } qr/bye/, STDOUT, didn't print bye; output_like { hello() } qr/hello/, STDOUT, printed hello; like(Test::Output-last, qr/world/, ... and world); Which (I think) would do all that you need. (Draft implementation of above at http://www.quietstars.com/perl/) However, I'm not really happy with the above API and haven't had the time to think about it in any more detail. Suggestions welcome :-) Sorry for my late anser, but I also find the concept of a Test::Handle module for a great idea. I'm looking forward to the CPAN release. Greetings, Janek
Re: WWW::Mechanize 0.37 released
Le jeudi 06 mars 2003 à 10:43, Andy Lester écrivait: For example, we use it at work for testing our web applications. The slightly overly-secure server we use for developing can not see the Internet, but it can test on localhost or other internal servers. (There's a local CPAN mirror and other such things to make it bearable). I've created RT ticket #2185. If anyone would like to implement this and submit the patch to me, I'd appreciate it. I'm fresh out of tuits for implementing daemons on the fly. Here are (very) simple SKIP blocks with a basic web_ok() function. One could go one step further and put sample pages in t/, as well as a basic HTTP::Daemon script that would return them when asked for, and 404 when they are not found. I'll try to post a set of dummy_*.t files (reproducing the tests in your own test suite) doing just that in a few days (no promise, though). Then testing the module would not depend on the web at all. -- Philippe Only in WWW-Mechanize/t: Utils.pm package main; # check that the web connection is working sub web_ok { my $ua = LWP::UserAgent-new( env_proxy = 1 ); my $res = $ua-request( HTTP::Request-new( GET = 'http://www.google.com/intl/en/' ) ); return $res-is_success; } 1; diff -ru WWW-Mechanize-0.37/t/click.t WWW-Mechanize/t/click.t --- WWW-Mechanize-0.37/t/click.t2003-03-04 22:06:03.0 +0100 +++ WWW-Mechanize/t/click.t 2003-03-06 18:21:12.0 +0100 @@ -1,6 +1,7 @@ use warnings; use strict; use Test::More tests = 8; +use t::Utils; BEGIN { use_ok( 'WWW::Mechanize' ); @@ -9,6 +10,9 @@ my $t = WWW::Mechanize-new(); isa_ok( $t, 'WWW::Mechanize', 'Created the object' ); +SKIP: { +skip Web does not seem to work, 6 unless web_ok(); + my $response = $t-get( http://www.google.com/intl/en/;); isa_ok( $response, 'HTTP::Response', 'Got back a response' ); ok( $response-is_success, 'Got google' ) or die Can't even fetch google; @@ -21,3 +25,5 @@ ok( $response-is_success, Can click 'btnG' ('Google Search' button)); like($t-content, qr/foo\s?fighters/i, Found 'Foo Fighters'); + +} diff -ru WWW-Mechanize-0.37/t/follow.t WWW-Mechanize/t/follow.t --- WWW-Mechanize-0.37/t/follow.t 2003-02-04 17:29:18.0 +0100 +++ WWW-Mechanize/t/follow.t2003-03-06 18:20:24.0 +0100 @@ -2,6 +2,7 @@ use strict; use Test::More tests = 14; use constant START = 'http://www.google.com/intl/en/'; +use t::Utils; BEGIN { use_ok( 'WWW::Mechanize' ); @@ -11,6 +12,9 @@ isa_ok( $agent, 'WWW::Mechanize', 'Created object' ); $agent-quiet(1); +SKIP: { +skip Web does not seem to work, 12 unless web_ok(); + my $response = $agent-get( START ); ok( $response-is_success, 'Got some page' ); is( $agent-uri, START, 'Got Google' ); @@ -30,3 +34,5 @@ ok($agent-back(), Can still go back); is( $agent-uri, START, 'Back at the start page again' ); + +} diff -ru WWW-Mechanize-0.37/t/form.t WWW-Mechanize/t/form.t --- WWW-Mechanize-0.37/t/form.t 2003-02-04 17:44:46.0 +0100 +++ WWW-Mechanize/t/form.t 2003-03-06 18:21:50.0 +0100 @@ -3,6 +3,7 @@ use warnings; use strict; use Test::More tests = 14; +use t::Utils; use constant START = 'http://www.google.com/intl/en/'; @@ -13,6 +14,10 @@ my $t = WWW::Mechanize-new(); isa_ok( $t, 'WWW::Mechanize' ); $t-quiet(1); + +SKIP: { +skip Web does not seem to work, 12 unless web_ok(); + my $response = $t-get(START); ok( $response-is_success, Got a page ) or die Can't even get google; is( $t-uri, START, 'Got Google' ); @@ -37,3 +42,5 @@ my $form_f = $t-form('f'); ok( $form_f ); is( $form_f, $form_name_f ); + +} diff -ru WWW-Mechanize-0.37/t/get.t WWW-Mechanize/t/get.t --- WWW-Mechanize-0.37/t/get.t 2003-03-04 22:01:14.0 +0100 +++ WWW-Mechanize/t/get.t 2003-03-06 18:20:40.0 +0100 @@ -1,6 +1,7 @@ use warnings; use strict; use Test::More tests = 27; +use t::Utils; BEGIN { use_ok( 'WWW::Mechanize' ); @@ -9,6 +10,9 @@ my $agent = WWW::Mechanize-new; isa_ok( $agent, 'WWW::Mechanize', 'Created object' ); +SKIP: { +skip Web does not seem to work, 25 unless web_ok(); + ok($agent-get(http://www.google.com/intl/en/;)-is_success, Get google webpage); isa_ok($agent-uri, URI, Set uri); isa_ok($agent-req, 'HTTP::Request', req should be a HTTP::Request); @@ -39,3 +43,5 @@ ok( $agent-get( http://www.google.com/images/logo.gif; )-is_success, Got the logo ); ok( !$agent-is_html ); + +} diff -ru WWW-Mechanize-0.37/t/page_stack.t WWW-Mechanize/t/page_stack.t --- WWW-Mechanize-0.37/t/page_stack.t 2002-10-24 05:52:55.0 +0200 +++ WWW-Mechanize/t/page_stack.t2003-03-06 18:22:04.0 +0100 @@ -1,6 +1,7 @@ use warnings; use strict; use Test::More tests = 9; +use t::Utils; BEGIN { use_ok( 'WWW::Mechanize' ); @@ -9,6 +10,9 @@ my $t = WWW::Mechanize-new; isa_ok( $t, 'WWW::Mechanize', 'Created object' ); +SKIP: { +skip Web does not seem to work, 7 unless