On Mon, 2004-11-29 at 15:13 -0500, Winston Wolff wrote:
> I have used WebUnit very successfully for high level tests.
> (http://mechanicalcat.net/tech/webunit)

> I haven't been able to figure out how to unit-test pages since anything
> that extends Page requires the AppServer to be running.  Perhaps part
> of the dependency can be eliminated with a mock HTTPTransaction, but
> I'm not sure.

I think there are two layers of testing which would be good to see in the
Webware codebase:

1. Unit tests for individual webware modules.  Such tests are currently
difficult to write, due to the interdependencies between the existing 
modules (i.e. it's difficult to instantiate an Application object without 
also having an AppServer object).  Some of this could be overcome by 
using "fake" objects -- for example implement a fake AppServer class to use
when testing the Application object -- but it would also help to 
restructure the code to make such tests easier.

2. High-level end-to-end testing using a running AppServer and something
like webunit for the client-side.  Since Ian has implemented built-in HTTP
server functionality, it's now much more feasible to write automated tests
without requiring any manual set-up of the test environment.  In fact,
I've just implemented a bit of a framework to do this, and have checked
it into CVS under WebKit/Tests.  It doesn't yet use webunit (haven't
gotten that far yet; maybe someone else has the time to integrate
this), but it includes a test case base class for starting/stopping the
appserver reliably and checking the appserver output (stdout + stderr)
for specific regular expressions.

> I think it would be good to organize a working group of people willing
> to work on tests.  I know several people including myself have
> volunteered to work on the release, but not to lead it themselves
> citing inexperience.  However I have not been "called to service" yet.
> A difficulty with volunteering to do a release is to know if I've made
> a mistake in the release process.  Hence the need for tests.  Once we
> have a group together, we can pick a few priorities in the tests, and
> settle anything needed to let people get to work individually, such as
> how our tests will fit into the larger set of test cases.

Agreed.  I'd encourage people to post replies and/or proposed test cases to 
webware-devel.

peace,
Jason



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to