"There's a bug in the module that is causing the test to fail after a certain test number."

But which test number? You wrote the tests ... which test is failing? The output will show you. Since you provided no code and no actual error output, i'll have to supply my own. I changed one value in one my modules and ran the test suite. This was the first error of 14 failed tests in two test files:

# Failed test 'north: correct HTML from method call' # at ./t/07-theta-presets.t line 106.

If i look at that test file on line 106 i see:

is $table->north, $expected, "north: correct HTML from method call";
From here i have to go back to the definition of north() and this was indeed the function that i changed a value in. No need for a debugger ... i know where the error is now. If i still can't see the error i can fall back on a debugger, but i find that emitting dumps of data to STDERR is faster for me. Read the test output -- if you can't determine where the problem is quickly then your tests are probably too complicated. Tests help to eliminate the need for a debugger if you have exhaustive coverage. Keep your tests simple and fast.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

In reply to Re: Get the number of the current test when debugging a test script by jeffa
in thread Get the number of the current test when debugging a test script by Dumu

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.