Skip to content

Robot Framework example for test library implemented in Python.

License

Notifications You must be signed in to change notification settings

mneiferbag/robot-python-test-library

Repository files navigation

Robot Framework - Test Library Example Python

Licensed under the MIT License. See file LICENSE.

Robot Framework example for test library implemented in Python. Example includes code written in Robot Framework and Python.

CodeQL

How To Run

This example can be run as follows.

Create virtual environment with python -m venv .venv.

Activate virtual environment with source .venv/bin/activate for Linux bash. Or with .venv\Scripts\activate.bat for Windows command line.

Restore packages with pip install -r requirements.txt.

Check installation with robot --version.

Run test with Python keywords using robot --pythonpath src --outputdir ./log ./python_tests/python_keywords.robot.

Command line option --pythonpathis not necessary when you set environment variable PYTHONPATH.

For more information on extending Robot Framework with test libraries written in Python, see chapter Creating test libraries in the user guide.

Links

Tasks

  • Add unit tests
  • Create dictionary variable example
  • Create list variable example