Repository navigation
Test Plan Execution Frequency Modernized
Tracking issue: #1988 (net-new 2.0.1 report; TestLink 1.9.20/2.0.1 reported the latest status of a test case but never how often it is actually re-executed).
TestLink stores every execution of every assigned test-case version, but no 1.9.20 screen answered "how often is each assigned test case executed?". The execution dashboard and results reports only summarise the latest status, so an over-tested plan (cases re-run again and again) and an under-tested plan (cases never executed) looked exactly the same on the report list.
This read-only report units each assigned testplan_tcversions link and shows
its execution count, re-runs, builds, testers, first/last run and a
never_run / single / rerun / high_rerun verdict against a configurable
high-re-run threshold, plus a per-suite roll-up. A plan-wide verdict banner
(no_data / under_tested / over_tested / healthy) makes the overall
execution-frequency profile obvious.

gui/templates/results/execFrequency.html
- Dashio teal header, dark toolbar (project, plan, build and platform selects, high-re-run threshold, Apply, Refresh, Export CSV, Close).
- Report-context panel: test project, test plan, build filter, platform filter.
- Verdict banner:
no_data(no assignments),under_tested(>= 20% never run),over_tested(>= 20% high re-run),healthy(otherwise), with the counts and percentages that justify it. - 9 KPI cards: assigned units, executed, never run (+ %), total executions, re-runs, avg per executed, high re-run, testers involved, builds involved.
- Per-case DataTable (13 columns, searchable, sortable): test case, external id, suite path, version, platform, executions, re-runs, builds, testers, first run, last run, last status, verdict — most-executed first.
- Per-suite roll-up DataTable: units, executed, never run, executions, high re-run, average executions.
- CSV export
execution-frequency-<plan>.csv(UTF-8 BOM,;separator, spreadsheet-formula neutralisation), localised verdict labels. - Localized state cards for 400 / 401 / 403 / 404 / 405; locale switcher; all
labels in
efq.*keys.



api/execfrequency/index.php — plain PHP, session auth, bffSameOriginGuard,
bffEnforceSession, JSON I/O, Cache-Control: no-store.
| Action | Method | Parameters |
|---|---|---|
init |
GET|HEAD |
tplan_id, optional tproject_id
|
report |
GET|HEAD |
tplan_id, optional tproject_id, build_id, platform_id, rerun_threshold
|
Rights: testplan_metrics on the owning test project of the plan. The
client-supplied tproject_id is only an assertion: it is checked against the
plan's owning project and can never widen the query.
Order of operations: resolve the plan (opaque 404 when unknown) → check
testplan_metrics on its owning project (403 no_right, logged at AUDIT) →
only then assert the client tproject_id (404 project_mismatch), so the
endpoint is not a plan/project existence oracle for unentitled callers.
Error contract: not_authenticated / session_expired (401), no_right
(403), tplan_not_found / project_mismatch (404), invalid_request (400),
method_not_allowed (405).
- The unit of the report is one assigned
testplan_tcversionslink (version on a platform), not the test case. - Executions are counted inside the plan, optionally scoped to one build and/or
platform. A link with
platform_id = 0covers every execution platform of the version, so its executions on all platforms count. -
reruns = executions - 1. - Per-unit verdict:
never_run(0),single(1),rerun(2..threshold-1),high_rerun(>= threshold).rerun_thresholdis clamped to 2..100 (default 4). - Plan verdict precedence:
no_data>under_tested(never-run share >= 20%)over_tested(high-rerun share >= 20%) >healthy.
-
cfg/reports.cfg.php—exec_frequencyreport entry. -
api/aside/index.php— the Reports submenu link. -
api/resultsnav/index.php—exec_frequency→ the modern URL. -
lib/functions/common.php—$actions->execFrequency. -
locale/*/strings.txt(19 locales) —$TLS_link_report_exec_frequency.
efq.* (71 keys) + footers.execFrequency in all 10 client bundles;
ai/verify_i18n_coverage.sh passes 9/9.
- Fixture
tmp/fixtures_1988.php(6 assigned units: never run, single, rerun, high re-run, platform-scoped, all-platform; an empty plan; a role-3 user withouttestplan_metrics). - Browser EN/RO: default scope (6 units / 5 executed / 13 executions /
healthy), build + threshold re-scope (
over_tested), CSV alignment, empty plan, no-right state card; console clean; Event Viewer 0 new Error/Warning. - Suite
Issue #1988appended totmp/TLU_Test_Cases.md.