You are not logged in Log in Join
You are here: Home » Members » Stefan's Home » TestRunner » View Document

Log in
Name

Password

 

TestRunner

Here is an improved testrunner.py based on the testrunner coming with Zope 2.7.0. It supports INSTANCE_HOME installations and can read Zope configuration files (zope.conf) to setup the test instance. It is used in my organisation as a general purpose unit test runner (as opposed to the "Zope core only" and "must be run from Zope root" limitations of the stock testrunner).

For example to run all tests in a Zope instance we issue:

 python /Zope/bin/testrunner.py -qid /path/to/instance

or

 cd /path/to/instance
 python /Zope/bin/testrunner.py -qia

What's New

The testrunner has been updated as of 2004/03/26.

New options:

-i
Auto-detect instance home installations.
-I dirpath
Use the specified directory for INSTANCE_HOME.
-k
Remove stale bytecode from ZOPE_HOME and INSTANCE_HOME.
-C filepath
Use the specified configuration file (zope.conf) to setup the test instance.

The full option set is documented in the testrunner's usage message: Usage.txt

Compatibility

This testrunner is compatible with all versions of Zope >= 2.4.

Installation

Download testrunner.py and copy it over the stock testrunner.py in /Zope/bin (or /Zope/utilities if Zope < 2.7).

References

http://www.zope.org/Wikis/DevSite/Proposals/CleanUpAndUnifyCoreUnitTests