Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 1 | # Running Toaster's browser-based test suite |
| 2 | |
| 3 | These tests require Selenium to be installed in your Python environment. |
| 4 | |
| 5 | The simplest way to install this is via pip: |
| 6 | |
| 7 | pip install selenium |
| 8 | |
| 9 | Alternatively, if you used pip to install the libraries required by Toaster, |
| 10 | selenium will already be installed. |
| 11 | |
| 12 | To run tests against Chrome: |
| 13 | |
| 14 | * Download chromedriver for your host OS from |
| 15 | https://code.google.com/p/chromedriver/downloads/list |
| 16 | * On *nix systems, put chromedriver on PATH |
| 17 | * On Windows, put chromedriver.exe in the same directory as chrome.exe |
| 18 | |
| 19 | To run tests against PhantomJS (headless): |
| 20 | |
| 21 | * Download and install PhantomJS: |
| 22 | http://phantomjs.org/download.html |
| 23 | * On *nix systems, put phantomjs on PATH |
| 24 | * Not tested on Windows |
| 25 | |
| 26 | Firefox should work without requiring additional software to be installed. |
| 27 | |
| 28 | The test case will instantiate a Selenium driver set by the |
| 29 | TOASTER_TESTS_BROWSER environment variable, or Chrome if this is not specified. |
| 30 | |
| 31 | Available drivers: |
| 32 | |
| 33 | * chrome (default) |
| 34 | * firefox |
| 35 | * ie |
| 36 | * phantomjs |
| 37 | |
| 38 | e.g. to run the test suite with phantomjs where you have phantomjs installed |
| 39 | in /home/me/apps/phantomjs: |
| 40 | |
| 41 | PATH=/home/me/apps/phantomjs/bin:$PATH TOASTER_TESTS_BROWSER=phantomjs manage.py test tests.browser |