About ZWiki's testing process. See also: ZopeWiki:TestingZope , some types of tests

Unit testing

Writing a unit test for Zwiki can seem boring and be challenging, but it is an extremely effective way to help the project. Once written, a test adds value day after day, and their cumulative impact is huge. I run tests before checkin, before releases, before and after changes, and any time I've forgotten where things stand.

Zwiki's unit tests are standard pyunit-style unit tests, in ZWiki/tests/test*.py. There are various ways to run these tests; zope/utilities/testrunner.py is the norm. You can see how I run them against various zope versions by looking at the rtest rules in the Makefile . I had the devil of a time getting all imports working with all invocation methods and zope versions; I think I've achieved that now except you may need to set the SOFTWARE_HOME and INSTANCE_HOME environment variables

Some statistics on test coverage should go here. Zwiki has a bunch of unit tests, but needs many more. Alas it's rather difficult to write unit tests for a zope 2 product due to the high complexity and runtime dependencies of the zope environment. The mock objects approach has helped; some useful mock objects are defined in tests/support.py . I've found the ZopeTestCase? tool runs tests slower, but it's a more complete environment and is probably the way to go.

I often find it too disruptive to jump between code and tests. Zwiki's test modules (source files) now correspond one to one with the main code modules, I will probably make test methods correspond to code methods, and I'd like to set up an editor macro which will flip between code and tests at a single keypress.

Functional testing

Uptime and netcraft are useful services for monitoring public sites. See the links on FrontPage.

Tres Seaver's FunctionalTests? product provides support for writing functional tests for a zope app, allowing access to zope internals via ZEO. Despite this promise it was poorly documented/buggy and too complicated last I checked. Hopefully it has been maintained since.

The SiteTests are the latest attack on this problem.

ZwikiAndFit are a new tool which should allow us to develop zwiki functionality and wiki content tests right here in the wiki. We need some clever fit fixtures to enable this.

Release testing

Here is an old WikiTemplatePrereleaseChecklist?