Skip to content

feat(testing): add Markdown formatter for test reports#1547

Open
diiviikk5 wants to merge 1 commit intomofa-org:mainfrom
diiviikk5:feat/testing-markdown-formatter-main
Open

feat(testing): add Markdown formatter for test reports#1547
diiviikk5 wants to merge 1 commit intomofa-org:mainfrom
diiviikk5:feat/testing-markdown-formatter-main

Conversation

@diiviikk5
Copy link
Copy Markdown
Contributor

@diiviikk5 diiviikk5 commented Mar 29, 2026

pr1546

Summary

Add a MarkdownFormatter to the mofa-testing report module.

This PR extends the existing formatter path alongside JsonFormatter and TextFormatter with a Markdown-oriented output that is easier to use in PR comments, docs, and CI summaries.

Closes #1546.

What Changed

  • added MarkdownFormatter in tests/src/report/format.rs
  • exported MarkdownFormatter through the report module and crate root
  • added focused report tests for:
    • summary and results table rendering
    • escaping | and multiline values inside cells
    • empty report output

Why

mofa-testing already supports JSON and plain text output, but Markdown is a useful human-readable middle ground for:

  • PR summaries
  • contributor-facing examples
  • proposal/demo artifacts
  • CI-generated readable summaries

This keeps the change small and directly aligned with the report layer already in the crate.

Testing

Ran:

cargo test -p mofa-testing --test report_tests

Result:

  • report_tests: 27 passed, 0 failed

Scope

This PR is intentionally limited to report formatting.
It does not introduce:

  • benchmark snapshot rendering
  • CI comment posting
  • HTML output
  • changes to the TestReport data model beyond formatter exposure

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.

feat(testing): add Markdown formatter for TestReport

1 participant