tito80 has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Devel::Cover for myfile.pl with different command-line input arguments
by Mr. Muskrat (Canon) on Aug 22, 2016 at 22:03 UTC | |
by tito80 (Novice) on Aug 23, 2016 at 00:06 UTC | |
by Mr. Muskrat (Canon) on Aug 24, 2016 at 14:03 UTC | |
by tito80 (Novice) on Aug 26, 2016 at 23:16 UTC | |
|
Re: Devel::Cover for myfile.pl with different command-line input arguments
by TomDLux (Vicar) on Aug 23, 2016 at 15:48 UTC |