|
|
| Just another Perl shrine | |
| PerlMonks |
Re^2: Looking for help for unit tests and code coverage on an existing perl scriptby tizatron (Novice) |
| on Feb 03, 2014 at 23:22 UTC ( [id://1073278]=note: print w/replies, xml ) | Need Help?? |
|
Good links there. Appreciate it. In this theme, I went ahead and tried to setup an env similar to the layout described in this link: StackOverFlow Complete build/unittest/codecoveragecouple of things that I did:
Then I was able to add a stanza to my test file.
Not sure how I feel about the sample::main("my-dev-1"). Would appreciate some feedback on that to see if I am calling this correctly. That said, I was able to generate code cover from this setup. $ ./Build test $ ./Build testcover ---------------------------- ------ ------ ------ ------ ------ ------ ------ File stmt bran cond sub pod time total ---------------------------- ------ ------ ------ ------ ------ ------ ------ blib/lib/sample.pm 97.4 91.7 n/a 100.0 0.0 100.0 93.2 Total 97.4 91.7 n/a 100.0 0.0 100.0 93.2 ---------------------------- ------ ------ ------ ------ ------ ------ ------ That processes pumps out a cover.html file that kinda aligns more with what I was hoping to see. The changes to the original code are not significant, but they are changes, more than what I was hoping to make, perhaps digging in harder on Test::Output would help.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||