Skip to content
Snippets Groups Projects

create gui test guide

Merged hparraga requested to merge hparraga/dm-docs:dev into master
+ 273
0
# Data Management Station UI Test Guide
## Running the Test Suite
Be sure the services are running. Services live in
`data-management/etc/init.d`
To run the gui:
```
source etc/dm.setup.sh
dm-station-gui
```
To run the test cases:
```
source etc/dm.setup.sh
cd data-management/src/python/dm/aps_beamline_tools/gui
python dmStationUiTest.py
```
## Coverage
To run with coverage:
```
python -m coverage run dmStationUiTest.py
python -m coverage report
python -m coverage html #detailed html reports
```
Last run coverage: 48%
## Test Scenarios
### Experiment tab
- [X] table contains all experiments
- [X] clicking `add experiment` button switches to `ESAF list` tab if ESAF list
- [X] clicking `add experiment` button switches to `experiment settings` tab if no ESAF list
- [X] clicking `use selected` button switches to `experiment settings` tab with experiment info filled in
- [ ] clicking `delete experiment` button opens `delete experiment` modal
- [X] clicking `refresh` button, actually refreshes
- [X] `use selected` and `delete experiment` buttons disabled when no experiment selected
- [ ] clicking experiment changes row color to blue and enables `use selected` and `delete experiment` buttons
- [X] double clicking experiment opens `experiment settings` tab
### ESAF List tab
- [ ] shows list of ESAFs
- [ ] clicking esaf changes row color to blue
- [ ] double clicking esaf opens `experiment settings` tab with users populated
- [ ] `show details` and `use esaf` buttons disabled if no esaf is selected
- [ ] clicking `continue manually` button opens `experiment settings` tab with no users populated
- [ ] `current year` selection box has years for all experiment and filters list by year
- [ ] clicking `show details` button ?
- [ ] clicking `use esaf` button opens `experiment settings` tab with users populated
- [ ] clicking `use gup db` button changes list to be populated with gups, `use esaf` button to `use gup` button, and year filter option to run filter option.
### Experiment Settings tab
- [ ] clicking `back` button return to `experiment list` tab
- [ ] clicking `file collection stats` button error pop up if not saved
- [ ] clicking `file collection stats`opens `file collection stats` modal
- [ ] clicking `view files` opens `files list` tab
- [ ] can enter name, description, storage root path, additional params
- [ ] able to set date by typing or clicking calendar
- [ ] clicking calendar button opens calendar
- [ ] clicking date on calendar closes calendar
- [ ] choosing an end date which is before the start date opens error pop up and sets end date equal to start date
- [ ] choosing a start date which is after the end date opens error pop up and sets start date equal to end date
- [ ] `type` is populated with experiment types and able to select from drop down
- [ ] default experiment type is correct
- [ ] clicking `save` button will save experiment
- [ ] clicking `save` button with no name opens error pop up
- [ ] clicking `save` button opens save experiment modal
- [ ] clicking `save` button with no changes opens error pop up
- [ ] clicking `save` button opens error pop up for name or path changes if daq or upload in progress
- [ ] clicking `modify users` button opens `modify users` tab
- [ ] clicking `browse` button opens file system view
- [ ] typing in experiment file path shows drop down for `experiment file path`
- [ ] `start daq`, `start upload`, and wrench buttons are disabled if data directory is empty
- [ ] clicking `start daq` button creates, runs new daq with values set in daq system params modal and additional params and switch to `daqs list` tab
- [ ] clicking `start upload` button creates, runs new upload with values set in upload params modal and additional params and switch to `uploads list` tab
- [ ] daq wrench opens daq parameter pop up
- [ ] upload wrench opens upload params
- [ ] users list is by default populated with the station managers
- [ ] modifying the storage root path and clicking the `save` button moves the already collected data to the new path and removes it from the old location
### DAQs tab
- [ ] clicking a row changes color to blue
- [ ] row is green for daq with status 'done', yellow for 'running', red for failed?
- [ ] double clicking row opens upload details tab
- [ ] clicking `start new` button opens the `experiments list` tab
- [ ] clicking `show details` button opens the `daq details` tab
- [ ] clicking `clear selected` button removes selected daq from list. Is it deleted?
- [ ] `Stop selected`, `clear selected`, `show details` buttons disabled if nothing selected
- [ ] `Stop selected` button is disabled if selected daq is not running
- [ ] `Clear selected` button is disabled if selected daq is running
- [ ] clicking `refresh` button actually refreshes
- [ ] Uploads go to uploads tab, daqs go to daq tab and not the other way
- [ ] daqs do not end unless the `stop selected` button is clicked or they reach the maximum run time set in the daq params
### Uploads tab
- [ ] clicking a row changes color to blue
- [ ] row is green for uploads with status 'done', other colors other status?
- [ ] double clicking row opens upload details tab
- [ ] clicking `start new` button opens the `experiments list` tab
- [ ] clicking `show details` button opens the `upload details` tab
- [ ] clicking `clear selected` button removes selected upload from list. Is it deleted?
- [ ] `Stop selected`, `clear selected`, `show details` buttons disabled if nothing selected
- [ ] `Stop selected` button disabled if selected upload not running
- [ ] `Clear selected` button disabled if selected upload running
- [ ] clicking the `refresh` button actually refreshes
### Upload Details tab
- [ ] Check the size is good
- [ ] clicking row changes color to blue
- [ ] clicking `back` button opens `upload list` tab
### DAQ Details tab
- [ ] Check the size is good
- [ ] clicking row changes color to blue
- [ ] clicking `back` button opens `DAQ list` tab
### Workflows tab
- [ ] shows all the existing workflows
- [ ] double clicking on a workflow opens `workflow details` tab
- [ ] single clicking a workflow changes the row color to blue
- [ ] clicking on `inspect` button opens `workflow details` tab
- [ ] clicking `add workflow` button adds a new workflow
- [ ] clicking `delete workflow` button deletes the workflow and removes it from list
### Workflow Details tab
- [ ] shows all the steps
- [ ] clicking a step changes the row color to blue
- [ ] `modify step` button is disabled if no step selected
- [ ] clicking `add step` button opens `add step` modal
- [ ] clicking `modify step` button opens `modify step` modal
- [ ] clicking `back` button returns to `workflows list` tab
### Processing Jobs tab
- [ ] shows list of processing jobs
- [ ] row color is green for done, red for failed, ? for in progess
- [ ] `show details` button is disabled if no job selected
- [ ] clicking `refresh` button updates list when there is a change
- [ ] clicking `show details` button opens `processing job details` tab populated with correct data for that job
- [ ] double clicking on a row opens `processing job details` tab with correct data for that job
- [ ] single clicking on a row changes row to blue, cell to dark blue
### Processing Job Details tab
- [ ] table shows details for selected processing job
- [ ] clicking `refresh` button updates table (create a job which takes some time to run and wait for it to finish)
- [ ] clicking `back` button opens `processing jobs list` tab
### Settings tab
- [ ] shows default refresh intervals all set to 60
- [ ] able to edit all 4 refresh intervals
- [ ] clicking `save` button changes the interval
- [ ] interval of 0 means no refresh
- [ ] hovering over input box opens tooltip
- [ ] inputs outside of range 0-1000 cannot be entered, and only numbers
- [ ] saving an empty input resets its value to 60
### File List tab
- [ ] list shows all files
- [ ] clicking `back` button opens `experiment settings` tab
- [ ] able to add search terms for name, size, date, path
- [ ] clicking `search` button filters list to match search terms
- [ ] clicking `search` button with empty inputs shows entire list
- [ ] clicking file changes row color to blue
- [ ] double clicking file opens `file details` tab
- [ ] `show details` button disabled when no file selected
- [ ] clicking `show details` button opens `file details` tab
- [ ] clicking `update compression` button changes buttons at bottom of tab to `update all`, `compress all`, `decompress all`, and adds check boxes in compression column
- [ ] able to click/unclick compression checkboxes
- [ ] clicking `update all` button compresses or decompresses files based on checkbox value
- [ ] clicking `compress all` button compresses all files
- [ ] clicking `decompress all` button decompresses all files
- [ ] compression changes only apply to files shown after being filetered by search
- [ ] compressing/decompressing a file which is already compressed/decompressed is a noop
- [ ] hovering over compression buttons opens tooltip
- [ ] clicking `back button` removes compression buttons/checkboxes returning to regular `file list` tab
- [ ] clicking `show details` button opens `file details` tab for selected file
- [ ] `go to` button ?? doing it wrong opens bin not found error pop up
### File Details tab
- [ ] shows details for selected file
- [ ] if there are no files, stats show empty value '-' or 0
- [ ] clicking `back` button opens `file list` tab
### Modify Users tab
- [ ] by default, beamline managers are added to user list
- [ ] clicking `back` button opens `experiment settings` tab
- [ ] clicking a user changes row color to blue
- [ ] clicking `<->` button moves selected users to the other list (swap if one selected in both lists)
- [ ] double clicking a user moves them to the other list
- [ ] input fields filter user list
- [ ] clicking `reset` button undoes any changes made since last save
- [ ] clicking `reset` button with a new experiment is a noop
- [ ] clicking `save` button opens `experiment settings` tab with updated users list
- [ ] show proposals, users list, and year select hidden if no ESAFs
- [ ] clicking `show proposals` button switches list to proposals and changes `year` select to `run` select
- [ ] selecting esaf/proposal from select box populates list with users from that esaf/proposal
- [ ] default value for esaf/proposal select box is 'all users'
- [ ] selecting year from year select box changes options in esaf/proposal select box to those from that year, sets selection to default 'all users' and resets user list
### System Parameters for DAQ modal
- [ ] `process hidden files` has true/false options, false default
- [ ] `process existing` has true/false options, false default
- [ ] hovering over each input field opens a tooltip
- [ ] `max runtime` in hours can be set with arrows or typing, numeric only
- [ ] `max runtime` has max value of 10000
- [ ] clicking `browse` button opens file system view and sets destination directory
- [ ] clicking `done` button closes the modal with daq params saved
### System Parameters for Upload modal
- [ ] `process hidden files` has true/false options
- [ ] `reprocess files` has true/false options, false default
- [ ] processing modes are 'file' or 'directory'
- [ ] hovering over each input field opens a tooltip
- [ ] clicking `done` button closes the modal with upload params saved
### File Collection Stats modal
- [ ] shows file stats from database
- [ ] clicking `done` button closes the modal
### Modify Workflow Step modal
- [ ] shows selected step in input field which can be edited
- [ ] (clarify regex buttons behaviour)
- [ ] clicking `save` button saves the modifed workflow step and closes the modal. Changes seen in `workflow steps` list
- [ ] clicking the `cancel` button does not save the modifed workflow step and closes the modal
### Add workflow Step modal
- [ ] (clarify regex buttons behaviour)
- [ ] clicking `save` button saves the new workflow step and closes the modal. new step shown in `workflow steps` list
- [ ] clicking the `cancel` button does not save the new workflow step and closes the modal
### Save Experiment Settings modal
- [ ] displays "are you sure you want to make change" for existing experiment
- [ ] clicking `yes` button saves experiment changes and closes modal
- [ ] clicking `no` button does not save experiment change and closes modal
### Delete Experiment modal
- [ ] says correct number of associated files
- [ ] files are actually removed on clicking `yes` button
- [ ] experiment is removed on ‘yes’
- [ ] files aren’t remove on ‘no’
- [ ] experiment isn’t removed on ‘no’
### DM Unexpected Error modal
- [ ] clicking `show details` button shows the error message
- [ ] clicking `quit` button exits the gui
- [ ] clicking `notify admin` button sends error report to dm-admin email (probably only test manually)
### Integrations
UI robust to connection failures with:
- [ ] UserDsApi
- [ ] EsafApsDbApi
- [ ] ExperimentDsApi
- [ ] FileDsApi
- [ ] ExperimentDaqApi
- [ ] BssApsDbApi
- [ ] ApsUserDbApi
- [ ] FileCatApi
- [ ] WorkflowProcApi
## Issues
- start daq warning pop up gives a whole list of potential problems but it could instead tell you which depending on the error/check that failed
- file collection stats button shows error pop up if not saved, view files is hidden if not saved (inconsistent)
- Implement workflows tab
- File details tab shows the search bar from file list tab at the top
- clicking go to button in file list tab crashes program if input field is empty or non numeric
- Experiment file path for single file upload
- experiment types populate from db
## Questions
Loading