Perl Monk, Perl Meditation | |
PerlMonks |
Re: Devel::Cover for myfile.pl with different command-line input argumentsby TomDLux (Vicar) |
on Aug 23, 2016 at 15:48 UTC ( [id://1170231]=note: print w/replies, xml ) | Need Help?? |
The common usage of Devel::Cover is to determine whether the tests cover all the code. So why not run your code from a set of tests, with each using different combinations of command line options? That way, you can run the tests again any time you make a major change. It's one thing to say, 'we used the --verbose options, therefore line 67 was invoked'; how does the --verbose option modify data structures? Is there some side effect you can verify in test? Rather than running the whole program, is it possible to treat it as a module, and just invoke one subroutine at a time? That makes testing a lot simpler. As Occam said: Entia non sunt multiplicanda praeter necessitatem.
In Section
Seekers of Perl Wisdom
|
|