QGIS plugin manual test plan

This document describes how to perform a full manual test on the Ribasim QGIS plugin. Known shortcomings and issues can be documented here. Bugs can be reported on GitHub.

1 Clean slate tests

Before starting with data, perform the following tests to see if the plugin doesn’t result in any errors.

1.1 Enable and disable

  • Open QGIS and navigate to “Plugins > Manage and Install Plugins…”: The plugin management window opens.
  • Navigate to “Installed”: Ribasim plugin is in the list (enabled).
  • Disable the Ribasim plugin: Ribasim plugin panel hides if it was open, Ribasim button hides from navigation toolbar.
  • Enable the Ribasim plugin: Ribasim button shows on the navigation toolbar.

2 Model tab button interaction tests

2.1 Set Ribasim home window

  • Click the Ribasim toolbar button and select “Set Ribasim home”: Dialog opens and shows the current Ribasim home value and action buttons (Change…, Unset, Cancel).
  • Click “Change…”, select a valid Ribasim home directory, and confirm: Success message appears and the configured value is updated.
  • Open “Set Ribasim home” again and click “Unset”: Success message appears and the configured Ribasim home is cleared.

2.2 Open model twice

  • Open QGIS and ensure that the Ribasim plugin is installed and enabled.
  • Click the Ribasim button on the QGIS toolbar: file navigation window pops up.
  • Choose an existing model from the generated_testmodels folder.
  • Press OK: The model layers appear in the layer panel and on the map.
  • Click the Ribasim button on the QGIS toolbar: file navigation window pops up.
  • Open the same model again: A new layer group is added to the layers panel.

Intended behavior: The same model is loaded twice, but there is only a connection on the last loaded model when interacting with the plugin.

3 Map interaction tests

3.1 Node selection on map triggers table selection

  • Open QGIS and ensure that the Ribasim plugin is installed and enabled.
  • Choose an existing model from the generated_testmodels folder in the file explorer.
  • Drag the TOML file onto QGIS: The model layers appear in the layer panel and on the map.
  • Select the node layer, and make a subselection of nodes on the map: Nodes are highlighted in yellow, including their links.
  • Open the Link attribute table: The highlighted rows are those with a from/to node_id that was selected.
  • Open any non-spatial attribute table: The highlighted rows are those with a node_id that was selected.

4 Result inspection tests

4.1 Run a model from the context menu

  • Load the HWS model at models/hws.toml (slow enough to observe progress).
  • Right-click the model group in the layer panel: Context menu shows “Run Ribasim model”.
  • Click “Run Ribasim model”: Output dialog opens with title “Ribasim simulation - hws/ribasim”.
  • Wait for simulation: Progress bar updates in QGIS status bar, output streams to dialog.
  • On completion: Model reloads with results, Results group contains Flow/Basin layers.

4.2 Progress bar and task manager

  • Start a simulation as above.
  • Check QGIS status bar (bottom): Progress indicator shows percentage.
  • Click the progress indicator: Task manager panel opens showing the task.

4.3 Close dialog without terminating

  • Start a simulation.
  • Close the output dialog (X button) while running: Dialog closes, simulation continues in background.
  • Check task manager: Task still running.

4.4 Cancel simulation

  • Start a simulation on models/hws.
  • Open task manager and cancel the task: Task is removed from manager.
  • Check output dialog: Shows “Ribasim simulation - … was canceled.”.

4.5 Prevent duplicate simulations

  • Start a simulation.
  • While running, right-click the same model and click “Run Ribasim model”: Warning message “Simulation already running for hws/ribasim”.
  • Load a different model and run it: Second simulation starts normally.

5 Plot widget tests

5.1 Open the plot widget

  • Run models/hws or another model that produces results.
  • After results load, click the Ribasim button dropdown on the toolbar and select “Timeseries results”: The plot dock panel opens, showing the “Result” dropdown defaulting to “flow” and “Variable” defaulting to “flow_rate”.

5.3 Basin timeseries on node selection

  • Switch the “Result” dropdown to “basin”: Variable changes to “level”, placeholder says “Select Basin nodes on the map to plot timeseries.”.
  • Select one or more Basin nodes on the map: Level timeseries appear for the selected nodes.

5.4 Variable selection

  • With Basin nodes selected and the plot showing, click the “Variable” button: A dropdown menu with checkboxes appears listing variables (e.g. level, storage).
  • Check multiple variables: Plot updates to show all checked variables, legend shows “variable — #node_id”.
  • Uncheck all variables: Plot hides, placeholder reappears.

5.5 Concentration results

  • Run a model that produces concentration.nc results.
  • Switch the “Result” dropdown to “concentration”: Variables list shows substance names.
  • Select Basin nodes: Concentration timeseries appear per substance.

5.6 Plot clears on deselection

  • With a plot showing, deselect all features (click an empty area on the map): Plot clears and the placeholder reappears.

6 Tutorial tests

6.1 Perform tutorial in documentation

Go through the tutorial as described in the How-to guide.