Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 1.45 KB

create_test_coverage_report_uzing_dist-zilla.md

File metadata and controls

45 lines (32 loc) · 1.45 KB

Create Test Coverage Report Using Dist::Zilla

Perl has the magnificent Devel::Cover, this can be used from Dist::Zilla using the plugin Dist::Zilla::App::Command::cover

And then you can just do:

$ dzil cover

And you get your good old coverage report:

---------------------------- ------ ------ ------ ------ ------ ------ ------
File                           stmt   bran   cond    sub    pod   time  total
---------------------------- ------ ------ ------ ------ ------ ------ ------
blib/lib/Module/Info/File.pm  100.0  100.0   60.0  100.0  100.0  100.0   97.1
Total                         100.0  100.0   60.0  100.0  100.0  100.0   97.1
---------------------------- ------ ------ ------ ------ ------ ------ ------

and a link to the HTML version.

HTML output written to /Users/jonasbn/develop/github/Module-Info-File/.build/D9L1sYL19B/cover_db/coverage.html
done.

And on macOS you can then do:

open /Users/jonasbn/develop/github/Module-Info-File/.build/D9L1sYL19B/cover_db/coverage.html

And a browser window will open with a coverage report, you can navigate in and see the coverage of your code.

References