Test Layers
Layers provide a way to have common setup and teardown for groups of tests, organized into "layers" that can depend on lower layers.
Unit tests are implicitly in the lowest layer, named "unit", and do not depend on any other layers.
It is possible to specify which layers' tests to run from the zope testrunner's command line.
Layers are therefor very useful for tests that do very expensive setup, and/or integration tests that depend on external resources that may not always be available (database servers, web services, etc).
More Background Information
See the testrunner documentation, online at http://svn.zope.org/zope.testing/trunk/src/zope/testing/testrunner.txt
How to Write Tests Using Layers
See TestLayersHowTo , or if you have Zope 2.9.5 or later, look at lib/python/zope/testing/testrunner-layers-api.txt
How to Select Layers When Running Tests
See http://svn.zope.org/zope.testing/trunk/src/zope/testing/testrunner-layers.txt
The command options described there work with zope 2 as well; you can use them for your Product code in a zope instance by running "bin/zopectl test". Example:
./bin/zopectl test --layer "foo*"