On Mon, Jan 19, 2004 at 09:25:35AM +1300, Nick Phillips wrote: > It seems you are going through pretty much what I did a month or two > ago.
I'm glad to hear it's not just me! > And eventually Stas said something that triggered that in me, too. But > I do think that a better tutorial document is needed; I just don't > have the time to write one right now. I think Geoff's article fits the bill. Of course, I didn't come to it until I had gone over Stas' documentation many, many times so I didn't exactly have fresh eyes. Still, I think it's a better starting place until we come up with an alternative. > I think the "eureka moment" for me was when Stas pointed out that you > manage the server side of the testing from handlers. The TEST program > takes your response module and uses it as a handler for the request > in question. A whole series of URLs are set up, one for each response > part, with names generated from the filenames of the response modules > you've written. The request parts of the tests can then test any of > the response modules by requesting the appropriate URL. This concept took a long time for me to understand (as you've noticed if you've been following my postings). Are you using the test module in this way or more like Geoff described? > The other confusing bit was trying to get a handle on which bit is > actually controlling the test; which bit should actually output the > test plan and the "ok" and "not ok" stuff. It's the request script, > but in many cases it is convenient for the response module to output > it into the response page, and for the request script to just output > that verbatim (particularly when you are unit testing, as you said, > subroutines used on the server side). So let me see if I follow you. The request script is the client and should output the test results. The response handler is handling the server-side requests. It can send information back to the client to output. It looked, though, like Geoff was using examples such as plan $r, tests=>9 in the response handler examples he was writing to me about. Was this incorrect usage or can you do testing in the response handler which you pass back to the request handler to output? Thanks, William -- Knowmad Services Inc. http://www.knowmad.com