You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is really a question. I want to have real automated end to end testing for widget implementations and I don't know how to do it yet properly, so..
Can you use voila to build automatic end-to-end tests for interactive Jupyter widgets?
A test might work like this:
test initializes and starts a notebook using voila in a subprocess using a headless browser and waits until the notebook is "done". (X)
the notebook Python kernel creates one or more widgets and makes them do something.
the widgets (asynchronously) call back to the Python kernel to make testable artifacts (like output images or other evidence that the widget works) saved to files.
when the widgets are done they send a signal indicate that they are done asynchronously to the Python kernel.
the Python kernel observes that the widgets are done and terminates the voila subprocess and all descendent processes. (XX)
the test notices that voila has terminated and validates the file artifacts to confirm that the widgets work as expected.
The parts I'm unsure of are marked (X) and (XX). Please comment.
Can you start voila using a headless browser now?
What is the appropriate mechanism for stopping the voila process and all descendent processes?
Note that widget communication is asynchronous, so the cells of a notebook may "finish" before widgets have even initialized -- stopping after the cells have executed will not work for testing widgets. Also, you can't use nbconvert for this purpose because nbconvert doesn't interact with widgets "normally".
The text was updated successfully, but these errors were encountered:
I'm not sure voila is the right way to do this, jupyter/nbconvert#901 goes a bit into this direction. But I think many people want this, to at least see if the widgets render, and possibly have a bot post screenshots when something went wrong.
cc @martinRenou
This is really a question. I want to have real automated end to end testing for widget implementations and I don't know how to do it yet properly, so..
Can you use voila to build automatic end-to-end tests for interactive Jupyter widgets?
A test might work like this:
The parts I'm unsure of are marked (X) and (XX). Please comment.
Note that widget communication is asynchronous, so the cells of a notebook may "finish" before widgets have even initialized -- stopping after the cells have executed will not work for testing widgets. Also, you can't use nbconvert for this purpose because nbconvert doesn't interact with widgets "normally".
The text was updated successfully, but these errors were encountered: