The Test2Doc is a project that generates documentation based on tests, helping you keep your technical documentation automatically in sync with your code.
Test2Doc Playwright Reporter
The @test2doc/playwright package is a Playwright reporter that generates documentation in markdown based off of test. It also has the options of capturing screenshots and category metadata. It generates markdown files compatible with Docusaurus.
Never let your docs fall out of sync with your code again.
Who is this for?
- Teams maintaining user-facing documentation - Keep stakeholders informed without manual updates
- Compliance-heavy organizations - Generate audit trails automatically from test behavior
- Developers who want automated docs - Minimal overhead, maximum accuracy
- Anyone tired of stale documentation - Let your tests tell the story
Quick Overview
- You write or tag Playwright tests.
- Run with the Test2Doc reporter/config.
- The reporter generates Markdown (and screenshots) into your docs directory.
Key features
- Autogenerated Markdown pages from tests
- Docusaurus categories via
_category_.json - Frontmatter support via helpers (withDocMeta, withDocCategory)
- Screenshot capture with element highlighting and annotations