[Zope] Idea: ZTest: Integrated Use-case based web site testing.

Jay, Dylan djay@lucent.com
Fri, 27 Aug 1999 11:37:19 +1000


To much caffeine and some morning reading
(http://www.rational.com/products/rup/prodinfo/whitepapers/dynamic.jtmpl?doc
_key=101057) has given me a bit of a brainwave.
When building complex dynamic site testing is very important. I've created
use-cases and test plans for my web-site. I've investigated automatic site
testing tools a little bit but have found them a) expensive b) not very good
when it comes to testing dynamic content and getting past authentication.
What if a Zope site could test it self regularly and just mail the webmaster
when something is wrong?

So what I envisage is test-case objects that have a specification of a
certain scenario and expected results. It would be a series of URLs with
parameters to be given and a specification of what the requested page should
look like. Since this is internal to Zope then some information about what
is interesting and what is not can probably be leveraged. Such ZTestCase
objects can be created either by instrumenting the site and  then the you
step through the pages or can be edited manually. Specified code could be
executed  before and/or after each test case to set and reset test
conditions. ZTestRun objects can then be created which specify a whole range
of test-cases to run. 

Another idea I had involves the creation of a scheduler inside Zope so that
specified Zope code could be executed in the future or periodically.
Caching, indexing, retrieving external data, backup etc and of corse
scheduling running of test cases.

Unfortunately for me I seem to have way more ideas than I have time so I
don't know when I would get time to try implementing it so I thought I'd
bounce it out into the community to see what others thought.