Devel::Cover recommendations... or maybe not?

Philippe Bruhat BooK philippe.bruhat at free.fr
Fri Mar 16 01:10:20 GMT 2007


Le mercredi 14 mars 2007 à 16:18, Luis Motta Campos écrivait:
>   Dear Londoners, I need to recommend some tools for QA at $company.
> 
>   Maybe some of you can tell me good (or bad) impressions about  
> Devel::Cover.
> 
>   The POD scares everybody, stating clearly "this is alfa code".  
> It's almost like saying "go away" what is pretty strange for an open- 
> source module...
> 
>   Comments, anybody?

I'm currently using Devel::Cover to test the coverage of my test suites.
It helped me several times spot dead code or useless tests, too. It is
a great tool that will help you writing tests.

One problem with test coverage is that you also cover code that is
not used at all in production. With a large piece of software that has
been in use for years, I'm quite sure that there are some large pieces
of dead code (or even dead modules!) that could be removed, and that
this removal would be beneficial for the whole system. The test suite
doesn't help in this case: it continue to be the only script actually
using these dead modules! (if you have tests for that code, that is)

So, I'm thinking about (that's a long term project for $work, not
something for anytime soon) running a staging server under Devel::Cover,
and feed the system with traffic from production, just to see the actual
pieces of code that are exercised by real production traffic.

And then have a look at the code that is never ever run...

-- 
 Philippe "BooK" Bruhat

 Just because you do not see it does not mean it is not there.
                                    (Moral from Groo The Wanderer #85 (Epic))



More information about the london.pm mailing list