1 # Setup Test Environment
3 To test changes and contribute to Nominatim you should be able to run
4 the test suite(s). For many usecases it's enough to create a Vagrant
5 virtual machine (see `VAGRANT.md`), import one small country into the
10 Nominatim supports a range of PHP versions and PHPUnit versions also
11 move fast. We try to test against the newest stable PHP release and
12 PHPUnit version even though we expect many Nominatim users will install
13 older version on their production servers.
15 * Python 3 (https://www.python.org/)
16 * behave test framework >= 1.2.5 (https://github.com/behave/behave)
17 * nose (https://nose.readthedocs.org)
18 * pytidylib (http://countergram.com/open-source/pytidylib)
19 * psycopg2 (http://initd.org/psycopg/)
23 sudo apt-get install -y phpunit php-codesniffer php-cgi
24 pip3 install --user behave nose
28 pip3 install --user behave nose
30 sudo apt-get install -y composer php-cgi php-cli php-mbstring php-xml zip unzip
32 composer global require "squizlabs/php_codesniffer=*"
33 sudo ln -s ~/.config/composer/vendor/bin/phpcs /usr/bin/
35 composer global require "phpunit/phpunit=8.*"
36 sudo ln -s ~/.config/composer/vendor/bin/phpunit /usr/bin/
41 sudo dnf install -y php-dom php-mbstring
42 pip3 install --user behave nose
44 composer global require "squizlabs/php_codesniffer=*"
45 sudo ln -s ~/.config/composer/vendor/bin/phpcs /usr/bin/
47 composer global require "phpunit/phpunit=^7"
48 sudo ln -s ~/.config/composer/vendor/bin/phpunit /usr/bin/
50 ## Run tests, code linter, code coverage
52 See `README.md` in `test` subdirectory.