LEFT | RIGHT |
(no file at all) | |
| 1 =============== |
| 2 Browser Testing |
| 3 =============== |
| 4 |
| 5 The Juju GUI project uses browser testing to assure compatibility with a |
| 6 range of browsers. The testing involves launching a copy of the Juju |
| 7 GUI charm and then running tests against it. |
| 8 |
| 9 |
| 10 Setting up |
| 11 ========== |
| 12 |
| 13 Environment |
| 14 ----------- |
| 15 |
| 16 In order to run the tests you must have a Juju environment named |
| 17 "juju-gui-testing". Consult the Juju documentation for how to set up |
| 18 an environment. |
| 19 |
| 20 |
| 21 Building |
| 22 -------- |
| 23 |
| 24 The test script has dependencies that are provided for by the Makefile. |
| 25 Run an unadorned "make" command to set up those dependencies. |
| 26 |
| 27 |
| 28 Running the tests |
| 29 ================= |
| 30 |
| 31 First, ensure that the juju-gui-testing environment is not running (has |
| 32 been destroyed and not bootstrapped). Then run the all-in-one script:: |
| 33 |
| 34 bin/test-charm |
| 35 |
| 36 The script will deploy the charm, wait until the charm's unit has |
| 37 entered a "running" state, and then run the tests against the charm. |
| 38 |
| 39 By default the tests will run against the most recent release of Juju |
| 40 GUI. To specify another branch to test against, pass it in like so:: |
| 41 |
| 42 bin/test-charm lp:~user/juju-gui/my-great-branch |
| 43 |
| 44 Note that only "lp:" and "http:" URLs are accepted by the charm at the |
| 45 time of this writing. |
| 46 |
| 47 |
| 48 Specifying the browser |
| 49 ====================== |
| 50 |
| 51 You can choose which browser will be used to run the tests by setting |
| 52 the JUJU_GUI_TEST_BROWSER environment variable. See test/browser.py for |
| 53 the available options. |
| 54 |
| 55 |
| 56 Running an individual test |
| 57 ========================== |
| 58 |
| 59 If there is a particular browser test you want to run in isolation or |
| 60 against an already-running copy of the application. You can also |
| 61 specify the browser to use as above. For example, this command will run |
| 62 the given test against the UI stage using IE:: |
| 63 |
| 64 $ APP_URL=http://uistage.jujucharms.com:8080/ \ |
| 65 JUJU_GUI_TEST_BROWSER=ie bin/py test/test_charm_running.py |
LEFT | RIGHT |