friedo has asked for the wisdom of the Perl Monks concerning the following question:

Greetings,

I'm using Test::WWW::Mechanize (with Test::Class) to do some web app tests, and recently the last three tests have suddenly decided to skip themselves for a reason I can't figure out:

ok 117 # skip HTTP::Response=HASH(0xa70ca9c) ok 118 # skip HTTP::Response=HASH(0xa70ca9c) ok 119 # skip HTTP::Response=HASH(0xa70ca9c)

I can't find anything in the docs about why Mech would decide to skip a test. Any ideas?

Replies are listed 'Best First'.
Re: Strange test skips with Test::WWW::Mechanize
by Ovid (Cardinal) on Dec 01, 2005 at 19:40 UTC

    Since you're using Test::Class, my guess is that you have a test where you claim to be running $X tests but are actually running three less than that number. Find the method those tests are skipped in and count the number of tests you're running and compare that to the number of declared tests. For example, this will generate a similar problem:

    sub foo : Test(4) { ok 1, 'we will have three tests skipped'; }

    If you're generating tests iteratively then the skipped tests are possibly indicative of a behavioral change you should look into.

    Cheers,
    Ovid

    New address of my CGI Course.

      Right you are! My test count for that method was off by three. Everything's working now, thanks for the tip.