From: Jonathon McKitrick
Subject: Unit testing web apps
Date: 
Message-ID: <1153541595.817811.314290@p79g2000cwp.googlegroups.com>
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?

From: Kamen TOMOV
Subject: Re: Unit testing web apps
Date: 
Message-ID: <ulkqm3yxh.fsf@cybuild.com>
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
From: joh
Subject: Re: Unit testing web apps
Date: 
Message-ID: <1154381461.456193.22640@p79g2000cwp.googlegroups.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.