dashboard/docs/testing.md
bashynx fb3c01cdd7 dashPi: a self-hosted home dashboard, its sync server and phone app
The dashboard (Raspberry Pi 3.5" screen + web pages), the end-to-end
encrypted sync mailbox (PHP + SQLite) and the Android companion app
(Flutter), with docs, clean-install checks and screenshots made from
demo data.

Built mostly with an AI coding assistant; not yet reviewed line by line
by a human (see README and SECURITY.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 09:56:19 +02:00

2.6 KiB

Testing

What there is, and what to run before a release. The dashboard has no unit tests yet (see the issues); these are end-to-end checks against clean machines, plus the app's tests.

Check Command Needs Takes
Dashboard from scratch on Debian 12 and 13: install.sh, every plugin on, every page answers, the food search works, a foreign Host is refused, no tracebacks tests/clean-install.sh Docker ~3 min
Sync server from scratch: bin/setup-server.sh with Apache, the printed token works, no token → 401, data/ not reachable; 88 requests at once (uploads, new devices, reads) all succeed and are all kept tests/server-setup.sh (--keep leaves it running on :18080) Docker ~1 min
The phone app: unit and widget tests, static analysis cd app && flutter test && flutter analyze Flutter 3.44 ~1 min
Python, PHP and JS at least parse python3 -m compileall -q dashboard && php -l server/public/index.php && for f in dashboard/static/*.js dashboard/plugins/*/static/*.js; do node --check "$f"; done PHP, Node seconds
The README's screenshots, from a demo dashboard full of made-up data: a quick look at every page python3 docs/screenshots/make.py (--keep leaves the demo running on :8199) Playwright ~2 min
The app's screenshots, which also exercise the whole chain: demo dashboard → server → a fresh app connecting, syncing and showing every section tests/server-setup.sh --keep, make.py --keep, then python3 docs/screenshots/app.py --token <the server's token> an Android emulator (a Pixel-sized AVD), Flutter ~5 min

By hand, before a release

  • Sync end to end: tests/server-setup.sh --keep, then a dashboard (e.g. make.py --keep, or one started from dashboard/) ▸ Settings ▸ General ▸ Sync: server http://127.0.0.1:18080, the printed token, a passphrase. Note the recovery key, then Devices ▸ Add a device ▸ a phone. A second dashboard joins with another device token and the passphrase; a change on one shows on the other after "Sync now".
  • The 3.5" screen: on a Pi with the panel, the service log's screen: line names it (journalctl -u dashboard | grep screen). Without one, Settings ▸ General ▸ Screen shows what it would draw (/api/screen.png?n=Home).
  • The app: a release APK on a phone. Connect by QR, sync, weather with and without places.

Not covered

  • The dashboard's Python logic in isolation (the sync merge, auth, settings validation): no unit tests.
  • ARM: the checks run on x86-64 Debian. The Pi's Raspberry Pi OS is the same Debian with the same packages, but it isn't run here.
  • iOS: the app is Android only.