You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by William McKee <wi...@knowmad.com> on 2004/01/21 15:23:00 UTC

Response Handlers

Hi Stas, Geoff, Nick, et al,

A quick question for you folks regarding response handlers. Now that I'm
understanding how to use these tests, I'm finding that I can replace my
tests that used the Apache::FakeRequest module for doing testing of my
server-side code. I've also found that A::T will run these response
handlers with or without a corresponding request test in t/apache/. Is
this typical usage? Am I overlooking any potential gotchas in not
building the request tests?

Thanks again,
William

-- 
Knowmad Services Inc.
http://www.knowmad.com

Re: Response Handlers

Posted by Nick Phillips <Ni...@stonebow.otago.ac.nz>.
On 22/01/2004, at 3:23 AM, William McKee wrote:

> Hi Stas, Geoff, Nick, et al,
>
> A quick question for you folks regarding response handlers. Now that  
> I'm
> understanding how to use these tests, I'm finding that I can replace my
> tests that used the Apache::FakeRequest module for doing testing of my
> server-side code.

Heh... that's where I came from too -- tried Apache::FakeRequest and  
then
got into problems when I started trying to test code that used
Apache::Request and Apache::Cookie.

>  I've also found that A::T will run these response
> handlers with or without a corresponding request test in t/apache/. Is
> this typical usage? Am I overlooking any potential gotchas in not
> building the request tests?

It's typical; as I said before, you will find that Apache::Test is
automatically creating a client script which simply makes a request and
passes the output page on to Test::Harness.

I found the part of the testing documentation on Apache::Test's  
architecture
to be the most useful --  
http://perl.apache.org/docs/general/testing/ 
testing.html#Apache__Test_Framework_s_Architecture


Cheers,


Nick
-- 
Nick Phillips / +64 3 479 4195 / nick.phillips@stonebow.otago.ac.nz
# these statements are my own, not those of the University of Otago