##// END OF EJS Templates
Merge remote-tracking branch 'upstream/master'
Doug Blank -
r15284:752f0935 merge
parent child Browse files
Show More
@@ -1,23 +1,28 b''
1 # IPython Notebook Javascript Tests
1 # IPython Notebook JavaScript Tests
2
2
3 Regression tests for the web notebook. These tests depend on
3 This directory includes regression tests for the web notebook. These tests
4 [CasperJS](http://casperjs.org/), which in turn requires
4 depend on [CasperJS](http://casperjs.org/), which in turn requires a recent
5 a recent version of [PhantomJS](http://phantomjs.org/).
5 version of [PhantomJS](http://phantomjs.org/).
6
6
7 Run the tests using:
7 The JavaScript tests are organized into subdirectories that match those in
8 `static` (`base', `notebook`, `services`, `tree`, etc.).
9
10 To run all of the JavaScript tests do:
8
11
9 ```
12 ```
10 iptest js
13 iptest js
11 ```
14 ```
12
15
13 For finer granularity, or to specify more options, you can also run the
16 To run the JavaScript tests in a single subdirectory (`notebook` in this
14 following `casperjs` command
17 case) do:
15
18
16 ```sh
19 ```
17 /path/to/bin/casperjs test --includes=util.js test_cases
20 iptest js/notebook
18 ```
21 ```
19
22
20 The file `util.js` contains utility functions for tests, including a path to a
23 The file `util.js` contains utility functions for tests, including a path to
21 running notebook server on localhost (http://127.0.0.1) with the port number
24 a running notebook server on localhost (http://127.0.0.1) with the port
22 specified as a command line argument to the test suite. Port 8888 is used if
25 number specified as a command line argument to the test suite. Port 8888 is
23 `--port=` is not specified.
26 used if `--port=` is not specified. When you run these tests using `iptest`
27 you do not, however, have to start a notebook server yourself; that is done
28 automatically.
@@ -178,15 +178,16 b' class JSController(TestController):'
178 TestController.__init__(self)
178 TestController.__init__(self)
179 self.section = section
179 self.section = section
180
180
181
182 def launch(self):
181 self.ipydir = TemporaryDirectory()
183 self.ipydir = TemporaryDirectory()
182 self.nbdir = TemporaryDirectory()
184 self.nbdir = TemporaryDirectory()
183 print("Running notebook tests in directory: %r" % self.nbdir.name)
185 print("Running %s tests in directory: %r" % (self.section, self.nbdir.name))
184 os.makedirs(os.path.join(self.nbdir.name, os.path.join(u'sub ∂ir1', u'sub ∂ir 1a')))
186 os.makedirs(os.path.join(self.nbdir.name, os.path.join(u'sub ∂ir1', u'sub ∂ir 1a')))
185 os.makedirs(os.path.join(self.nbdir.name, os.path.join(u'sub ∂ir2', u'sub ∂ir 1b')))
187 os.makedirs(os.path.join(self.nbdir.name, os.path.join(u'sub ∂ir2', u'sub ∂ir 1b')))
186 self.dirs.append(self.ipydir)
188 self.dirs.append(self.ipydir)
187 self.dirs.append(self.nbdir)
189 self.dirs.append(self.nbdir)
188
190
189 def launch(self):
190 # start the ipython notebook, so we get the port number
191 # start the ipython notebook, so we get the port number
191 self._init_server()
192 self._init_server()
192 js_test_dir = get_js_test_dir()
193 js_test_dir = get_js_test_dir()
General Comments 0
You need to be logged in to leave comments. Login now