Hello-

Please be gentle, this is my first question. =) I consider myself to be a novice perl user.

I'm trying to convince TAP::Parser::Aggregator that it is ok to coallate all of the "ok" messages provided by Test::More within the script that is calling aggregator, but can't seem to figure out how to make this happen.

The script doesn't call individual tests; rather, it just loads some parameters. The script itself, is thus being tested (to ensure its functionality).

I don't understand classes or objects very well, thus my confusion, I'm sure.

Is this possible? Thanks!

use Test::More; use TAP::Harness; use TAP::Parser::Aggregator; my $mm_start_time = gettimeofday; my $harness = TAP::Harness->new({ verbosity => -2, merge => 1, }); my $aggregator = TAP::Parser::Aggregator->new; $aggregator->start(); my $mm_parser; ## Doesn't work: ## $aggregator->add( 'myself', $mm_parser ); BEGIN { use_ok( 'ACTH::Base::Load_test', "load_test" ) or die "Could not use module ACTH::Base::Load_test"; can_ok( 'ACTH::Base::Load_test', "load_test" ); # others... } # lots of other work, subroutines called, etc done_testing( ); $aggregator->stop(); my $summary = <<'END_SUMMARY'; Passed: %s Failed: %s Unexpectedly succeeded: %s To do: %s Skipped: %s Planned: %s END_SUMMARY printf STDERR $summary, scalar $aggregator->passed, scalar $aggregator->failed, scalar $aggregator->todo_passed, scalar $aggregator->todo , scalar $aggregator->todo_passed, scalar $aggregator->skipped, scalar $aggregator->planned; exit 0;

Provides output like this. I'd prefer to see none of the "ok" meessages except when debugging...

ok 1 - use ACTH::Base::Load_test; ok 2 - ACTH::Base::Load_test->can('load_test') ok 3 - use ACTH::Base::Sanity_test; ok 4 - ACTH::Base::Sanity_test->can('sanity_test') ## ..snip... ===================================================== ===================================================== 1..23 Passed: 0 Failed: 0 Unexpectedly succeeded: 0 To do: 0 Skipped: 0 Planned: 0

In reply to Aggregating "ok" messages within an aggregating script by throvolos

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.