Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Client side tests for the notebook #2292

ellisonbg opened this Issue · 7 comments

5 participants


Currently, the client side of the IPython Notebook is not tested in any manner. Originally, Stefan submitted a PR that implemented some basic things using Selenium (#1493). Brian was not very fond of that approach, so we are opening this issue to continue the discussion.


I have been exploring other options, in particular ones that would allow us to:

  1. Easily run tests that span multiple pages.
  2. Manipulate the DOM using jQuery.
  3. Use our custom JavaScript objects on each page.

The best thing I have found so far is PhantomJS and CasperJS:

PhantomJS is a headless WebKit implementation that can be driven using a simple JavaScript API. CasperJS adds nice navigation and testing capabilities on top of PhantomJS. Here is a simple test script I wrote using these:

CasperJS has a a nice test running that can pick up different test files and combine them into a full test suite. Here is the result of running my simple test file:


Has there been any activity on this since last year? We're looking at doing integration testing for our notebook, and I remembered overhearing some discussions about PhantomJS at the dev meeting. A quick review last week pointed to using Ghostdriver + Selenium + PhantomJS (+mocha or whatever JS superstructure) as a way to drive it all from Python, while using JS for the client side stuff.


Yes, PR #4285 lays the groundwork for testing with casperjs

@ivanov ivanov referenced this issue

Notebook javascript test suite using CasperJS #4285

11 of 15 tasks complete

Min - Thanks - this looks perfect.

@takluyver takluyver closed this in #4285
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.