in reply to Can Test::Harness treat sets of tests as files?

Take a look at prove(), as I recall it came with Test::Harness. Prove() runs test-files (files with a '.t' post-fix) and reports a neat little summary.
t$ prove t00_* t00_api....ok t00_dep....ok t00_pod....ok t00_upd....ok All tests successful. Files=4, Tests=86, 1 wallclock secs ( 0.46 cusr + 0.03 csys = 0.49 +CPU)
Is this what you are looking for?

Update:
Note: I have 30+ files in the directory, if I run prove() with no arguments, all 33 files will be driven. I provided a subset, for demonstration purposes.

Update II:
Shows you how long it's been. Test::Harness (and prove) are part of Core, at least with Perl 5.8.5...

----
I Go Back to Sleep, Now.

OGB

Replies are listed 'Best First'.
Re^2: Can Test::Harness treat sets of tests as files?
by kyle (Abbot) on Jan 31, 2008 at 18:19 UTC

    Is this what you are looking for?

    Not exactly, no. That's the kind of output I'm looking for, but I'm looking to get it from a single script. I have sets of tests. For each set, I'd like a one-line summary for every test in the set.

      More like this, then?
      t$ prove -v t00_[pu]* t00_pod....1..3 ok 1 - Base is covered ok 2 - Deploy is covered ok 3 - Update is covered ok t00_upd....1..2 ok 1 - Module loaded successfully ok 2 - new() -- returns proper object ok All tests successful. Files=2, Tests=5, 0 wallclock secs ( 0.26 cusr + 0.02 csys = 0.27 C +PU)

      ----
      I Go Back to Sleep, Now.

      OGB

        I think this is what kyle is asking for:

        t$ prove -v t00_[pu]* t00_pod::TestGroupA....1..3 ok 1 - Base is covered ok 2 - Deploy is covered ok 3 - Update is covered ok t00_pod::TestGroupB....1..2 ok 1 - Module loaded successfully ok 2 - new() -- returns proper object ok t00_upd....1..2 ok 1 - Module loaded successfully ok 2 - new() -- returns proper object ok All tests successful. Files=2, Tests=7, 0 wallclock secs ( 0.26 cusr + 0.02 csys = 0.27 C +PU

        Not sure how to get it though.


        TGI says moo

        No, that's actually further away from what I'm looking for. What I want is one script that will output test results as if Test::Harness (aka prove) had been given many scripts.