Testing GeoNode with Selenium.
Mandatory:
- Python 3
- A browser supported by a Selenium WebDriver (Firefox is used by default)
Optional:
- Docker (required by
test-docker.sh
) - GeoNode sourcecode (required by
test-docker.sh
) - fades (to automatically manage virtualenvs)
If using virtualenv:
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
If using fades:
$ pip3 install --user fades
$ tag=v0.24.0
$ wget https://github.com/mozilla/geckodriver/releases/download/$tag/geckodriver-$tag-linux64.tar.gz -O- |
tar zx -C $HOME/bin
Other releases are available from: https://github.com/mozilla/geckodriver/releases/latest
$ wget https://download.osgeo.org/geotiff/samples/made_up/ntf_nord.tif -P data
If GeoNode is running:
$ ./test.sh
If GeoNode is not running (warning: it could delete existing Docker volumes created by SPCgeonode):
$ git clone https://github.com/GeoNode/geonode.git
$ ./test-docker.sh
Set GEONODE_REPOSITORY
to specify a different path.
$ git checkout -b new-test
$ # write a new test or extend an existing one
$ cd geonode/
$ export GEONODE_REPOSITORY=$(pwd)
$ git bisect start
$ git bisect bad
$ git bisect good $COMMIT
$ git bisect run ../test-docker.sh