XP is just a number | |
PerlMonks |
Devel::Cover for myfile.pl with different command-line input argumentsby tito80 (Novice) |
on Aug 22, 2016 at 19:08 UTC ( [id://1170195]=perlquestion: print w/replies, xml ) | Need Help?? |
tito80 has asked for the wisdom of the Perl Monks concerning the following question:
Hi PerlMonks,
I am a newbie and pardon my ignorance. I am trying to use Devel::Cover (DC) to get an idea of the code coverage of my my_file.pl ran with arg1 arg2, etc. as command-line input arguments. I am using Perl 5.8.9 with 1.23 DC. The steps I executed successfully to generate the html file are: 1) perl -MDevel::Cover my_file.pl -arg1 <arg1_value> -arg2 <arg2_value> 2) Devel-Cover-1.23/bin/cover cover_db --report=html Now, I do not have packages/modules to test directly. But I have the my_file.pl file which invokes several packages. And I need to test my_file.pl with several different combinations of command line i/p arguments (i.e. <arg1_different_value1>, <arg2_different_value_2>, etc.). All these test combinations are a part of my regression suite (you can think of the options written in a test.txt file sequentially) and I am trying to see if Devel::Cover can assure that I have 100% code coverage with these tests. While I can run the above in a for-loop, each time with different arguments, I am not sure if that is the best way since I will end up with 100's of html/report files that need to be merged for any meaningful purpose. Could you kindly provide some pointers? Thanks, Tito
Back to
Seekers of Perl Wisdom
|
|