I have experience with both. More with Cactus than HttpUnit.
If Chris is reading this then maybe he could email you the acceptance
test that we have been working on.
The only tricky part of cactus is setting it up. Once that is done then
it is a matter of just doing regular unit tests using the junit
framework. This link is a very good intro that gives you the basic
working knowledge to write unitTests :
http://junit.sourceforge.net/doc/cookbook/cookbook.htm
The nice thing about Cactus is that you can do real unit testing within
the servlet container. You also have access to the HttpResponse and
HttpRequest objects of the servlet being tested so that those can be
tested to. On the other hand HttpUnit does not run in the servlet
container (although there is a way of doing so). What it is good for is
for veryfying the input and output of a web app thus its usefullness in
doing Acceptance tests for web apps.
-H
rd...@ly... wrote:
> Hi, Hugo.
>
> I am trying to create my first "Preview" page, something basic.According to XP rule "test then write code", I should have some test for this servlet.Are we gonna use HHTPUnit or Cactus for tests?Do you have experience with both and maybe you can give us some directions?
>
> Thank you.
>
> Radu
>
>
>
>
|