A Jupyter kernel for interactive acceptance-test-driven development with the Robot Framework
Project description
Robot Framework kernel for Jupyter notebooks
Robot Framework language support for Jupyter notebooks.
Requires Python 3.6 or later.
Log | Report -links on existing notebooks are only active on trusted notebooks.
Try Robot Framework kernel at Binder
Jupyter Notebook: https://mybinder.org/v2/gh/datakurre/robotkernel/master?urlpath=tree/example.ipynb
Jupyter Lab: https://mybinder.org/v2/gh/datakurre/robotkernel/master?urlpath=lab/tree/example.ipynb
Install Robot Framework kernel
$ pip install robotkernel
$ python -m robotkernel.install
Install Robot Framework kernel from Python 3 notebook
!pip install robotkernel
!python -m robotkernel.install
After refreshing the notebook, it is possible change the kernel to Robot Framework kernel or create a new notebook with Robot Framework kernel.
Executing notebooks
It is possible to export test suites from Jupyter Notebook or Lab user interface (into traditional .robot files), but it is also possible to execute saved Jupyter notebook as such:
$ jupyter nbconvert --to notebook --execute example.ipynb
This will stop the execution at first failing test case.
After execution with errors, to get a notebook with execution logs saved, an extra flag --ExecutePreprocessor.allow_errors=True must be set:
$ jupyter nbconvert --ExecutePreprocessor.allow_errors=True --to notebook --execute example.ipynb
Nix-shell (https://nixos.org/nix/)
$ nix-shell -E 'import (fetchTarball https://github.com/datakurre/robotkernel/archive/master.tar.gz + "/shell.nix")' --run "jupyter notebook"
$ nix-shell -E 'import (fetchTarball https://github.com/datakurre/robotkernel/archive/master.tar.gz + "/shell.nix")' --run "jupyter lab"
Add --arg sikuli true to include SikuliLibrary.
Add --arg vim true to enable vim bindings.
Local installation and development
See also: http://jupyter.readthedocs.io/en/latest/install.html
Create and activate clean Python virtual environment:
$ venv myenv $ source myenv/bin/activate
Install Jupyter:
$ pip install --upgrade pip setuptools $ pip install jupyter
Clone this kernel:
$ git clone https://github.com/datakurre/robotkernel.git $ cd robotkernel
Install the kernel into virtualenv in develop mode:
$ python setup.py develop
Install the kernel into jupyter:
$ python -m robotkernel.install
Launch the jupyter:
$ jupyter notebook
Reloading the kernel reloads the code.
Changelog
0.4.0 (2018-09-26)
Add support for robotframework 3.1a2 [datakurre]
Add support for reporting RPA suites with “Tasks” instead of “Tests” [datakurre]
0.3.5 (2018-09-25)
Update README with notebook execution instructions [datakurre]
0.3.4 (2018-09-25)
Update README [datakurre]
0.3.3 (2018-09-25)
Note on README that Log | Report -links require trusting the notebook [datakurre]
Fix to wrap test execution updates with ‘<pre>’ for better readability [datakurre]
0.3.2 (2018-09-25)
Change to always send display data updates in text/html to workaround a bug that caused ‘undefined’ to be rendered in JupyterLab [datakurre]
0.3.1 (2018-09-24)
Update README [datakurre]
0.3.0 (2018-09-23)
First release. [datakurre]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for robotkernel-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62d41a9fceca7c48cf08f2d8434409164965eedccc1c5352c89add3a1667758b |
|
MD5 | a93cd2bef58e401c957cfcad1131394c |
|
BLAKE2b-256 | 1d419bd402d4cbb6ba470d3c7468390e79a6aa5706607a07ed00369cd94776e8 |