[Grok-dev] Share testing experience without zope.app.zcmlfiles

Martijn Faassen faassen at startifact.com
Sun Jan 10 15:03:44 EST 2010


Souheil CHELFOUH wrote:
> As I'm trying currently to get rid of the zope.app dependencies, I
> bump into problems to remove zope.app.testing and zope.app.zcmlfiles.
> If possible, i'd like use to put in common some "hints" and
> experiences concerning such testing in grok and grok-related packages.
> Up to now, my common cases have similar needs : to be able to get
> users registration, some security policy, a root folder that is
> traversable and a working test browser.
> I failed miserably trying to set up such a test environment. Can
> anyone come to the rescue and point me the emergency exits, please ?

Have you tried to lock down the ZTK? It's here:


You want to include both ztk.cfg and zopeapp.cfg into your buildouts. 
Without such a tested list it's going to be chaotic.

zope.app.testing and zope.app.zcmlfiles are probably both the hardest 
packages to remove. The trick is to do this on a package-by-package 
basis: analyze a package and see whether you can get rid of them. 
zope.app.zcmlfiles will in that case likely be easier to remove than 
zope.app.testing, as removing zope.app.zcmlfiles can always be done by 
including more ZCML directly from the package.

Removing zope.app.testing will require messing around with test setup 
which in my experience can be rather complicated. It often turns out to 
be the case that packages use bits from zope.app.testing but can 
actually do with zope.component.testing, say. We need to figure out how 
to set up the absolute minimum testing environment for various use 
cases.. It's going to take some trying.



More information about the Grok-dev mailing list