I just implemented an excellent example of test coverage in Perl described at Perl, Code Coverage Example
But that required Module::Build , Now what if i have existing Perl Application which does NOT have the Module::Build instrumentation, is there a way to get test coverage for unit or functional tests ?
I looked at :
Clean up from previous test run (optional)
cover -delete
#Test run with coverage instrumentation
PERL5OPT=-MDevel::Cover prove -r t
#Collect covered and caller information
# Run this _before_ running "cover"
# Don't run with Devel::Cover enabled
covered runs
- or e.g. -
covered runs --rex_skip_test_file='/your-prove-file.pl$/' \
--rex_skip_source_file='{app_cpan_deps/}'
#Post process to generate covered database
cover -report Html_basic
%perl -d:Coverage -Iblib/lib test.pl
But this seems to indicate Code Coverage while running the application.
I want to be able to get a Clover or Cobertura Compatible output, so i can integrate it with email-ext in Jenkins