You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@perl.apache.org by Michael Peters <mp...@plusthree.com> on 2005/03/02 21:40:34 UTC

Apache::TestMB and testcover

Hello all,

I'm trying to get coverage testing of a module that runs in both 
mod_perl and vanilla cgi, but working slightly differently under both. 
When I do a ./Build testcover it works but my coverage report if 
completely off. The parts that ran under mod_cgi are shown, but all of 
the branches that only run under mod_perl show up as not being run when 
I know that they are or the test would not have passed.

I looked through the archives and can see that '-one-process' was added 
a while ago and that it should be working as of Apache::Test 1.14.

Am I missing anything?

Apache-Test 1.20
perl 5.8.5
mod_perl 1.27

-- 
Michael Peters
Developer
Plus Three, LP


Re: Apache::TestMB and testcover

Posted by Michael Peters <mp...@plusthree.com>.
Geoffrey Young wrote:
> 
> Michael Peters wrote:
> 
>>Hello all,
>>
>>I'm trying to get coverage testing of a module that runs in both
>>mod_perl and vanilla cgi, but working slightly differently under both.
>>When I do a ./Build testcover it works but my coverage report if
>>completely off. The parts that ran under mod_cgi are shown, but all of
>>the branches that only run under mod_perl show up as not being run when
>>I know that they are or the test would not have passed.
>>
>>I looked through the archives and can see that '-one-process' was added
>>a while ago and that it should be working as of Apache::Test 1.14.
> 
> 
> ok, from memory...
> 
> all the testcover target does it launch Devel::Cover - you still need to
> configure D::C to run under mod_perl.
> 
> see
> 
>   http://www.nntp.perl.org/group/perl.qa/3117
> 
> and the surrounding discussion to get a better idea.  basically look at
> t/conf/extra.conf.in and t/conf/modperl_extra.pl.

Thank you very much, that was exactly what I was looking for.

-- 
Michael Peters
Developer
Plus Three, LP


Re: Apache::TestMB and testcover

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Michael Peters wrote:
> Hello all,
> 
> I'm trying to get coverage testing of a module that runs in both
> mod_perl and vanilla cgi, but working slightly differently under both.
> When I do a ./Build testcover it works but my coverage report if
> completely off. The parts that ran under mod_cgi are shown, but all of
> the branches that only run under mod_perl show up as not being run when
> I know that they are or the test would not have passed.
> 
> I looked through the archives and can see that '-one-process' was added
> a while ago and that it should be working as of Apache::Test 1.14.

ok, from memory...

all the testcover target does it launch Devel::Cover - you still need to
configure D::C to run under mod_perl.

see

  http://www.nntp.perl.org/group/perl.qa/3117

and the surrounding discussion to get a better idea.  basically look at
t/conf/extra.conf.in and t/conf/modperl_extra.pl.

I just ran that tarball with D::C 0.49 and it worked just fine.  at least
using MakeMaker - I'm not a Module::Build guy :)

HTH

--Geoff