Skip to content

Testing strategy (desktop baseline)

This page documents a testing approach that can be applied to HDAT’s calculation engine even if the UI is desktop-based.

Test layers

  • Unit tests: pure formulas and helpers (Tc methods, ARF clamp, SCS excess rainfall, Manning helpers).
  • Component tests: hydrology engine end-to-end for one catchment; culvert/channel/gully/BOQ module runs.
  • Regression / golden tests: fixed projects with stored expected outputs and tolerance checks.

Golden dataset recommendations

Create a case matrix that covers:

  • small/medium/large catchments
  • Rational-only and SCS-only scenarios
  • multiple culvert shapes and slopes
  • multiple channel shapes/materials
  • gully grade + sag cases

What to snapshot

  • inputs (settings + catchment properties + IDF rows)
  • intermediate series (for SCS: rainfall increment, excess increment, UH, convolution)
  • final outputs (peaks, H/D, depths, quantities)

Release gate (practical)

Block release if:

  • parity drift exceeds tolerance
  • critical computational branch changes without documented reason
  • inputs/outputs cannot be reproduced from stored project artifacts