feat: draft out frontend fuzzer - #1193
Draft
martinjrobins wants to merge 4 commits into
Draft
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1193 +/- ##
===========================================
- Coverage 79.98% 71.10% -8.89%
===========================================
Files 162 306 +144
Lines 5947 12096 +6149
Branches 0 1464 +1464
===========================================
+ Hits 4757 8601 +3844
- Misses 1190 2889 +1699
- Partials 0 606 +606 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





Add stateful Playwright exploratory tester for PKPDApp
What it does: Fuzzes the PKPDApp frontend by systematically exploring simulation model state changes, verifying that each action produces exactly the expected semantic diff and nothing else. Detects unexplained parameter shifts, missing API responses, simulation result regressions, and UI error states.
Architecture
snapshot.py+ JS extractor)SimulationModelSnapshotwith 16 domain fields (model config, parameters, outputs, mappings, doses, compound, plots, sliders, sim results)preconditions(snapshot),execute(page, snapshot)via Playwright, andexpected_diff(snapshot). Covers project creation, model selection, parameter editing (5 discrete values each), PK→PD mappings, dose configuration, plot/slider management. Navigation is handled implicitly.explorer.py)(state_hash, action_key)edges and prioritizes unexplored transitionschecker.py).MuiAlert-standardErrorsnackbarsfuzzer.py)FuzzerReportwith categorized findingsFiles changed
Modified:
frontend-v2/src/app/store.ts— 2 lines to exposewindow.__pkpd_store__in dev modefrontend-v2/package.json— addedtest:exploratoryscriptAdded:
frontend-v2/exploratory_tester/(21 files)snapshot.py,checker.py,explorer.py,fuzzer.py,conftest.py,test_fuzzer.pyactions/base.py,actions/navigation.py,actions/project.py,actions/model_config.py,actions/parameters.py,actions/mappings.py,actions/dosing.py,actions/simulation.py,actions/registry.pyjs_extractors/redux_snapshot.jspytest.ini,requirements.txt,README.md,.gitignoreHow to run