Skip to content

test: add report writer artifact tests#667

Open
Ayush7614 wants to merge 1 commit into
usestrix:mainfrom
Ayush7614:test/report-writer
Open

test: add report writer artifact tests#667
Ayush7614 wants to merge 1 commit into
usestrix:mainfrom
Ayush7614:test/report-writer

Conversation

@Ayush7614

@Ayush7614 Ayush7614 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds unit tests for pure helpers in strix.report.writer — previously uncovered aside from SARIF tests.

Covers:

  • read_run_record() — missing file, corrupt JSON, non-object payload
  • write_run_record() round-trip
  • render_vulnerability_md() section output
  • write_vulnerabilities() — markdown/CSV/JSON artifacts, severity ordering, skip-already-saved IDs
  • write_executive_report() output

Why

Verification

uv run pytest tests/test_report_writer.py -v

Test plan

  • pytest tests/test_report_writer.py — 8 passed locally
  • ruff check tests/test_report_writer.py — clean

Cover run record I/O, vulnerability markdown rendering,
CSV severity ordering, and executive report output.
@greptile-apps

greptile-apps Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds unit tests for the report writer helpers. The main changes are:

  • Run record read and write coverage.
  • Vulnerability markdown, CSV, and JSON artifact checks.
  • Executive report output coverage.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
tests/test_report_writer.py Adds focused tests for deterministic report writer behavior, with assertions matching the existing helper contracts.

Reviews (1): Last reviewed commit: "test: add report writer artifact tests" | Re-trigger Greptile

@Ayush7614

Copy link
Copy Markdown
Contributor Author

cc: @rajpratham1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant