Including uncovered files in Devel::Cover reports

Posted by Markus on Stack Overflow See other posts from Stack Overflow or by Markus
Published on 2010-05-25T20:35:11Z Indexed on 2010/05/26 11:01 UTC
Read the original article Hit count: 372

Filed under:
|
|

I have a project setup like this:

bin/fizzbuzz-game.pl
lib/FizzBuzz.pm
test/TestFizzBuzz.pm
test/TestFizzBuzz.t

When I run coverage on this, using

perl -MDevel::Cover=-db,/tmp/cover_db test/*.t

... I get the following output:

----------------------------------- ------ ------ ------ ------ ------ ------
File                                  stmt   bran   cond    sub   time  total
----------------------------------- ------ ------ ------ ------ ------ ------
lib/FizzBuzz.pm                      100.0  100.0    n/a  100.0    1.4  100.0
test/TestFizzBuzz.pm                 100.0    n/a    n/a  100.0   97.9  100.0
test/TestFizzBuzz.t                  100.0    n/a    n/a  100.0    0.7  100.0
Total                                100.0  100.0    n/a  100.0  100.0  100.0
----------------------------------- ------ ------ ------ ------ ------ ------

That is: the totally-uncovered file bin/fizzbuzz-game.pl is not included in the results.

How do I fix this?

© Stack Overflow or respective owner

Related posts about perl

Related posts about unit-testing