How do I get code coverage of Perl CGI script when executed by Selenium? How do I get code coverage of Perl CGI script when executed by Selenium? selenium selenium

How do I get code coverage of Perl CGI script when executed by Selenium?


I'm not familiar with Selenium or EPIC, but one workaround (unless/until someone comes with more native solution) is to simply include "-MDevel::Cover" into the run configuration command line.

Worse comes to worst, add some conditional logic in BEGIN{} block that - based on some selenium environment variable - conditionally does use Devel::Cover

UPDATE:

It should be possible to suppress output from Devel::Cover using -MDevel::Cover=-silent,1

$ perl5.8 -MDevel::Cover -e '{1;}'Devel::Cover 0.64: Collecting coverage data for branch, blahSelecting packages matching:Ignoring packages matching:blah, blah, blah---------------------------- ------ ------ ------ ------ ------ ------ ------File                           stmt   bran   cond    sub    pod   time  total---------------------------- ------ ------ ------ ------ ------ ------ ------Total                           n/a    n/a    n/a    n/a    n/a    n/a    n/a---------------------------- ------ ------ ------ ------ ------ ------ ------$ perl5.8 -MDevel::Cover=-silent,1 -e '{1;}'$