Hi PerlMonks, I have a simple test file under t/. I want to display the summary afte +r running all the tests. For some reason, the summary is displayed be +fore the results of "04.pl" is displayed. How do I display the summar +y after running all the tests? ==> t/test.t #!/usr/bin/perl use strict; use warnings; use Test::More; plan tests => 4; require "/home/mydir/perl5/lib/perl5/TAP/Harness.pm"; require "/home/mydir/perl5/lib/perl5/TAP/Formatter/HTML.pm"; require "/home/mydir/perl5/lib/perl5/TAP/Parser/Aggregator.pm"; my $f = TAP::Formatter::HTML->new; $f->verbosity(-1); $f->force_inline_css(0); my %args = ( formatter => $f, merge => 1, ); my $a = TAP::Parser::Aggregator->new; my $h = TAP::Harness->new(\%args); my @files = qw[01.pl 02.pl 03.pl 04.pl]; $a->start; $h->aggregate_tests($a, @files); $a->stop; done_testing(4); my $summary = <<'END_SUMMARY'; Total Tests: %s Passed: %s Failed: %s Unexpectedly succeeded: %s END_SUMMARY printf $summary, scalar $a->total, scalar $a->passed, scalar $a->failed, scalar $a->todo_passed; ==> Output 1..4 ok 1 - First ok 1 - Second ok 1 - Third Total Tests: 4 Passed: 4 Failed: 0 Unexpectedly succeeded: 0 ok 1 - Four To run the tests, I used the 'prove' utility: /home/mydir/perl5/bin/prove -Q --formatter=TAP::Formatter::HTML > outp +ut.html

In reply to How do I display the summary in the generated HTML page after running all the tests. by rfbytes

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.