Repository navigation
Test Case Keyword Coverage Modernized
Issue: #2099. Screen: gui/templates/results/tcKeywordCoverage.html. BFF: api/tckeywordcoverage/index.php.
This net-new read-only project report answers a question the 1.9.20 keyword screens did not: which test cases in a project actually carry design keywords, how many keywords each one has, and where the tagging gaps are. It joins the project's test-case hierarchy, latest tcversions and project-scoped keyword links into a Dashio report with KPIs, verdict banners, coverage/status filters, a detail modal and guarded CSV export.
The legacy keyword bar chart reported keyword usage across plan executions; it never surfaced design-level keyword coverage of the test-case specification. tcKeywordCoverage classifies the latest version of each project test case as untagged, single (one keyword) or covered (two or more) and promotes untagged cases to a triage list.
- Toolbar: Test project selector, Refresh, Export CSV, Coverage filter (
All,Untagged,One keyword,Two or more), Status filter (All,Active,Inactive) and Close. - Context panel: test project, test-case count, tagged count and suites involved.
- KPI strip: test cases, tagged, untagged, coverage %, keyword links, suites involved, single-keyword and multi-keyword counts.
- Verdict banner:
no_data,untagged,at_risk(< 50% coverage),watch(< 100%) andcomplete. - DataTable: 9 columns — prefixed external ID, test case, suite path, version, keyword count, assigned keyword names, active/inactive status, coverage verdict and a Details button.
- Detail modal: row summary, full keyword list with counts and a safe
target="_blank" rel="noopener noreferrer"link to the moderntcView.htmlscreen. - UTF-8 CSV with BOM,
;delimiter, quoted cells, formula-injection guard and localized filenamekeyword-coverage-<project_id>.csv; localized 400/401/403/404/405 state cards and aTLi18nlocale switcher.
- Scope is the selected (or session) test project; each test case contributes only its highest-numbered tcversion.
- Keyword links are joined on
testcase_keywords.keyword_id = keywords.idwithkeywords.testproject_id = <project>; keyword rows from other projects can never inflate coverage. - Suite path is built from
nodes_hierarchyup to (but excluding) the project node; missing paths render as an em dash. -
mgt_view_tcis checked on the addressed project before data resolution; denials return403 no_rightand write an AUDIT event. - Anonymous/expired sessions receive
401and the screen redirects tologin.php?note=expired; wrong HTTP methods receive405withAllow: GET, HEAD.
| Case | HTTP | Code |
|---|---|---|
GET|HEAD action=projects|init|report|detail success |
200 | ok |
Unknown action / invalid tproject_id / missing or invalid tcversion_id
|
400 | invalid_request |
| Anonymous / expired session | 401 |
not_authenticated / session_expired
|
Missing mgt_view_tc on the addressed project |
403 |
no_right (AUDIT) |
| Unknown project / tcversion outside the project | 404 |
project_not_found / testcase_not_found
|
| Non GET/HEAD | 405 |
method_not_allowed (Allow: GET, HEAD) |
Security: bffSameOriginGuard() + bffEnforceSession(), integer-only IDs, html_entity_decode on display data, JSON_INVALID_UTF8_SUBSTITUTE guarded json_encode(), nosniff and no-store headers, escaped client rendering and AUDIT logging for denials.
-
cfg/reports.cfg.php—tc_keyword_coveragereport entry. -
api/aside/index.php— modern report mapping with project/plan context. -
lib/functions/common.php—$actions->tcKeywordCoverage. -
gui/templates/i18n/*.json— 71tkc.*+footers.tcKeywordCoveragekeys in all 10 bundles;ai/verify_i18n_coverage.shpasses 9/9 with 14116 keys. -
locale/*/strings.txt—$TLS_link_report_tc_keyword_coveragein all 19 server locales.
- Fixture
tmp/fixtures_2099.php: projectTKC2099, two suites, five test cases (3 tagged / 2 untagged, 5 keyword links, 60% coverage, verdictwatch) and role-3 viewertkcnorightswithoutmgt_view_tc. - BFF contract verified for
projects,init,report,detail, HEAD, anonymous 401, role-3 403, invalid 400, unknown project 404, unknown tcversion 404 and POST 403/405. - Browser-verified EN/RO: ASIDE launcher, normal/filtered/detail/CSV/refresh/close states, DataTables search, empty filters, anonymous redirect and role-3 no-right card.
- Suite
Issue #2099: BFF contract, metrics, 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 #2100 (initial BFF SQL emitted literal
?placeholders in anIN (...)clause, causing MariaDB 1064 and two DATABASE ERROR rows) was filed with thebuglabel, fixed by integer-only ID list assembly, browser-reverified and closed. - PHP lint, JSON validation, i18n coverage and suite gates pass. Event Viewer has 0 new Error/Warning rows after all tests.
