blob: 63e8169c166f603318c63a647bf079a892586dac [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001# Running Toaster's browser-based test suite
2
3These tests require Selenium to be installed in your Python environment.
4
5The simplest way to install this is via pip:
6
7 pip install selenium
8
9Alternatively, if you used pip to install the libraries required by Toaster,
10selenium will already be installed.
11
12To 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
19To 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
26Firefox should work without requiring additional software to be installed.
27
28The test case will instantiate a Selenium driver set by the
29TOASTER_TESTS_BROWSER environment variable, or Chrome if this is not specified.
30
31Available drivers:
32
33* chrome (default)
34* firefox
35* ie
36* phantomjs
37
38e.g. to run the test suite with phantomjs where you have phantomjs installed
39in /home/me/apps/phantomjs:
40
41PATH=/home/me/apps/phantomjs/bin:$PATH TOASTER_TESTS_BROWSER=phantomjs manage.py test tests.browser