[[PageOutline(2-5,Contents,pullout)]] = Trac Functional Tests Automated functional tests are integrated in the test suite, see TracDev/UnitTests. They are formed by executing a series of unit tests. For detailed informations about functional tests, see: - apidoc:dev/testing - source:branches/0.12-stable/TESTING-README (old) These functional tests do not replace manual testing. == Extra dependencies * [pypi:twill] — simple scripting language for Web browsing * [http://lxml.de/validation.html lxml] — used for XHTML validation Those packages can be installed with `pip`: {{{#!sh pip install twill==0.9.1 pip install lxml }}} Note that one test requires that the `svn` program can be executed. === Windows specific dependencies There's an additional dependency on Windows: * [http://carey.geek.nz/code/python-fcrypt fcrypt] (Trac < 1.2) * [http://pythonhosted.org/passlib passlib] (Trac >= 1.2) The usual install method will work: {{{#!sh pip install http://www.carey.geek.nz/code/python-fcrypt/fcrypt-1.3.1.tar.gz }}} {{{#!sh pip install passlib }}} If `fcrypt` is not installed, you will get the following error when running the tests with Trac 0.12 - 1.0: {{{ Warning: cannot parse password for user "crypt" without the "crypt" module }}} or this warning starting with Trac 1.2: {{{ The crypt module is not found. Install the passlib package from PyPI. }}} ==== lxml on Windows `pip install lxml` should just work. Since lxml 3.4, pre-compiled binaries are available as wheels. Before lxml 3.4, pip tried installing from source releases which require more dependencies like Cython, libxml2 and libxslt, which can be difficult to install on Windows. == Running the tests To run the functional tests, execute: {{{ PYTHONPATH=. python ./trac/tests/functional/__init__.py }}} or: {{{#!sh make functional-test }}} This is starting from Trac 0.12, as Trac 0.11 has no Makefile. == Discussion / Feedback Something to consider here: using twill's wsgi_intercept capability, and making these part of the unit tests.