httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: Perl test framework, TestConfig, and debugging A::T
Date Fri, 16 Jan 2004 19:30:45 GMT

> Honestly, I am trying my best. The problems I am encountering are
> changing perspective from a cgi to a mod_perl framework which thus
> entails learning lots more about the Apache server than I've ever known
> before. My apologies if you think these questions are inane or
> off-topic. 

no, I'm sorry - I didn't mean to sound so harsh.  it just seemed to me that
this was becoming a very long thread comprised mostly of things that I knew
were answered already.  apparentlly, not clearly enough, though :)


> The documentation that you pointed me to is starting to make sense. I
> had thought that putting the following into my extra.conf.in would
> handle the dynamic responses without the need for further code:
> 
>     <Location /TestApache__write>
>         SetHandler modperl
>         PerlResponseHandler TestApache::write
>     </Location>
> 
> I'm still perplexed at the moment as to why it does not. Hopefully
> further study of the documentation and the other suggestions you made
> will help to clear up my confusion.

basically, there are two ways to approach Apache-Test: do it all yourself or
let Apache-Test add some highly magical stuff.  the article I wrote takes
the first route - it assumes that you already know how to edit an httpd.conf
and are somewhat familiar with Test.pm or Test::More.  the testing tutorial
shows you other parts of Apache-Test, such as letting it autogenerate tests
and configurations.

personally, I find my approach much more managable for first time users, but
YMMV.

> 
> 
> 
>>I wrote a rather simple article that tries to introduce it
>>
>>http://www.perl.com/pub/a/2003/05/22/testing.html
> 
> 
> It's next on my list of reading.

you might also be interested in my slides from a talk I've given at various
conferences:

http://www.modperlcookbook.org/~geoff/slides/ApacheCon/2003/apache-test-printable.ppt.gz

it covers pretty much the same info as the article, but if you prefer
powerpoint-type bullet points it may help.

>>which has links to other documentation at the end.  the example given in the
>>article covers both mp1 and mp2, and has links to sample tarballs, which you
>>might try using as a fresh starting point for your work.
> 
> 
> That would be helpful as it seems my test package is in dire straits.

if you're feeling a bit overwhelmed but have Apache-Test installed, I'd
suggest that you start with this

http://perl.apache.org/~geoff/bug-reporting-skeleton-mp1.tar.gz

examine it, run it, and get a feel for how the test scripts interact with
the running server.  then massage the bug.pl script and Bug.pm library
gradually to get it looking like your code.  starting with such a simple
example might help everything gel together for you - Apache-Test is actually
very simple, so at this point you may be over thinking things :)

again, I'm sorry if I seemed harsh - it was not my intention in the least.
feel free to keep coming back with questions.

--Geoff


Mime
View raw message