Disclaimer: This is mostly an experiment. This wouldn't ever replace your existing Selenium-stack, because Zombie.js, even when it works, is just an another browser with its own quirks.
- a UNIX like environment
- Node.js must be installed
- npm must be installed
- coffee-script, zombie and async packages must be installed using npm
- coffee-executable must be found on the path
The requirements should be filled, when you can run the following command on a console without it printing anything (returning any errors):
$ echo "require 'zombie'; require 'async'"|coffee -s
Start with defining a functional testing fixture with ZServer (that will run your Plone on localhost:55001 by default):
from plone.app.testing import PLONE_FIXTURE from plone.app.testing import FunctionalTesting from plone.testing import z2 FUNCTIONAL_TESTING = FunctionalTesting( bases=(PLONE_FIXTURE, z2.ZSERVER_FIXTURE), name="PloneFixture:ZServer")
Note that every parsed doctest-example (a line starting with >>>) is executed separately, but you may use Node.js' global to make variables available between doctest-examples.