These tests check that a BioVeL Portal is running OK.
The tests require Python 3 and Selenium.
$ sudo apt-get install python3 python3-pip
$ sudo pip3 install selenium requests
$ sudo apt-get install python3 python3-setuptools
$ sudo easy_install3 pip
$ sudo pip3 install selenium requests
Download and install the Python 3.4 MSI Installer from http://www.python.org/
Open a command window and run:
C:\Python34\python.exe -m pip install selenium requests
Note, the tests must be run from the top-level directory (the directory containing this README file).
Create a file config.py
containing a URL for the front page of the portal,
and a username and password for a registered user. See config.py.example
for information.
To run all the tests:
$ ./test.sh
On Windows, run:
C:\Python34\python.exe -m unittest discover
To run an individual test, run the Python file for the test directly, e.g.:
$ python3 testRConnection.py
On Windows, run:
C:\Python34\python.exe testRConnection.py
Selenium InternetExplorer driver does not work with Internet Explorer 11 yet.
Selenium using Firefox 27 on Windows 7 causes Firefox to hang. The problem does not appear when using Firefox manually, so this seems to be a Selenium problem.
Firefox is supported out of the box. Tests will be run using Firefox and any additional browsers that are enabled. i.e. each test may be run multiple times, using different browsers.
Other browsers typically require some additional setup to work with Selenium.
See http://code.google.com/p/selenium/wiki/ChromeDriver
See http://code.google.com/p/selenium/wiki/InternetExplorerDriver
This is currently untested. The current drivers do not support IE11.
See http://code.google.com/p/selenium/wiki/SafariDriver
This is currently untested.
The tests can be divided into 3 types:
- General portal tests - simple tests that check that the portal itself is working.
- testSignInWithPassword - sign in with existing registered user
- Simple workflow tests - simple workflow runs to check that basic facilities and services are running. These tests are uploaded and deleted during the test.
- testRConnection - check that very simple RShell works with R on localhost
- BioVeL workflow tests - run each BioVeL workflow with particular parameters and datasets to check that they are working. This attempts to use the public workflows already installed in the portal (unless marked "upload").
- tutorial_DRW_A
- standard_ENM_default - Ecological Niche Modelling workflow default inputs
- testMPM_upload - Matrix Population Modelling