Skip to main content

6 posts tagged with "Testing"

All things testing. Best practices, tools, and tips.

View All Tags

Stop Waiting for networkidle: Introducing @test2doc/playwright-utils

· 6 min read
William "dethstrobe" Johnson
Ex-Googler, Founder Null Sweat, Deadly Ninja Cyborg from the Future

Your test clicks a button. Playwright says the click worked. Nothing happens. The test fails, you rerun it, and it passes. Classic.

If your app is server-rendered React, the button was on the page and clickable before React hydrated and attached its onClick. Playwright clicked a button that didn't do anything yet. So I pulled the helpers I've been using to deal with this into a package: @test2doc/playwright-utils.

Test2Doc Goes Mobile: Introducing @test2doc/maestro

· 7 min read
William "dethstrobe" Johnson
Ex-Googler, Founder Null Sweat, Deadly Ninja Cyborg from the Future

the Maestro logo

Test2Doc has always turned Playwright tests into documentation. That's great if your app lives in a browser. Less great if your users want a mobile app and think mobile websites are lame. (They're not lame, FYI. They're super dope.)

So I built @test2doc/maestro: a CLI that turns Maestro flows into docs for Docusaurus, complete with annotated screenshots, for your Android, iOS, and web apps. It's a v0 preview, so please try to break it.

Narrative-Driven Development: BDD + TDD + Living Documentation in One Workflow

· 7 min read
William "dethstrobe" Johnson
Ex-Googler, Founder Null Sweat, Deadly Ninja Cyborg from the Future

The best documentation is always up to date. The best way to keep docs up to date is to make them executable.

I've spent six months building Test2Doc—turning Playwright tests into documentation—and writing a tutorial that puts it into practice. Here are the patterns I discovered for writing tests that read like user guides.

Finished the RedwoodSDK tutorial!

· 2 min read
William "dethstrobe" Johnson
Ex-Googler, Founder Null Sweat, Deadly Ninja Cyborg from the Future

As foretold in the prophecy billions of years ago at the dawn of time, I said I was working on a tutorial to help teach TDD with Playwright, RedwoodSDK, and how to generate documentation with Test2Doc for Docusaurus.

And I did. The tutorial is complete and covers all the basic CRUD operations, best practices around testing, refactoring, and deploying to Cloudflare.