Avida-ED-App-Builder/TEST_PLAN.md

47 lines
2.0 KiB
Markdown

# Avida-ED App Test Plan
This builder packages the browser apps, so tests should cover two separate layers:
1. Browser app behavior in the canonical repositories.
2. Packaged executable behavior in this builder.
## Canonical App Tests
The canonical v3 and v4 repositories should own browser-level behavior tests. Current coverage:
- Load the app through Playwright with `?avidaTest=1`.
- Wait for the Avida worker to start.
- Import a minimal default experiment.
- Verify `webGridData` and `webPopulationStats` messages arrive.
- Assert no browser errors were captured.
- Exercise the missing-parent-series population-stats regression directly.
Next browser tests to add:
- Inject an ancestor sequence, step several updates, and verify population count changes.
- Trace an organism with `webOrgTraceBySequence` and verify snapshots are produced.
- Simulate the freezer offspring delete/rename path that previously caused stale DOM removal.
- Import a saved workspace containing multiple ancestors and verify all injection responses are handled.
- Export CSV from empty and populated page states.
## Packaged App Tests
The packaged executable should be validated without depending on visual inspection. The Rust wrapper already logs:
- Local HTTP server URL.
- HTTP 200/404 responses.
- WebView page-load start/finish.
- JavaScript errors, unhandled rejections, and proxied `console.error` output.
Use `tests/smoke_appimage.sh` to run a built AppImage briefly, capture those signals, and fail if the app never loads or JavaScript errors appear.
Recommended Linux smoke matrix:
- `Avida-ED-v3-Linux-x86_64.AppImage`
- `Avida-ED-v4-Linux-x86_64.AppImage`
- Run under `xvfb-run` in CI when no display is available.
- Run once with software GL environment variables for older GPUs:
`LIBGL_ALWAYS_SOFTWARE=1 WEBKIT_DISABLE_COMPOSITING_MODE=1`.
The AppImage smoke test intentionally treats timeout exit as success after the app has loaded, because the app is expected to keep running until the window is closed.