----- Original Message ---- 
From: Shlomi Fish  
 
> In other news, Test::Run now makes use of TAPx::Parser to parse the TAP. It  
> still collects the statistics on its own, because I couldn't remember whether 
>  
> TAPx::Parser does that or not, and it was too much work to do at one time. 
 
Depends upon which statistics you want.  If you want aggregate statistics of 
various test runs, use TAPx::Parser::Aggregator: 
http://search.cpan.org/dist/TAPx-Parser/lib/TAPx/Parser/Aggregator.pm 
 
  use TAPx::Parser::Aggregator; 
 
  my $aggregate = TAPx::Parser::Aggregator->new; 
  $aggregate->add( 't/00-load.t', $load_parser ); 
  $aggregate->add( 't/10-lex.t',  $lex_parser  ); 
     
  my $summary = <<'END_SUMMARY'; 
  Passed:  %s 
  Failed:  %s 
  Unexpectedly succeeded: %s 
  END_SUMMARY 
  printf $summary,  
    scalar $aggregate->passed,  
    scalar $aggregate->failed, 
    scalar $aggregate->todo_failed; 
  
The above assumes that $load_parser and $lex_parser are parsers which have 
already finished parsing. You can also look at the various tprove* files in 
examples/ for more usage.
 
Cheers, 
Ovid 
--  
Buy the book -- http://www.oreilly.com/catalog/perlhks/ 
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/ 
 
 
 


Reply via email to