Taro Logo
1

Startup idea: Test2Doc

Profile picture
Senior Software Engineer [L5]a day ago

So to help validate my idea, i want to discuss it here at Taro.

Test2Doc

The problem is that keeping documentation up to date is very difficult. As a produce evolves and changes, the documentation usually lags behind and becomes obsolete.

From my experience with Test Driven Development I learned that automated tests act as living documentation. If I needed to understand how code on a new code base worked, I look at the tests.

What if we could generate docs based off the tests?

You know the docs are up to date because the tests are passing. You know if tests are removed, that documentation is removed. Making docs generate based off tests ensures that functionality is accessible to non-engineers. And acts as validation for feature requests. This also provides a clear, continuously updated reference for feature development and prevents regressions.

How?

E2E testing. I'm currently looking in to using Playwright, and it should theoretically be doable.

We write the tests in a Gherkin style BDD framework. Given, When, Then. We'll develop best practices for generating rich, narrative documentation from these structured tests over time.

The core concept leverages Playwright's step function to create blocks of actions that describe documentation.

Given: sets up the test scenario
When: some kind of input or action we're testing against
Then: our assertion on what we expect

Many tests distill down to this pattern.

While the test executes we can take screenshots to give visual examples.

After the playwright tests run we output markdown which can be consumed by Docusaurus or some other documentation library.

SaaS

The How section outlines an open source library. But where the true magic sauce lies is in offering a SaaS that makes it easy for non-technical people to help contribute to and improve the docs.

So the service will host the docs. We can allow non-technical users to make edits and then generate PRs to the repo using Github's APIs which ensures that the code is the source of truth. To allow more collaborations we can allow for comment style discussions on the doc, similar to Google Docs. Integrations with tickets like Jira or Github Issues to track the original requirements.

Feedback

Feedback would be much appreciated. Is this something that would solve a pain point your organization has? Any suggestions?

11
0

There are no comments on this discussion yet.

Give it an upvote, and you'll be notified when the community chimes in!