-
Notifications
You must be signed in to change notification settings - Fork 54
FOQUS Automated test Suites
Joshua Boverhof edited this page Aug 6, 2024
·
12 revisions
- Unless otherwise noted, all commands should be run from the repository root (i.e. the parent of the
.git
directory).
# create new Conda environment
conda create --name ccsi-foqus -c conda-forge python=3.10 pywin32=306
conda install -y git
# activate Conda env
conda activate ccsi-foqus
# Clone the repo/checkout release tag
git clone https://github.com/CCSI-Toolset/FOQUS.git
git fetch --all --tags --prune
git checkout tags/3.22.0 -b branch-3.22.0
# install dev dependencies
pip install -r requirements-dev.txt
# install PSUADE
conda install -c conda-forge -c CCSI-Toolset psuade-lite
# check that psuade is installed
psuade --help
pytest --pyargs foqus_lib -x -v -m "gui" --qtbot-slowdown-wait-ms=100
- This should take a few minutes
- The
-x
flag makes pytest exit immediately after the first failure
- The
- The FOQUS main window will be opened and run through the actions defined in the tests "by itself" (i.e. no manual intervention should be necessary)
- The action currently being executed will be displayed as a red rectangle around the action's target widget and a label with the action's name
- Specify a different value for
--qtbot-slowdown-wait-ms
(in ms) to run the tests so that they appear slower or faster - There should now be a
.pytest-artifacts
subdirectory, containing these two subdirectories:-
foqus_working_dir
, containing the files produced by FOQUS during the test run -
screenshots
, containing the screenshots that were generated automatically before and after each action -
snapshots
, containing a set of specialized "data dumps" of a parent widget and all its children, used for debugging issues with locating widgets
-