Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Client side tests for the notebook #2292

Closed
ellisonbg opened this Issue · 7 comments

5 participants

@ellisonbg
Owner

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.

@ellisonbg
Owner

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:

http://phantomjs.org/
http://casperjs.org/

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:

https://gist.github.com/3329929

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:

http://i.imgur.com/4MSNU.jpg

@takluyver
Owner
@ellisonbg
Owner
@fperez
Owner
@sychan

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.

@minrk
Owner

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

@ivanov ivanov referenced this issue
Merged

Notebook javascript test suite using CasperJS #4285

11 of 15 tasks complete
@sychan

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.