Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 1.57 KB

testing.rst

File metadata and controls

49 lines (31 loc) · 1.57 KB

Automated tests

Kotti uses pytest, zope.testbrowser and WebTest for automated testing.

Before you can run the tests, you must install Kotti's 'testing' extras. Inside your Kotti checkout directory, do:

bin/pip install -e .[testing]

To then run Kotti's test suite, do:

bin/py.test

Using Kotti's test fixtures/funcargs in third party add-ons' tests

To be able to use all of Kotti's fixtures and funcargs in your own package's tests, you only need to "include" them with a line like this in your conftest.py file:

pytest_plugins = "kotti"

Available fixtures

.. automodule:: kotti.tests
   :members:
   :noindex:

Continuous Integration

Kotti itself is tested against Python versions 3.5 and 3.6 as well as SQLite, mySQL and PostgreSQL (in every possible combination of those) on every commit (and pull request) via the excellent GitHub / Travis CI hook.

If you want your add-on packages' to be tested the same way with additional testing against multiple versions of Kotti (including the current master), you can add a .travis.yml file to your repo that looks similar to this: https://raw.github.com/Kotti/kotti_media/master/.travis.yml.