Saltar a contenido

EPPA Video Parity Report

Date: 2026-05-05 Video: sources/drive/Presentacion-Posturografia.mp4 Duration: 00:08:42.97 Extracted frames: docs/ui-video-frames/frame-001.jpg through frame-009.jpg

Observed MATLAB Workflow

  1. Marker capture opens an image and immediately asks the operator to select one or more views.
  2. Marker capture has a left control area for marker selection by view and a marker coordinate table.
  3. Analysis screens use a stable three-zone layout:
  4. Left tools: open image, import markers, calibration grid, reference lines, clear image, manual measurement tools.
  5. Center workspace: patient image, grilla, calibration/reference line, green anatomical markers.
  6. Right results: table of region, variable, measurement, diagnosis, plus region-specific calculation buttons.
  7. Lateral views add tangent capture controls for head/back/sacrum related measurements.
  8. Export opens Excel with one sheet per view and clinical columns: region, variable, measurement, diagnosis.

Current Web Test Coverage

Existing Cypress tests cover:

  • Navigation from home to marker capture and four analysis views.
  • Basic image upload for each view.
  • Basic CSV marker import attempts.
  • Basic marker capture dialog behavior.
  • Mouse coordinate indicator in one flow.
  • Analysis marker tables after CSV imports in anterior, posterior, lateral right, and lateral left.
  • Exported web CSV header, row count, and representative clinical variables.
  • Video-derived reference frames exist in docs/ui-video-frames/ and are checked by Cypress.
  • Visual baseline screenshots for home, marker capture, and four analysis screens in desktop-video, tablet, and mobile viewports.
  • Posterior analysis API calls for four regions with HTTP 200 assertions.
  • Lateral .mat import with HTTP 200 response and patient ID assertion.
  • Lateral cervico-cefalica API calls for right and left views with HTTP 200 assertions.
  • Selected visible numeric result values in anterior, posterior, lateral right, and lateral left analysis tables.

Coverage gaps:

  • MATLAB-style Excel workbook parity is not implemented; current web export is CSV and is validated as CSV.
  • Cypress numeric assertions cover selected visible table outputs; full per-region MATLAB numeric parity still belongs in Python fixture validation.
  • Manual measurement tools are not covered end to end.
  • "Punto no visible" and missing marker diagnostics are not covered.
  • Lateral tangent workflow is not covered.

E2E Run 2026-05-05

Command: PYTHON=/tmp/labis-eppa-venv311/bin/python npm run test:e2e

Result: 53 passing, 0 failing.

Passing specs:

  • 01-marker-capture.cy.ts: 10/10 passing.
  • 02-analysis-anterior.cy.ts: 8/8 passing.
  • 03-analysis-posterior.cy.ts: 2/2 passing.
  • 04-analysis-lateral.cy.ts: 5/5 passing.
  • 05-complete-workflow-mia.cy.ts: 9/9 passing.
  • 06-video-parity-baseline.cy.ts: 19/19 passing.

Resolved failures:

  • 03-analysis-posterior.cy.ts: posterior complete workflow now runs cervico-cefalica, tronco-columna, pelvica, and pie-tobillo with API status 200 assertions and at least 7 result rows.
  • 04-analysis-lateral.cy.ts: lateral right .mat import now requires HTTP 200, marker payload, and patient ID M; lateral analysis calls now require HTTP 200 and visible result rows.
  • 02-analysis-anterior.cy.ts, 03-analysis-posterior.cy.ts, 04-analysis-lateral.cy.ts, and 05-complete-workflow-mia.cy.ts: marker import checks now require visible markers-table rows instead of conditional logs.
  • Result exports are validated in Cypress by locating the downloaded CSV and asserting Región,Variable,Medición,Diagnóstico, row counts, and representative variables.
  • 06-video-parity-baseline.cy.ts: captures 18 visual baseline screenshots and validates every PNG has expected dimensions, file size, and sampled color diversity.
  • 02-analysis-anterior.cy.ts, 03-analysis-posterior.cy.ts, and 04-analysis-lateral.cy.ts: assert selected visible measurements after frontend rounding:
  • anterior head inclination: -1.40
  • posterior head inclination: 0.55
  • posterior pelvis inclination: 0.11
  • lateral right head-horizontal angle: 49.00
  • lateral left head-horizontal angle: 48.65

