Skip to content

Test Coverage

Six test files serve as executable specifications:

  • test_socrates_server.py — Server-side: validation, security, API endpoints, SQLite, Suricata config
  • test_socrates_ui.py — UI-side: HTML structure, CSS, JS functions, syntax, filtering, accessibility, performance
  • test_socrates_db.py — Database: SQLite schema, bulk loading, query functions
  • test_sigma_db.py — Sigma alerts table: insert/query, severity filtering, search, stats, log event import
  • test_sigma_analyzer.py — Zircolite/Sigma pipeline: log type detection, result parsing, importing Zircolite output into SQLite
  • test_validators.py — Input validation: office/log file detection by extension, safe-IP resolution (SSRF/DNS-rebinding)

Tests are static analysis (string matching in source files), live server integration tests, and JSDOM-based behavioral tests (tests/jsdom_helper.py) for JS functions that need real execution rather than source inspection. No Selenium/Playwright-style full-browser tests.

See Testing for how to run them.