Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 19353
Status: resolved
Priority: 0/
Queue: WWW-Mechanize

People
Owner: Nobody in particular
Requestors: pjs [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.18
Fixed in: (no value)



Subject: Google broke some live tests
Google changed a link: t/live/follow_link......NOK 6 # Failed test 'Got the correct page' # in t/live/follow_link.t at line 21. # got: 'http://www.google.com/intl/en/ads/' # expected: 'http://www.google.com/ads/' # Failed test 'Got relative OK' # in t/live/get.t at line 29. # got: 'http://www.google.com/intl/en/ads/' # expected: 'http://www.google.com/support/' t/live/get..............NOK 15 # Failed test 'Got relative OK' # in t/live/get.t at line 24. # got: 'http://www.google.com/intl/en/ads/' # expected: 'http://www.google.com/ads/'
From: Alexandr Ciornii <alexchorny [...] gmail.com>
Show quoted text
> Google changed a link:
patched tests to reflect changes Win32 version of this module for Perl 5.8 is available at http://chorny.net/perlmod/ ------- Alexandr Ciornii, http://chorny.net
#!perl -T use warnings; use strict; use Test::More tests => 7; use constant START => 'http://www.google.com/intl/en/'; BEGIN { use_ok( 'WWW::Mechanize' ); } my $agent = WWW::Mechanize->new; isa_ok( $agent, 'WWW::Mechanize' ); my $response = $agent->get( START ); ok( $response->is_success, 'Got some page' ) or die "Can't even get Google"; is( $agent->uri, START, 'Got Google' ); $response = $agent->follow_link( text_regex => qr/Advertising.Programs/i ); ok( $response->is_success, 'Got the page' ); is( $agent->uri, 'http://www.google.com/intl/en/ads/', "Got the correct page" ); SKIP: { eval "use Test::Memory::Cycle"; skip "Test::Memory::Cycle not installed", 1 if $@; memory_cycle_ok( $agent, "No memory cycles found" ); }
#!perl -T use warnings; use strict; use Test::More tests => 26; use Test::LongString; BEGIN { use_ok( 'WWW::Mechanize' ); } my $agent = WWW::Mechanize->new; isa_ok( $agent, 'WWW::Mechanize' ); ok($agent->get("http://www.google.com/intl/en/")->is_success, "Get google webpage"); is( ref $agent->uri, "", "URI should be a string, not an object" ); ok( $agent->is_html, "Seems to be HTML" ); is( $agent->title, "Google", "Title matches" ); my $services = $agent->find_link( url_regex => qr[/ads/] ); isa_ok( $services, 'WWW::Mechanize::Link' ); ok( $agent->get( $services )->is_success, 'Got the ads page' ); is( $agent->uri, 'http://www.google.com/intl/en/ads/', "Got relative OK" ); ok( $agent->is_html ); is( $agent->title, "Google Advertising", "Got the right page" ); ok( $agent->get( '../../../support/' )->is_success, 'Got the support page' ); is( $agent->uri, 'http://www.google.com/support/', "Got relative OK" ); ok( $agent->is_html ); is( $agent->title, "Google: Help Center", "Title matches" ); ok( $agent->get( '../help/basics.html' )->is_success, 'Got the basics page' ); is( $agent->uri, 'http://www.google.com/help/basics.html', "Got relative OK" ); ok( $agent->is_html, "Basics page is HTML" ); is( $agent->title, "Google Help : Basics of Search", "Title matches" ); like_string( $agent->content, qr/Essentials of Google Search/, "Got the right page" ); ok( $agent->get( './refinesearch.html' )->is_success, 'Got the "refine search" page' ); is( $agent->uri, 'http://www.google.com/help/refinesearch.html', "Got relative OK" ); ok( $agent->is_html, "Refine Search page is HTML" ); is( $agent->title, "Google Help : Advanced Search" ); like_string( $agent->content, qr/Advanced Search Made Easy/, "Got the right page" ); SKIP: { eval "use Test::Memory::Cycle"; skip "Test::Memory::Cycle not installed", 1 if $@; memory_cycle_ok( $agent, "No memory cycles found" ); }
From: DOLMEN [...] cpan.org
I have the same bug. See the attached test results. I'm in France. I suppose that Google does not serve the same content whether you are in the United States or outside. Olivier.
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/00-load.t t/add_header.t t/aliases.t t/area_link.t t/autocheck.t t/clone.t t/die.t t/field.t t/find_image.t t/find_link-warnings.t t/find_link.t t/form-parsing.t t/frames.t t/image-new.t t/image-parse.t t/link-base.t t/link-relative.t t/link.t t/new.t t/pod-coverage.t t/pod.t t/regex-error.t t/select.t t/taint.t t/tick.t t/upload.t t/warn.t t/warnings.t t/live/back.t t/live/click.t t/live/follow.t t/live/follow_link.t t/live/form.t t/live/get.t t/live/reload.t t/live/submit.t t/local/back.t t/local/click.t t/local/click_button.t t/local/failure.t t/local/follow.t t/local/form.t t/local/get.t t/local/overload.t t/local/page_stack.t t/local/referer.t t/local/reload.t t/local/submit.t t/00-load...............# Testing WWW::Mechanize 1.18 ok t/add_header............ok t/aliases...............ok t/area_link.............ok 4/9 skipped: Test::Memory::Cycle not installed t/autocheck.............skipped all skipped: Test::Exception required to test autocheck t/clone.................ok t/die...................skipped all skipped: Test::Exception required to test die t/field.................ok t/find_image............ok t/find_link-warnings....skipped all skipped: Test::Warn required to test t/find_link-warnings.t t/find_link.............ok t/form-parsing..........ok t/frames................ok t/image-new.............ok t/image-parse...........ok t/link-base.............ok t/link-relative.........ok t/link..................ok t/live/back.............<input> outside <form> at /home/dolmen/.cpan/build/WWW-Mechanize-1.18/blib/lib/WWW/Mechanize.pm line 1723 ok 1/32 skipped: Test::Memory::Cycle not installed t/live/click............ok t/live/follow...........ok 1/11 skipped: Test::Memory::Cycle not installed t/live/follow_link...... # Failed test (t/live/follow_link.t at line 21) # got: 'http://www.google.com/intl/en/ads/' # expected: 'http://www.google.com/ads/' # Looks like you failed 1 test of 7. dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 6 Failed 1/7 tests, 85.71% okay (less 1 skipped test: 5 okay, 71.43%) t/live/form.............ok t/live/get.............. # Failed test (t/live/get.t at line 24) # got: 'http://www.google.com/intl/en/ads/' # expected: 'http://www.google.com/ads/' # Failed test (t/live/get.t at line 28) # Failed test (t/live/get.t at line 29) # got: 'http://www.google.com/intl/en/ads/' # expected: 'http://www.google.com/support/' # Failed test (t/live/get.t at line 31) # got: '404 Not Found' # expected: 'Google: Help Center' # Failed test (t/live/get.t at line 34) # got: 'http://www.google.com/intl/en/help/basics.html' # expected: 'http://www.google.com/help/basics.html' # Failed test (t/live/get.t at line 40) # got: 'http://www.google.com/intl/en/help/refinesearch.html' # expected: 'http://www.google.com/help/refinesearch.html' # Looks like you failed 6 tests of 26. dubious Test returned status 6 (wstat 1536, 0x600) DIED. FAILED tests 9, 12-13, 15, 17, 22 Failed 6/26 tests, 76.92% okay (less 1 skipped test: 19 okay, 73.08%) t/live/reload...........ok 1/13 skipped: Test::Memory::Cycle not installed t/live/submit...........ok 1/9 skipped: Test::Memory::Cycle not installed t/local/back............# Started http://localhost:45646/ ok 2/38 skipped: Test::Memory::Cycle not installed t/local/click...........# Started http://localhost:41637/ ok t/local/click_button....# Started http://localhost:52562/ ok t/local/failure.........# Started http://localhost:58438/ ok t/local/follow..........# Started http://localhost:42140/ ok t/local/form............# Started http://localhost:56767/ ok t/local/get.............# Started http://localhost:40377/ ok 1/37 skipped: Test::Memory::Cycle not installed t/local/overload........skipped all skipped: Mysteriously stopped passing, and I don't know why. t/local/page_stack......# Started http://localhost:44924/ ok t/local/referer.........ok 1/18 skipped: Test::Memory::Cycle not installed t/local/reload..........# Started http://localhost:44444/ ok 1/16 skipped: Test::Memory::Cycle not installed t/local/submit..........# Started http://localhost:51266/ ok 1/15 skipped: Test::Memory::Cycle not installed t/new...................ok t/pod-coverage..........skipped all skipped: Test::Pod::Coverage 1.04 required for testing POD coverage t/pod...................skipped all skipped: Test::Pod 1.14 required for testing POD t/regex-error...........skipped all skipped: Test::Warn required to test t/regex-error.t t/select................ok t/taint.................skipped all skipped: Test::Taint required for checking taintedness t/tick..................ok t/upload................ok t/warn..................skipped all skipped: Test::Warn required to test warn t/warnings..............skipped all skipped: Test::Warn required to test warnings Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/live/follow_link.t 1 256 7 1 14.29% 6 t/live/get.t 6 1536 26 6 23.08% 9 12-13 15 17 22 10 tests and 16 subtests skipped. Failed 2/48 test scripts, 95.83% okay. 7/562 subtests failed, 98.75% okay. make: *** [test_dynamic] Erreur 255
Will be fixed next release.