Repository navigation
Test Plan Cross Platform Divergence Modernized
Issue: #2097. Screen: gui/templates/results/platformDivergence.html. BFF: api/platformdivergence/index.php.
This net-new read-only test-plan report answers one question the 1.9.20 screens did not: where do different platforms of the same plan disagree about the latest result of the same test-case version? It joins plan assignments, active platforms, builds and the latest execution per platform into a single Dashio report with divergence classes, KPIs, filters, evidence detail and guarded CSV export.
Legacy reports showed result matrices and platform comparisons as separate views; they did not promote conflicting verdicts for one version to a triage list. platformDivergence groups assigned versions with evidence on at least two platforms and classifies them as mixed_pass_fail, mixed_pass_blocked, mixed_fail_blocked, mixed_unknown or consistent.
- Toolbar: Build, Platform, Divergence, Contains result and Search filters, Refresh, Export CSV, Apply and Close.
- Context panel: plan, project, applied build and platform.
- Verdict banner:
no_data,critical(pass/fail conflicts),watch(blocked conflicts) andhealthy. - KPI strip: versions with evidence, divergent/consistent versions, each mixed class, platform evidences, passed/failed/blocked counts and divergence percentage.
- DataTable: 10 columns — prefixed external ID, test case, suite path, version, platform count, divergence class, passed/failed/blocked counts, per-platform latest evidence and a Details button.
- Detail modal: row summary, latest result on each platform with build/time/notes, and execution history capped at 20 newest rows per platform and 100 overall with a localized truncation note.
- UTF-8 CSV with BOM,
;delimiter, quoted cells, formula-injection guard and localized toast; localized 400/401/403/404/405 state cards and aTLi18nlocale switcher.
- Scope is
testplan_tcversionsassigned to the selected plan; only versions with latest evidence on at least two distinct platforms appear in the table and KPIs. - Active plan platforms are the union of
testplan_platforms.active = 1, platforms used by assigned tcversions and platforms used by plan executions, intersected with the owning project's platforms. This avoids dropping evidence whentestplan_platformsis incomplete (bug #2098). -
build_id = 0andplatform_id = 0mean no filter;platform_id = 0assignments apply to every platform of the plan. - The latest evidence is the execution with the highest id for each (version, platform) pair inside the applied build scope; unknown statuses count as
mixed_unknown. - Rights (
testplan_metrics) are checked on the OWNING project of the plan before the client-suppliedtproject_idassertion; denials returnno_rightand write an AUDIT event.
| Case | HTTP | Code |
|---|---|---|
GET|HEAD action=init|report|detail success |
200 | ok |
Unknown action / missing tplan_id / invalid filter value |
400 | invalid_request |
| Anonymous / expired session | 401 |
not_authenticated / session_expired
|
Missing testplan_metrics on the owning project |
403 |
no_right (AUDIT) |
| Unknown plan / wrong project / unknown version in detail | 404 |
tplan_not_found / project_mismatch / version_not_found
|
| Non GET/HEAD | 405 |
method_not_allowed (Allow: GET, HEAD) |
Security: bffSameOriginGuard() + bffEnforceSession() (the origin guard is a no-op for read-only GET/HEAD), nosniff and no-store headers, integer-only IDs, html_entity_decode on display data, escaped client rendering and AUDIT logging for denials.
-
cfg/reports.cfg.php—platform_divergencereport entry. -
api/aside/index.php— modern report mapping with project/plan context. -
lib/functions/common.php—$actions->platformDivergence. -
gui/templates/i18n/*.json— 90pdv.*+ footer keys in all 10 bundles;ai/verify_i18n_coverage.shpasses 9/9 with 14044 keys. -
locale/*/strings.txt—$TLS_link_report_platform_divergencein all 19 server locales.
- Fixture
tmp/fixtures_2097.php: projectPDV2097, planPDV Plan, 3 platforms, 2 builds, 7 assigned versions and 13 controlled executions (12 included platform evidences); a role-3 viewer is added for the denial path. - Suite
Issue #2097: BFF contract, metrics, divergence classes, filters, browser states, modal, CSV, RO locale, permissions, errors, i18n and Event Viewer all PASS; suite gate reports 34 PASS / 0 FAIL / 0 SKIP. - Bug #2098 (platforms absent from
testplan_platformswere omitted) was filed with thebuglabel, fixed by unioning plan-platform sources, browser-reverified and closed. - PHP lint, JSON validation, i18n coverage and suite gates pass. Event Viewer has 0 new Error/Warning rows after all fixes.
