From 575f07b8e5989843b88338de67afbcbc134b2740 Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Tue, 19 May 2020 13:09:54 -0700 Subject: [PATCH] tests: functional: Document running tests in parallel Signed-off-by: Joseph Nuthalapati Reviewed-by: Sunil Mohan Adapa --- HACKING.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/HACKING.md b/HACKING.md index 4922eb195..54cc4ebd1 100644 --- a/HACKING.md +++ b/HACKING.md @@ -213,10 +213,11 @@ Buster (or later). ```bash host$ pip3 install splinter host$ pip3 install pytest-splinter +host$ pip3 install pytest-xdist # optional, to run tests in parallel +host$ sudo apt install firefox host$ sudo apt install python3-pytest-bdd host$ sudo apt install xvfb python3-pytest-xvfb # optional, to avoid opening browser windows -host$ sudo apt install firefox -host$ sudo apt install smbclient # optional, to test samba +host$ sudo apt install smbclient # optional, to test samba ``` - Install the latest version of geckodriver. It is usually a single binary which @@ -275,6 +276,13 @@ If xvfb is installed and you still want to see browser windows, use the vm$ py.test-3 --no-xvfb -m mediawiki --include-functional ``` +Tests can also be run in parallel, provided you have the pytest-xdist plugin +installed. + +``` +$ py.test-3 -n 4 --dist=loadfile --include-functional -m essential +``` + ## Building the Documentation Separately FreedomBox Service (Plinth) man page is built from DocBook source in the `doc/`