-
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). - These directions should be followed when making a new release
- Before finalizing a release all the tests must pass
- Clone the repo/checkout release tag
- create new Conda environment/activate Conda env
conda install -y git
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
conda create --name ccsi-foqus -y -c conda-forge python=3.10 pywin32=306
conda activate ccsi-foqus
- install FOQUS and development/testing dependencies
- install PSUADE v1.9
- test psuade executable is working
cd FOQUS
pip install -r requirements-dev.txt
conda install -c conda-forge -c CCSI-Toolset psuade-lite=1.9
psuade --help
pytest --pyargs foqus_lib -x -v -m "not gui"
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
-