Test Plan - Battery Simulation Tool
Version: 0.3.0
Date: 2026-03-08
Status: Active prototype
1. Purpose
Define the initial verification approach for the Battery Simulation Tool MVP.
2. Test Focus
- CSV parsing reliability
- column-detection fallback behavior
- deterministic simulation output
- KPI correctness for known fixtures
- annualized savings and payback calculation correctness
- chart rendering without runtime errors
- synchronized time-range behavior across linked time-series charts
- graceful handling of invalid files or settings
- export correctness for summary output
3. Test Levels
3.1 Unit Tests
- parser normalization helpers
- cumulative meter-to-interval conversion helpers
- interval simulation rules
- KPI calculations
- export serialization helpers
3.2 Integration Tests
- upload -> parse -> map -> simulate -> render flow
- HomeWizard tariff-split cumulative CSV -> combined interval series -> simulate flow
- invalid CSV -> validation message flow
- manual price input -> KPI update flow
- settings change -> automatic rerun flow
- acquisition cost input -> payback KPI update flow
- export action -> downloaded summary content flow
3.3 Browser Smoke Tests
- page loads without console errors
- upload UI is visible
- run action is available
- setting tooltips are present and readable
- KPI section renders after valid run
- Plotly charts render after valid run
- cumulative battery chart renders after valid run
- capacity sweep chart renders after valid run
- manual mapping UI appears when the parser cannot resolve the minimum column set
- changing one valid setting reruns the analysis without pressing the run action
4. Core Scenario Fixtures
Recommended initial fixtures:
- simple day with no surplus
- simple day with surplus-only charging
- day with charge and later discharge
- HomeWizard tariff-split cumulative meter export with hand-checkable deltas
- invalid/missing-column CSV case
- larger annual sample for performance smoke
- known fixture with hand-verifiable savings totals
5. Acceptance Checks
The MVP should be considered ready when:
- one common HomeWizard-style CSV path works reliably
- one scenario can be configured and simulated
- KPI results are internally consistent
- interactive charts render and remain usable
- the tool explains assumptions and privacy behavior clearly
- exported summary data matches on-screen KPI totals