Repository navigation
WIKI FREE TEST CASES
The Free Test Cases report (ASIDE → Reports → Test Cases not Assigned to Any Test Plan) lists all test cases in the active test project that are NOT linked to any test plan — one row per test case, grouped by test suite. It replaces the legacy 1.9.20 lib/results/freeTestCases.php HTML view with a modern Dashio-styled page backed by a plain-PHP REST BFF.
Path: ASIDE menu → Reports → Test Cases not Assigned to Any Test Plan
URL: gui/templates/results/freeTestCases.html?tproject_id=<id>
BFF API: api/reports/index.php — GET ?action=free_testcases&tproject_id=N
Rights: testplan_metrics
Tracking issue: #751
| Section | Description |
|---|---|
| Header | Teal Dashio header "Test Cases Not Assigned to Any Test Plan — for test project X" with locale switcher |
| Toolbar | Dark bar: test project context, match count badge |
| Report | DataTable with columns: Test Suite (path), Test Case (external ID + name), Importance (conditional on priority setting) |
| Report info | Italic paragraph below the grid (ftc.infoReport): "This report shows all test cases that have not been added to ANY test plan of this project." — rendered only in the has-data path (legacy freeTestCases.tpl:36 parity; added in gap Issue #1264) |
| Empty state | Info icon with localized message when all test cases are assigned or no free test cases exist |
| Footer | Elapsed time + "Generated by TestLink on <timestamp>" (legacy freeTestCases.tpl:38 parity; added in gap Issue #1265) |
The BFF calls exactly the same engine method as the legacy controller:
-
testproject::getFreeTestCases($tprojectId)— fetches all test case IDs in the project, fetches those linked to any test plan, then computes the difference (free = all − linked). If no test plans exist (allfree=true), all test cases are returned. - Row post-processing:
tree::get_full_path_verbose()resolves the test suite path; the full external ID is built fromprefix + glue + external_id. - Columns match legacy: Test Suite, Test Case, Importance (shown only when priority management is enabled for the test project).
- Table is grouped by test suite and sorted by importance (descending), same as legacy
tlExtTablebehavior. - Footer (Issue #1265): the BFF success payload emits
generated_on(date('Y-m-d H:i:s'), same convention astplan_with_cf/metrics), and the HTMLrenderFooter(d)helper renderscommon.generatedBy + generated_onin all three footer branches (data / warning / all-assigned). The generated-on segment degrades gracefully when the key is absent. - Report info (Issue #1264): in the has-data branch
loadData()appends a localized<p class="info reportinfo">immediately after the results section, so the DOM order matches legacyfreeTestCases.tpl:31-38(table → italic info → generated-on footer). BFF unchanged — the info text is presentational (newftc.infoReportkey).
8 ftc.* keys in all 10 locale bundles (en de es fr it ja pt ro ru zh) plus the shared footer key common.generatedBy ("Generated by TestLink on", Issue #1265):
| Key | English |
|---|---|
ftc.header |
Test Cases Not Assigned to Any Test Plan |
ftc.forProject |
for test project |
ftc.testProject |
Test Project |
ftc.testCases |
test cases |
ftc.matchCount |
Match count |
ftc.allAssigned |
All test cases are assigned to a test plan. |
ftc.elapsedSeconds |
Elapsed seconds |
ftc.infoReport |
This report shows all test cases that have not been added to ANY test plan of this project. |
common.generatedBy |
Generated by TestLink on |
- No session → 401; missing
testplan_metricson global role AND project context → 403 - All test cases assigned → info icon with
ftc.allAssignedmessage - No test plan exists (allfree) → data table displayed with all test cases
Returns project-scoped free test cases.
{
"status": "ok",
"tproject_id": 1,
"tproject_name": "FTC Test Project",
"priority_enabled": true,
"all_free": true,
"has_data": true,
"rows": [
{
"tcase_id": 6,
"tc_external_id": 1,
"external_id": "FTC-1",
"name": "TC Free 1",
"suite_path": "Suite A",
"importance": "high"
}
],
"warning_msg": "",
"elapsed_time": 0.01,
"generated_on": "2026-10-06 09:42:50"
}| File | Purpose |
|---|---|
gui/templates/results/freeTestCases.html |
Modernized HTML/JS screen |
api/reports/index.php |
BFF API (free_testcases action) |
lib/general/asideMenu.php |
Aside link switched to freeTestCases.html for link_report_free_testcases_on_testproject
|
gui/templates/i18n/{en,ro,de,fr,es,it,ja,pt,ru,zh}.json |
ftc.* i18n keys |
lib/results/freeTestCases.php |
Legacy controller (reference) |
lib/functions/testproject.class.php:2554 |
getFreeTestCases() method |