Test2::Harness::Log::CoverageAggregator - Module for aggregating coverage data from a strema of events.
This module takes a stream of events and produces aggregated coverage data.
use Test2::Harness::Log::CoverageAggregator; my $agg = Test2::Harness::Log::CoverageAggregator->new(); while (my $e = $log->next_event) { $agg->process_event($e); } my $coverage = $agg->coverage; use Test2::Harness::Util::JSON qw/encode_json/; open(my $fh, '>', "coverage.json") or die "$!"; print $fh encode_json($coverage); close($fh);
Process the event, aggregating any coverage info it may contain.
Produce a hashref of all aggregated coverage data:
{ 'test_file_a.t' => [ 'lib/MyModule1.pm', 'lib/MyModule2.pm', ..., ], 'test_file_b.t' => [ 'share/css/foo.css', 'lib/AnotherModule.pm', ... ], ..., }
The source code repository for Test2-Harness can be found at http://github.com/Test-More/Test2-Harness/.
Copyright 2020 Chad Granum <exodist7@gmail.com>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://dev.perl.org/licenses/
To install Test2::Harness, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test2::Harness
CPAN shell
perl -MCPAN -e shell install Test2::Harness
For more information on module installation, please visit the detailed CPAN module installation guide.