= Trac Functional Tests = Functional tests are integrated in the test suite (see TracDev/UnitTests). For detailed informations about functional tests, see: - source:branches/0.12-stable/TESTING-README (old) - source:trunk/doc/dev/testing.rst (more recent) == Extra dependencies == * [http://twill.idyll.org/ twill] — simple scripting language for Web browsing * [http://codespeak.net/lxml/ lxml] — used for XHTML validation Those packages can be installed with `easy_install`: {{{ easy_install twill easy_install lxml }}} Note that one test requires that the `svn` program can be executed. === Platform dependent notes ==== Windows For `lxml`, the latest version is not always easy-installable for Windows, so you will have to download a somewhat "older" version from PyPI: http://pypi.python.org/pypi/lxml/2.3 There's also an additional dependency on Windows: [http://carey.geek.nz/code/python-fcrypt/ fcrypt] The usual install method will work: {{{ easy_install fcrypt }}} If `fcrypt` is not installed, you'll get the following error when running the tests with 0.11: {{{ "Exception: Unable to setup admin password" }}} or this warning starting with 0.12: {{{ Warning: cannot parse password for user "crypt" without the "crypt" module }}} == Running the tests To run the functional tests, execute: {{{ PYTHONPATH=. python ./trac/tests/functional/__init__.py }}} or: {{{ make functional-test }}} (only starting from Trac 0.12, as Trac 0.11 has no Makefile) == !Discussion/Future == Something to consider here: using twill's wsgi_intercept capability, and making these part of the unittests.