forked from jupyter-server/jupyter_server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add robots for acceptance level testing (jupyter-server#252)
* add robots * subclass jupyter robots * working robots * ignore robots logic for test coverage score * fix command for running robots in make file * add dependency on jupyter robot framework * try a different test image * setup chromedriver * try installing chrome * install chromedriver from source * install chrome * try different image * remove webdriver * top level docker image in rio * see if new docker image is used * build chrome and chromedriver from scratch * different installing command for chrome * wrong package name in rio * just install driver * install webdriver with new docker image * remove robots from rio * update manifest to robots
- Loading branch information
Showing
14 changed files
with
370 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
[run] | ||
omit = data_studio_jupyter_extensions/tests/* | ||
data_studio_jupyter_extensions/config/* | ||
data_studio_jupyter_extensions/robots/* | ||
conftest.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
*** Settings *** | ||
|
||
Library data_studio_notebook_service_gateway.robots.NotebookService | ||
Library data_studio_jupyter_extensions.robots.DataStudioNotebooks | ||
|
||
*** Keyword *** | ||
|
||
Launch Data Studio Notebooks | ||
Setup Notebook Service | ||
${server} = Start New Jupyter Server | ||
Wait for Jupyter Server to be ready ${server} | ||
Authenticate with Jupyter Server ${server} | ||
|
||
Teardown Data Studio Notebooks | ||
Terminate all Jupyter Servers | ||
Teardown Notebook Service | ||
|
||
*** Test Cases *** | ||
|
||
Talk to Notebook Service | ||
[Setup] Launch Data Studio Notebooks | ||
Open JupyterLab headlesschrome | ||
Launch a new JupyterLab Document Python 3 (ipykernel) | ||
Wait Until JupyterLab Kernel Is Idle | ||
Add and Run JupyterLab Code Cell print("hello world") | ||
Wait Until JupyterLab Kernel Is Idle | ||
Page Should Contain hello world | ||
[Teardown] Teardown Data Studio Notebooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
data_studio_jupyter_extensions/robots/DataStudioNotebooks.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from JupyterLibrary.core import JupyterLibrary | ||
from JupyterLibrary.core import JupyterLibraryListener | ||
|
||
from .DataStudioNotebooksServerKeywords import DataStudioNotebooksServerKeywords | ||
|
||
|
||
component_classes = [DataStudioNotebooksServerKeywords] | ||
|
||
|
||
class DataStudioNotebooks(JupyterLibrary): | ||
"""JupyterLibrary is a Jupyter testing library for Robot Framework.""" | ||
|
||
def __init__( | ||
self, | ||
timeout=5.0, | ||
implicit_wait=0.0, | ||
run_on_failure="Capture Page Screenshot", | ||
screenshot_root_directory=None, | ||
**kwargs | ||
): | ||
"""JupyterLibrary can be imported with several optional arguments. | ||
- ``timeout``: | ||
Default value for `timeouts` used with ``Wait ...`` keywords. | ||
- ``implicit_wait``: | ||
Default value for `implicit wait` used when locating elements. | ||
- ``run_on_failure``: | ||
Default action for the `run-on-failure functionality`. | ||
- ``screenshot_root_directory``: | ||
Location where possible screenshots are created. If not given, | ||
the directory where the log file is written is used. | ||
""" | ||
super(JupyterLibrary, self).__init__( | ||
timeout=timeout, | ||
implicit_wait=implicit_wait, | ||
run_on_failure=run_on_failure, | ||
screenshot_root_directory=screenshot_root_directory, | ||
**kwargs | ||
) | ||
self.add_library_components( | ||
[Component(self) for Component in component_classes] | ||
) | ||
self.ROBOT_LIBRARY_LISTENER = JupyterLibraryListener() |
Oops, something went wrong.