qltyfolio/test-suites-common.sql
-- not including shell
-- not including breadcrumbs from sqlpage_aide_navigation
-- not including page title from sqlpage_aide_navigation
SELECT 'html' as component,
'<style>
p strong {
color: red !important;
}
/* Escape the dot in the class name */
tr.rowClass-100 p strong {
color: green !important;
}
.btn-list {
display: flex;
justify-content: flex-end;
}
</style>
'
as html;
select
'button' as component;
select
'Generate Report' as title,
'download-test-suites.sql' as link;
SELECT 'table' as component,
'Column Count' as align_right,
TRUE as sort,
TRUE as search,
'id' as markdown,
'Success Rate' as markdown;
SELECT
'['||suite_id||']('||sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/qltyfolio/suite-data.sql'||'?id='||suite_id||')' as id,
suite_name,
created_by as "Created By",
total_test_case as "test case count",
CASE
WHEN total_test_case > 0
THEN
'**'||ROUND(
100.0 * success_count /
total_test_case,
2
) || '%**' ||' *('||success_count || '/' || total_test_case ||'*)'
ELSE '0%'
END AS "Success Rate",
strftime('%d-%m-%Y', created_at) as "Created On",
'rowClass-'||(100* success_count/total_test_case) as _sqlpage_css_class
FROM test_suite_success_and_failed_rate st order by suite_id asc;