qltyfolio/test-cases-list.sql
SELECT 'dynamic' AS component, sqlpage.run_sql('shell/shell.sql') AS properties;
-- not including breadcrumbs from sqlpage_aide_navigation
-- not including page title from sqlpage_aide_navigation
select
'breadcrumb' as component;
select
'Home' as title,
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/'as link;
select
'Test Management System' as title,
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/qltyfolio/index.sql'as link;
select
'Plan List' as title,
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/qltyfolio/test-plan.sql'as link;
select
"name" as title from test_plan where id = $id;
SELECT 'list' AS component,
name as title FROM test_plan
WHERE id = $id;
SELECT
'A structured summary of a specific test scenario, detailing its purpose, preconditions, test data, steps, and expected results. The description ensures clarity on the tests objective, enabling accurate validation of functionality or compliance. It aligns with defined requirements, identifies edge cases, and facilitates efficient defect detection during execution.
' as description;
SELECT 'html' as component,
'<style>
tr td.test_status {
color: blue !important; /* Default to blue */
}
tr.rowClass-passed td.test_status {
color: green !important; /* Default to blue */
}
tr.rowClass-failed td.test_status {
color: red !important; /* Default to blue */
}
.btn-list {
display: flex;
justify-content: flex-end;
}
</style>
' as html;
SELECT 'table' as component,
TRUE AS sort,
--TRUE AS search,
'URL' AS align_left,
'title' AS align_left,
'group' as markdown,
'id' as markdown,
'count' as markdown;
SELECT
'[' || t.test_case_id || '](' || sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/qltyfolio/test-detail.sql?tab=actual-result&id='|| t.test_case_id || ')' as id,
t.title,
case when p.status is not null then p.status
else 'TODO' END AS "test_status",
t.created_by as "Created By",
strftime('%d-%m-%Y', t.created_at) as "Created On",
t.priority,
'rowClass-'||p.status as _sqlpage_css_class
FROM test_cases t
inner join groups g on t.group_id = g.id
left join test_case_run_results p on p.test_case_id=t.test_case_id
WHERE g.plan_id like '%' || $id || '%';