Files
EVOLV/test/README.md
Rene De Ren 0cab98c196
Some checks failed
CI / lint-and-test (push) Has been cancelled
Pumping-station demo overhaul + cross-node test harness + bumps
Submodule bumps land the deadlock fix (state.js residue unpark + MGC
optimalControl dispatch reorder) and pumpingStation stopLevel hysteresis.

- Renames examples/pumpingstation-3pumps-dashboard →
  pumpingstation-complete-example with regenerated flow.json. New
  dashboard groups, demand-broadcast wiring, S88 placement rule
  applied, ui-chart trend-split and link-channel naming follow
  .claude/rules/node-red-flow-layout.md.
- New cross-node test harness under test/: end-to-end-pumpingstation
  drives PS + MGC + 3 pumps + physics simulator end-to-end and
  verifies the ~5/15 min cycle.
- Adds Grafana provisioning dashboards (pumping-station.json) and a
  helper sync-example.sh script for export/import to live Node-RED.
- Docker entrypoint + settings + compose tweaks for the persistent
  user dir layout used by the demo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 11:21:21 +02:00

31 lines
1.4 KiB
Markdown

# EVOLV cross-node test harness
This folder hosts end-to-end tests that wire **multiple** EVOLV domain
classes together the same way Node-RED would, but in pure Node.js so the
simulation runs deterministically and every internal value is inspectable.
**Scope rule.** Tests that exercise a single node's behaviour live in that
node's submodule under `nodes/<name>/test/`. Tests here cross node
boundaries — they instantiate `pumpingStation` + `machineGroupControl` +
multiple `rotatingMachine`s together and drive the wired graph.
Examples of what belongs where:
| Concern | Lives in |
|---|---|
| MGC optimizer combination choice for a given demand | `nodes/machineGroupControl/test/integration/optimizer-combination-choice.integration.test.js` |
| Pump curve interpolation across head values | `nodes/rotatingMachine/test/integration/...` |
| PS hysteresis logic with mocked groups | `nodes/pumpingStation/test/integration/shifted-ramp-end-to-end.test.js` |
| **Whole plant**: PS basin level + MGC dispatch + 3 pumps + physics simulator | `test/end-to-end-pumpingstation.test.js` (this folder) |
Run:
```
node --test test/end-to-end-pumpingstation.test.js
```
The harness in `lib/wiring.js` builds the parent-child relationships
Node-RED would build via `registerChild`, lets you advance a controllable
clock, and `lib/recorder.js` records every measurement / state / demand
event into a flat trace.