Using the notebook's own base class is a great place to start:

https://github.com/jupyter/notebook/blob/master/notebook/tests/launchnotebook.py

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

https://github.com/jupyter/notebook/blob/master/notebook/tests/selenium/test_save_as_notebook.py

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

http://robotframework.org/
http://robotframework.org/SeleniumLibrary/

Here are some (admittedly pretty crazy) tests:

https://github.com/deathbeds/jyve/blob/master/tests/acceptance/Kernels.robot
https://github.com/deathbeds/jupyterlab-fonts/blob/master/tests/acceptance/Editor.robot

And some of the output, which includes lovely screenshots and timings:
https://deathbeds.github.io/jyve/log.html

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

https://pypi.org/project/robotkernel/

On Tuesday, September 25, 2018 at 12:19:54 PM UTC-4, Titus Barik wrote:
>
> 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 <[email protected] <javascript:>> 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/a1fb1bf2-0f58-46a5-a13a-7731b714f79f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to