Menu

Your AI-Written Tests Are Green. Would They Go Red?
📰

Your AI-Written Tests Are Green. Would They Go Red?

DEV Community: typescript·Muhammad Usman·1 day ago
#ex32cfYw
#devtotypescript#devto#dev#login#tests
Long article (1417 words) — no AI summary yet.
Reading 0:00
15s threshold

Originally published in my LinkedIn newsletter, QA Insights from a QA Lead .

A green test only means something if it can turn red. That's the first question I'd ask about any Playwright suite an AI assistant wrote.

AI is fast at producing tests that look right. They pass on the first run. But passing tells you nothing about whether the test fails when the feature breaks. The patterns to look for:

an assertion placed after a return , so it never runs

toBeTruthy() on a locator object, which is always truthy

a try/catch that swallows the failed assertion

a check against a local string instead of the page

toBeHidden() on a selector that was never on the page

All of them stay green in CI, every day, even after the feature underneath is gone.

I'm Muhammad Usman, a Senior QA Automation Lead and SDET with 10+ years in test automation, and I'm ISTQB CTFL certified.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.