Show More
@@ -1,13 +1,23 b'' | |||||
|
1 | # IPython Notebook Javascript Tests | |||
|
2 | ||||
1 | Regression tests for the web notebook. These tests depend on |
|
3 | Regression tests for the web notebook. These tests depend on | |
2 | [CasperJS](http://casperjs.org/), which in turn requires |
|
4 | [CasperJS](http://casperjs.org/), which in turn requires | |
3 | a recent version of [PhantomJS](http://phantomjs.org/). |
|
5 | a recent version of [PhantomJS](http://phantomjs.org/). | |
4 |
|
6 | |||
5 | Run the tests: |
|
7 | Run the tests using: | |
|
8 | ||||
|
9 | ``` | |||
|
10 | iptest js | |||
|
11 | ``` | |||
|
12 | ||||
|
13 | For finer granularity, or to specify more options, you can also run the | |||
|
14 | following `casperjs` command | |||
6 |
|
15 | |||
7 | ```sh |
|
16 | ```sh | |
8 | /path/to/bin/casperjs test --includes=util.js test_cases |
|
17 | /path/to/bin/casperjs test --includes=util.js test_cases | |
9 | ``` |
|
18 | ``` | |
10 |
|
19 | |||
11 | The file `util.js` contains utility functions for tests, |
|
20 | The file `util.js` contains utility functions for tests, including a path to a | |
12 | including a hardcoded path to a running notebook server |
|
21 | running notebook server on localhost (http://127.0.0.1) with the port number | |
13 | (http://127.0.0.1:8888 by default). |
|
22 | specified as a command line argument to the test suite. Port 8888 is used if | |
|
23 | `--port=` is not specified. |
@@ -4,7 +4,9 b'' | |||||
4 |
|
4 | |||
5 | // Get the URL of a notebook server on which to run tests. |
|
5 | // Get the URL of a notebook server on which to run tests. | |
6 | casper.getNotebookServer = function () { |
|
6 | casper.getNotebookServer = function () { | |
7 |
r |
|
7 | port = casper.cli.get("port") | |
|
8 | port = (typeof port === 'undefined') ? '8888' : port; | |||
|
9 | return 'http://127.0.0.1:' + port | |||
8 | }; |
|
10 | }; | |
9 |
|
11 | |||
10 | // Create and open a new notebook. |
|
12 | // Create and open a new notebook. |
General Comments 0
You need to be logged in to leave comments.
Login now