FDocTest (How-To)
Steps to get started:
- Use a clean/missing Data.fs
- Create a manager with the name "mgr", password "mgrpw", and grant
the zope.Manager role.
- Install tcpwatch.
- Create a temporary directory to record tcpwatch output.
- Run tcpwatch using:
tcpwatch.py -L 8081:8080 -s -r tmpdir
(the ports are the listening port and forwarded-to port; the
second need to match the Zope configuration)
- In a browser, connect to the listening port and do whatever needs
to be recorded.
- Shut down tcpwatch.
- Run the script src/zope/app/testing/dochttp.py:
python2.4 src/zope/app/testing/dochttp.py tmpdir > somefile.txt
- Edit the generated text file to add explanations and elide
uninteresting portions of the output.
- In a functional test module (usually ftests.py), import
FunctionalDocFileSuite from zope.app.testing.functional and
instantiate it, passing the name of the text file containing
the test.