This document assumes the Forge was installed as documented in the installation guide.
First enter virtualenv created previously
source ./venv/bin/activate
To run all tests using virtualenv created previously
sudo ./venv/bin/pytest
To run just subset of tests from one file
sudo ./venv/bin/pytest tests/dhcp/hooks/leases_cmds/test_lease_get_by.py
Additional useful options are:
using tests tags:
sudo ./venv/bin/pytest -m ddns
sudo ./venv/bin/pytest -m v4
sudo ./venv/bin/pytest -m 'v4 and v6'
using test keywords:
sudo ./venv/bin/pytest -k 'test_status_get'
Increased verbosity for debugging tests results
sudo ./venv/bin/pytest -vv
Forge system tests require root privileges to open DHCP ports, mange DHCP servers and capturing traffic via tcpdump.
You can follow step-by-step guide to set up simple environment and run some tests. It's located in example.md.