See the docs for prove.

There is no documented option to stop on the first faliure, so not directly.

A couple of suggestions:

Also how long do your tests take to run, and how many tests are your putting in each .t file? I think you might be doing stuff wrong if each .t file takes more than a few seconds to run. Perhaps you need to break up your tests into many smaller test files, and simplfy what they do to remove longer running operations.

When I develop tests scripts, I usualy try to limit the number of tests to arround 100 per .t file, so that each individual test file runs quickly. If there are tests that take a significant lenght of time (eg: due to network or database access), I use an environment varable or command line switch to skip them untill all the other tests are working.

You can also speed up testing via prove by running several tests in parallel. On my (4 core) machine, I usualy run something like:

find t -name *.t | xargs prove -j9 -s

find will find all the test file in the test subtree of my source tree and pass them to prove, which will run them in random order, with up to 9 tests running at once. Running multiple tests concurrently is also a good way of finding and removing unexpected dependencies between tests.


In reply to Re: Bailing out when testing by chrestomanci
in thread Bailing out when testing by sedusedan

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.