Commit 4f27bec6 authored by Hanno Schlichting's avatar Hanno Schlichting

Update some references to the testrunner and removed obsolete docs in ZTC

parent 6f1677b6
......@@ -41,8 +41,3 @@ tests.
ZEO support ("both") is handled separately, through the new environment
variable ZEO_INSTANCE_HOME.
You may want to consider using a testrunner to run your tests. You can find one
here: http://zope.org/Members/shh/TestRunner
......@@ -13,8 +13,6 @@ ZopeTestCase Readme
2. Create an (empty) '__init__.py' in 'tests' to make it a package.
3. Copy 'framework.py' from the 'ZopeTestCase' package into 'tests'.
Once a test suite has been set up, you can add test modules:
1. Create a file with a name matching 'test*.py'.
......@@ -34,56 +32,8 @@ ZopeTestCase Readme
called after the fixture has been set up and before the fixture is destroyed
respectively.
5. Follow the instructions in 'framework.py' about adding lines to the
top and bottom of the file.
Now you can run the test as 'python path/to/tests/testName.py', or
simply go to the 'tests' directory and type 'python testName.py'.
Note that there is a skeleton test suite named 'testSkeleton.py' that you
may copy into your 'tests' directory and take it from there.
Note also that when the tests are run in an INSTANCE_HOME installation of
Zope, you must set the SOFTWARE_HOME environment variable for the 'Testing'
and 'ZopeTestCase' packages to be found.
See the sample tests in the 'ZopeTestCase' directory for details on writing
your own tests.
framework.py
1. Uses SOFTWARE_HOME (if set) to locate the Testing package.
2. Detects and handles INSTANCE_HOME installations of Zope. Please
see ENVIRONMENT.txt for the assumptions ZTC makes about its
environment.
3. Supports setting up a ZODB from a 'custom_zodb.py' file in
the 'tests' directory.
4. Allows to connect to a running ZEO server by setting the
ZEO_INSTANCE_HOME environment variable.
testrunner.py
Alternatively, you may use Zope's testrunner utility to run your tests
('testrunner.py' can be found in the 'utilities' directory of your Zope
installation). If you do so, you will have to define a 'test_suite' method
in your modules (see examples).
There is no need to set SOFTWARE_HOME when using the testrunner but you may
have to provide the -i flag when testing in an INSTANCE_HOME setup.
Example: 'python /path/to/Zope/utilities/testrunner.py -q -i -a'
If your testrunner does not appear to support the -i flag get the one from
'http://zope.org/Members/shh/TestRunner'
Note that the 'custom_zodb.py' magic (3. + 4.) is not available when using
the testrunner.
If you have tests that should not be picked up by the testrunner, make a
'test_suite' method that returns an empty TestSuite.
Note that in Zope 2.7 the testrunner lives in '/path/to/Zope/bin'.
......@@ -33,7 +33,7 @@ class ZopeLite:
triggering the testrunner's "resume layer"
mechanism.
See zope.testing.testrunner-layers-ntd.txt
See zope.testrunner-layers-ntd.txt
'''
ZopeLiteLayer = ZopeLite
......
......@@ -10,7 +10,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Test runner that works with zope.testing.testrunner
"""Test runner that works with zope.testrunner
"""
import unittest
......
......@@ -10,7 +10,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Test runner that works with zope.testing.testrunner
"""Test runner that works with zope.testrunner
"""
import unittest
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment