https://github.com/geonode/geonode-selenium
End to end tests with Selenium
https://github.com/geonode/geonode-selenium
Last synced: 7 months ago
JSON representation
End to end tests with Selenium
- Host: GitHub
- URL: https://github.com/geonode/geonode-selenium
- Owner: GeoNode
- License: gpl-3.0
- Created: 2019-02-12T14:05:25.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-06-10T20:51:16.000Z (over 5 years ago)
- Last Synced: 2025-01-02T11:43:40.670Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 803 KB
- Stars: 0
- Watchers: 29
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# geonode-selenium
Testing [GeoNode](http://geonode.org/) with [Selenium](https://www.seleniumhq.org/).
# Requirements
Mandatory:
- [Python 3](https://www.python.org/)
- A browser supported by a [Selenium WebDriver](https://www.seleniumhq.org/projects/webdriver/) (Firefox is used by default)
Optional:
- [Docker](https://www.docker.com/) (required by `test-docker.sh`)
- [GeoNode sourcecode](https://github.com/GeoNode/geonode) (required by `test-docker.sh`)
- [fades](https://github.com/PyAr/fades) (to automatically manage virtualenvs)
# Setup
## Dependencies
If using virtualenv:
```bash
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
```
If using fades:
```bash
$ pip3 install --user fades
```
## Selenium WebDriver (Gecko)
```bash
$ 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
## Data
```bash
$ wget https://download.osgeo.org/geotiff/samples/made_up/ntf_nord.tif -P data
```
# Usage
If GeoNode is running:
```bash
$ ./test.sh
```
If GeoNode is not running (warning: it could delete existing Docker volumes created by SPCgeonode):
```bash
$ git clone https://github.com/GeoNode/geonode.git
$ ./test-docker.sh
```
Set `GEONODE_REPOSITORY` to specify a different path.
## Find the commit that introduced a bug
```bash
$ 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
```