develooper Front page | perl.qa | Postings from March 2015

Coveralls.io

Thread Next
From:
David Cantrell
Date:
March 20, 2015 11:42
Subject:
Coveralls.io
Message ID:
20150320114232.GA13006@bytemark.barnyard.co.uk
I recently found coveralls.io, a service that works nicely with
travis-ci to generate coverage reports whenever I push changes to my
github repos. For example ...

This commit:
  https://github.com/DrHyde/perl-modules-Data-Compare/commit/6ad1fa9783f
caused this build:
  https://travis-ci.org/DrHyde/perl-modules-Data-Compare/jobs/55114220
which generated this coverage report:
  https://coveralls.io/builds/2155129/source?filename=lib%2FData%2FCompare.pm

It's a great service, and I recommend it. I followed these simple
instructions to get it working:
  http://onionstand.blogspot.com.br/2015/03/how-to-add-online-code-badges-to-your.html

However, Coveralls appears to have some limitations, at least with its
default settings. Compare the report above with this report generated
for the same code:
  http://cpancover.com/latest//Data-Compare-1.25/lib-Data-Compare-pm.html

Coveralls appears to only count the number of statements hit and not
look at whether my tests cover all the conditions in my code. Given code
like this:

if($foo && $bar) { print "Wibble" }

Then Coveralls will report 100% coverage if you test it with $foo and
$bar true, because then every statement will get hit. Devel::Cover,
however, will only be truly happy if you test with all of the following:
  $foo false;
  $foo true, $bar false;
  $foo true, $bar true
so that you exercise all the possibilities that matter.

Does anyone know if there's some option I can tweak in Coveralls to turn
this on? Or is it a limitation of the website and/or the
Devel::Cover::Report::Coveralls module?

-- 
David Cantrell | top google result for "internet beard fetish club"

comparative and superlative explained:

<Huhn> worse, worser, worsest, worsted, wasted

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About