Hi James and Randy, Thank you so much for your replies!
Yes, the modules that we are testing are not for standard distribution. They are created by other folks in my organization to support and to be part of our current automated integration system. They are our internal use. There already are many unit tests, which created by other folks in my organization, to load (use) those modules and exercise the functions in them. I am trying to figure out how to get the code coverage metrics of these existing units tests on those modules and to figure out where we should add more tests to cover. Yes, because history reason and because product other particular reason, we need use our in house built test harness to execute those tests one by one, and the mechanism in our test harness are different from how standard Test::Harness-based approach work. Our test scripts use APIs that our test harness provides which are not exact same but similar to Test::Simple or Test::More provide. I understand and appreciate James' points. Our purpose, our different situation and the effort our people had put in make me have to find a way looks like different from standard way that James mentioned. Randys comment makes me concerning if there is an existing way or tool out there which may help me out to collect code coverage data for our tests. Thanks again and please continue advice if you can. I will continue my research basing on all your feedbacks. Thanks, Scoot --- "Randy W. Sims" <[EMAIL PROTECTED]> wrote: > James E Keenan wrote: > > Scott Wang wrote: > >> Hi Chris, > >> > >> I am still confus. > >> > >> For example, > >> > >> On my Linux box, I have a module > >> "/tmp/experiment/lib/module_to_test.pm" to be > tested, and I have two > >> Perl unit test scripts > "/tmp/experiment/tests/test1.pl" and > >> '"/tmp/experiment/tests/test2.pl" to load the > module_to_test.pm module > >> and execute the subroutines in it. Then, what are > exact "perl > >> -MDevel::Cover" commands I could use to get the > module_to_test.pm > >> module code coverage data from running test1.pl > and test2.pl unit test > >> scripts? I am new in Perl, appreciate your detail > information. > >> > >> > > > > Scott: > > > > With all due respect, I think your confusion is > self-inflicted. You > > acknowledge that you are new to Perl and to > Devel::Cover in particular, > > but you are trying to do things in a way (a) that > would take an > > experienced Perl programmer a lot of time to hack > up; and (b) that an > > experienced Perl programmer would not even bother > with. Why not? > > Because experienced Perl programmers know that the > Perl community > > worldwide has expended considerable effort > developing certain standard > > practices which work right out of the box. > > > > In particular, experienced Perl programmers, when > developing and testing > > a module, structure the module's distribution in a > particular way. Using > > your directory names: > > I've only been half-reading this thread (with > holidays and fighting off > a cold), but my impression is that Scott has > *installed* modules that he > wishes to test rather than a distribution to test. > Wanting to test > installed modules seems a reasonable thing to do for > internal/private > use modules that don't need to be created as > distributions. However, I > don't know of any current way to do this or of any > infrastructure that > would assist here. > > Randy. > > __________________________________________ Yahoo! DSL Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com