Files
arrr-erp-test-v2/SQLITE_RESULTS_README.md
2026-06-24 20:05:36 +05:30

2.2 KiB

SQLite-first UAT/VAPT Results

This build records Playwright UAT/VAPT execution directly into SQLite.

Output files

After a run, the important files are:

results/uat_vapt_results.sqlite
results/UAT_VAPT_SQLite_Export.xlsx
results/merged-results.json
results/Audit_Firm_ERP_Master_UAT_VAPT_Checklist_v2_4_Results.xlsx
results/playwright-results.json

How it works

  1. data/generated-test-matrix.json is imported into SQLite table test_cases.
  2. A new row is created in test_runs.
  3. Every Playwright test result is inserted immediately into test_results by reporters/sqlite-reporter.js.
  4. Screenshots, traces, and videos are recorded in test_attachments.
  5. SQLite is exported to JSON and Excel after the run.

Important command

Use this command, without overriding the reporter:

cd /tests
node run-api-checks.js
npm run db:import-cases
npx playwright test --workers=1
npm run db:summary
npm run db:export-json
npm run db:export-excel
npm run update:excel
node scripts/result-server.js

Do not run with --reporter=list, because that disables the configured SQLite/json/html reporters.

Query SQLite

Summary:

sqlite3 results/uat_vapt_results.sqlite "SELECT status, COUNT(*) FROM test_results GROUP BY status;"

Latest failures:

sqlite3 results/uat_vapt_results.sqlite "
SELECT tc.variant_id, tc.module, tc.scenario, tr.status, substr(tr.error_message,1,250) AS error
FROM test_results tr
LEFT JOIN test_cases tc ON tc.variant_id = tr.variant_id
WHERE tr.run_id = (SELECT MAX(id) FROM test_runs)
  AND tr.status != 'passed'
ORDER BY tc.module, tc.variant_id
LIMIT 100;
"

Not-run cases:

sqlite3 results/uat_vapt_results.sqlite "
SELECT tc.variant_id, tc.module, tc.scenario
FROM test_cases tc
LEFT JOIN test_results tr
  ON tr.variant_id = tc.variant_id
 AND tr.run_id = (SELECT MAX(id) FROM test_runs)
WHERE tr.id IS NULL AND tc.automation != 'manual'
ORDER BY tc.variant_id;
"

Result dashboard

The Dockerfile starts scripts/result-server.js on port 3000 after tests complete. In Coolify expose port 3000 and protect it using Basic Auth or IP restriction.

Suggested persistent volumes:

/tests/results
/tests/test-results
/tests/playwright-report