Suppose you have a web app with a decent chunk of your logic in the
handlers. What is a good way of unit testing this? Is there a tool
out there to feed URLs to a server and then log the results?
On ������, ��� 22 2006, Jonathon McKitrick wrote:
> Suppose you have a web app with a decent chunk of your logic in the
> handlers. What is a good way of unit testing this? Is there a tool
> out there to feed URLs to a server and then log the results?
I am considering using the AllegroServe's web client functionality for
that purpose. It would allow sending requests and logging the results
within the unit-test package, entirely in Lisp.
HTH,
--
Kamen TOMOV
http://www.cybuild.com
Kamen TOMOV wrote:
> On ñúáîòà, Þëè 22 2006, Jonathon McKitrick wrote:
>
> > Suppose you have a web app with a decent chunk of your logic in the
> > handlers. What is a good way of unit testing this? Is there a tool
> > out there to feed URLs to a server and then log the results?
>
> I am considering using the AllegroServe's web client functionality for
> that purpose. It would allow sending requests and logging the results
> within the unit-test package, entirely in Lisp.
>
> HTH,
> --
> Kamen TOMOV
> http://www.cybuild.com
I have been thinking about this problem lately. It seems fairly easy to
test that the page is returned correctly, and for simple webapps that's
probably enough. But if you have a complex application, with lots of
form submissions and JavaScript, you can end up doing a ton of work to
build up a request that you hope simulates the results of a user
filling out a form and clicking a button.
There's a Java tool called HttpUnit that includes a JavaScript engine
and encapsulates high-level behaviors ("Find this link and click it.").
I think you need those things to really automate testing of a web site.