[Zope] Unit Testing DTML and ZPT

Paul Winkler pw_lists at slinkp.com
Thu Jul 26 10:10:30 EDT 2007


On Thu, Jul 26, 2007 at 01:09:54PM +0200, Marco Bizzarri wrote:
> The problem is what you're trying to test (and, therefore, to assert).
> Checking for equality is too fine grained, where you would check for
> the structure of the zpt, for example. A little parser could be
> useful.

testbrowser might come in handy:
http://plone.org/documentation/tutorial/testing/functional-tests/view?searchterm=import

It's also good to keep the "design for testing" adage in mind.  Keep
it granular.  Do as much logic and data preparation as possible in
product methods or scripts, which can be tested individually.  Then
your templates simply present this data.

-- 

Paul Winkler
http://www.slinkp.com


More information about the Zope mailing list