Artifacts were generated under ignored Cypress output folders:

  • cypress/videos/
  • cypress/screenshots/
  • cypress/downloads/

The test:e2e script now starts FastAPI and Next.js together, waits for health checks, cleans Cypress output folders before each run, uses Node 20 for Cypress stability on this Mac, retries only the known Cypress configFile/EACCES process crash, and shuts down both services on exit.

E2E Stability Note 2026-05-06

A later full local Cypress run reached the marker-capture spec and then spent more than two hours in Cypress video/ffmpeg processing for 01-marker-capture.cy.ts. The suite uses screenshot, CSV, and PNG inspection artifacts for parity evidence, so Cypress video recording is disabled in cypress.config.ts to prevent video compression from blocking full-suite completion. Failure screenshots remain enabled.

Validation after disabling video:

  • PYTHON=/tmp/labis-eppa-venv311/bin/python npm run test:e2e -- --spec cypress/e2e/01-marker-capture.cy.ts: 10 passing in 40 seconds.
  • PYTHON=/tmp/labis-eppa-venv311/bin/python npm run test:e2e: 53 passing in 2 minutes 49 seconds.

Required E2E Parity Suite

  1. Home parity
  2. Assert EPPA identity.
  3. Assert marker capture and all four view actions.
  4. Capture desktop/tablet/mobile screenshots. Done by 06-video-parity-baseline.cy.ts.

  5. Marker capture parity

  6. Upload image.
  7. Select view.
  8. Select marker.
  9. Place marker.
  10. Assert marker table row with X/Y.
  11. Delete row.
  12. Save/export marker set.

  13. Analysis view parity

  14. For each of anterior, posterior, lateral right, lateral left:

    • Upload fixture image.
    • Import marker fixture.
    • Assert marker table is present and non-empty.
    • Run each available regional calculation.
    • Assert results table is present and non-empty.
    • Capture screenshot.
  15. MATLAB numeric parity

  16. Reuse fixtures in tests/fixtures.
  17. Verify calculated measurements against MATLAB expected values.
  18. Keep tolerance at the function-specific value, defaulting to 1e-10.

  19. Export parity

  20. Trigger export.
  21. Validate web CSV headers and columns.
  22. Add Excel workbook parity if the web app adds .xlsx export later.
  23. Validate one exported value per region from fixtures.

Playwright E2E Suite 2026-05-07

Command: PYTHON=/tmp/eppa-venv/bin/python npx playwright test

Result: 13 passing, 0 failing.

Passing specs:

  • analysis-parity.spec.ts: 3/3 passing (anterior, posterior, lateral numeric parity).
  • export-parity.spec.ts: 3/3 passing (anterior, posterior, lateral derecha CSV export validation).
  • visual-baseline.spec.ts: 7/7 passing (home, marker capture, 4 analysis views, video frames check).

Coverage additions:

  • CSV export download validation: asserts Región,Variable,Medición,Diagnóstico header, minimum row counts, and representative clinical variables for anterior (cervico-cefalica), posterior (all 4 regions), and lateral derecha.
  • Visual baseline screenshots saved to playwright-results/baseline-*.png for home, marker capture, and all four analysis views with imported markers.
  • Source video frame existence check (9 frames in docs/ui-video-frames/).
  • CI artifact upload step for playwright-report/ and playwright-results/ with 14-day retention.

Remaining Gaps

  • Manual measurement tools are not covered end to end (see #11).
  • "Punto no visible" and missing marker diagnostics are not covered.
  • Lateral tangent workflow is not covered (see #11).
  • MATLAB-style Excel workbook parity is not implemented (see #13).
  • Stable data-testid hooks for every MATLAB-equivalent command still partial.