jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From laurent.duper...@masq.ca
Subject Ok, let's talk about testing approaches!
Date Tue, 16 Apr 2002 11:56:10 GMT

Now that I've got the mechanics of this going, let's talk about actually
using it!

I just got a document from my QA analyst which a whole bunch of test cases
that she wants us tor do on our code. One section tests for missing or
invalid values for parameters. We have a (POST) request that takes about 18
parameters as input. How would one go about testing each parameter for
incorrect and/or missing values? Should I be writing one method per
parameter? Or do only one test which tests each parameter one after the
other? Or another approach?

Another question I have is: how do I test the servlet only? By that I meant
that our servlet extracts all the parameters from the request and then hands
them off to a handler which knows what to do with them. If I want to only
test the servlet, I think I need to use somethihng like Mock Objects, no?
That way the MO will react somewhat like the Handler would. But the examples
I've seen of MO's don't seem to apply well to servlets. The White papers and
documentation I've read tend to show that the signatures of the methods are
changed to accomodate the use of MO's. In the case of a servlet's process()
method (which would be the one to call out Handler), I can't really do
that... Hmmm... Unless I make it call another process() method which has the
hadler as a parameter. That's one way to do it, I guess. Any thoughts?

Any feedback from anyone who's done something similar would be really


Laurent Duperval <mailto:laurent.duperval@masq.ca>

 12. A "sucking chest wound" is natures way of telling you to slow down.

To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>

View raw message