If you don't yet have a .venv directory (which will typically be the case on first checkout)
python3 -m venv .venvSetup your virtual environment and install dependencies:
Unix - bash shell
source .venv/bin/activate
pip install -r requirements.txt
playwright installWindows - command prompt
.venv\Scripts\activate
pip install -r requirements.txt
playwright installBy default, the functional tests run in headless mode:
behaveRun all functional tests WITH the @wip tag
behave --tags @wip --no-skippedNOTE: In old versions of PowerShell you may have to place the @wip tag (or any other commands that include an @ sign) inside quotes like this: behave --tags '@wip' --no-skipped
Run all functional tests EXCEPT those with the @future tag
behave --tags ~@future --no-skippedTo show the browser while running and slow it down by 1,000 ms per call so a human can see what is happening:
Unix - bash shell
HEADLESS=false SLOW_BY=1000 behaveWindows - command prompt
set HEADLESS=false
set SLOW_BY=1000
behave
set HEADLESS=
set SLOW_BY= Windows - PowerShell
$env:HEADLESS = "false"
$env:SLOW_BY = "1000"
behave
$env:HEADLESS=$null
$env:SLOW_BY=$nullYou can also change the location of the application you are testing using the BASE_URL environment variable.
This is used to point at the site on different environments such as development, test, production, etc. By default, this is set to http://localhost:5063/
Unix - bash shell
BASE_URL="http://example.org:1234" behaveWindows - command prompt
set BASE_URL="http://example.org:1234"
behave
set BASE_URL=Windows - PowerShell
$env:BASE_URL="http://example.org:1234"
behave
$env:BASE_URL=Sometimes it is useful to show stdout (the output from print statements) when running the functional tests.
To do that pass the --no-capture flag as shown below:
behave --no-capture