This guide takes you from a fresh clone to running the sample tests locally.
- Python 3.13+
- Node.js 22+
- Git
- System-level installs (e.g.,
sudo apt-get install ..., Node setup,sudo npx playwright install-deps) can be run from any directory. - Project-specific steps (e.g.,
git clone,cd robot-framework-template, creating/activatingvenv,pip install -r requirements.txt,rfbrowser init,robot ...) should be run from the project root directory unless noted otherwise.
If Python 3.13 is not installed, either install from the official downloads or use your distro's packages.
- Official downloads: https://www.python.org/downloads/
- Ubuntu/Debian example:
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt-get update
sudo apt-get install -y python3.13 python3.13-venv
python3.13 --versionInstall the current LTS (22.x) from NodeSource and verify:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
node -v
npm -vIf apt-get update fails due to a third‑party PPA
Some systems have extra PPAs that break apt-get update during the NodeSource setup. If you see errors like "does not have a Release file", disable the offending PPA and retry:
# example: remove deadsnakes PPA if it is invalid for your Ubuntu codename
sudo add-apt-repository -r ppa:deadsnakes/ppa || true
sudo rm -f /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa*.list
sudo apt-get update
# rerun NodeSource setup and install Node.js 22
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
node -v && npm -vAlternative: install Node.js via nvm (user‑space)
If you prefer to avoid apt entirely, use nvm and install Node 22 LTS into your user profile:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
nvm install 22
nvm use 22
node -v && npm -vgit clone https://github.com/BVisagie/robot-framework-template
cd robot-framework-templatepython3 -m venv venv
source venv/bin/activate
python --version # should be 3.13+Upgrade pip:
pip install --upgrade pippip install -r requirements.txt
# Optional dev tools
pip install -r requirements-dev.txtIf Node 22+ is not yet installed, complete the steps in "Installing Node.js 22+" above. Then install Playwright system deps:
- If Node was installed system-wide (NodeSource):
sudo npx playwright install-depsIf you see "sudo: npx: command not found", ensure npm/npx is available for root:
sudo apt-get install -y nodejs || true
sudo apt-get install -y npm || true
# open a new shell or re-login, then retry
sudo npx playwright install-deps- If Node was installed via nvm (user-space), preserve PATH when using sudo:
sudo -E env "PATH=$PATH" npx playwright install-depsInitialize Robot Framework Browser (downloads browser engines for tests):
rfbrowser initpre-commit installNotes:
- Ensure your virtual environment is active (
source venv/bin/activate). - Install dev tools first:
pip install -r requirements-dev.txt. - If you see "pre-commit: command not found", try:
python -m pre_commit install. - Verify:
pre-commit --version.
Run lint/format checks:
robocop check .
robocop format .Headless mode is the default.
- API tests:
robot --outputdir output tests/project_json_placeholder/api_tests- UI tests (Wikipedia demo):
robot --outputdir output tests/project_wikipedia/ui_tests- HEADLESS_BROWSER=true|false (default true)
- WIKIPEDIA_BASE_URL to override the default https://www.wikipedia.org/
- Database (examples only): DB_HOST, DB_PORT, DB_SERVICE_NAME, DB_USER, DB_PASSWORD, DB_API_MODULE
Example:
export HEADLESS_BROWSER=true
export WIKIPEDIA_BASE_URL=https://www.wikipedia.org/- If browsers fail to launch, re-run
rfbrowser initafter ensuring Node 22+ andsudo npx playwright install-depsare installed. - For DB placeholders, tests are tagged
do_not_runby default and are documentation-only.