Advice for testing Jupyter front-end extension?

44 views
Skip to first unread message

Titus Barik

unread,
Sep 25, 2018, 12:19:54 PM9/25/18
to jup...@googlegroups.com
Hi all,

Is there any advice or guidance for how to test Jupyter (classical) front-end extensions? For instance, I'm not sure how to start and isolate a Jupyter instance just for testing that doesn't inherit properties or configuration from the shared or user's home directory.

Thanks,

Titus

--
Titus Barik, PE <ti...@barik.net>

Nicholas Bollweg

unread,
Sep 26, 2018, 12:12:13 AM9/26/18
to Project Jupyter
Using the notebook's own base class is a great place to start:


It does a number of things to ensure you have a clean setting, like populating HOME. It's harder to not include things that are installed into the environment in which the test is running, but with virtual/conda envs (or something like tox) you can be pretty sure.

Once you have a server: the notebook tests are currently moving away from js-based tests towards python tests with selenium directly


I have been using Robot Framework and it's selenium wrapper a lot recently for testing JupyterLab, but it could certainly test classic:


Here are some (admittedly pretty crazy) tests:


And some of the output, which includes lovely screenshots and timings:

If you want to go the extra meta-mile, a new Robot kernel was released this week:

Reply all
Reply to author
Forward
0 new messages