cd /news/ai-tools/i-let-ai-write-my-tests-for-6-months… · home topics ai-tools article
[ARTICLE · art-134376] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=· neutral

I Let AI Write My Tests for 6 Months. Here Is What Actually Survived Production

A test automation engineer with over three years of Playwright and Flutter experience reports that after six months of using AI in his testing workflow, the technology is genuinely useful for converting plain-language bug reports into failing test scaffolding, explaining flaky tests, and suggesting stable locators, but fails at identifying edge cases that matter. He found AI-generated tests often pass while asserting nothing, struggle badly with mobile web and Flutter due to thin training data, and that self-healing locators are "mostly marketing" because a silently repaired locator stops signaling that the UI changed.

by read5 min views1 publishedSep 19, 2026

Last month a teammate pasted a Playwright test into our PR channel and wrote "AI generated this in 4 seconds, why are we still writing tests by hand."

The test passed. It also asserted nothing. It clicked a button, waited 3 seconds, and checked that the page still existed. Green tick, zero value.

I have been doing test automation for a bit over three years now, mostly Playwright on web and Flutter on mobile. I have been using AI heavily in that workflow for about six months. Some of it genuinely changed how I work. A lot of it is noise that people are too excited to admit is noise.

Here is the honest split.

1. Turning a bug report into a test case.

This is the single biggest win and almost nobody talks about it. Our QA team writes bug reports in plain language. "Cart total does not update when you remove the last item while a coupon is applied." I paste that into the model along with our page object file, and I get a reasonable failing test in under a minute.

Not a perfect test. A reasonable one. I still rewrite the assertions. But the boring scaffolding, the imports, the fixture setup, the navigation steps, all of that is done. That is maybe 60 percent of the typing gone.

2. Explaining a flaky test you did not write.

You know the feeling. A test fails once every 20 runs. It was written 14 months ago by someone who left. You open it and there are four nested waits and a hardcoded timeout of 8000ms.

Paste the test plus the trace, ask what the race condition probably is. The model is right maybe half the time, but even when it is wrong it gives you a hypothesis to disprove, which is faster than staring at the file. I have written more about the patterns behind flaky end to end tests if you want the non AI side of that problem.

3. Locator suggestions for messy DOMs.

Give it the HTML chunk, ask for the most stable locator. It will usually push you toward getByRole and getByLabel instead of the CSS selector nightmare you were about to write. It is basically a linter with opinions.

It does not know what matters.

AI writes tests for the happy path because the happy path is what is in the code. It will never ask "what happens if the payment webhook arrives twice." That question comes from having been burned by a duplicate webhook at 2am. That is domain knowledge, not pattern matching.

Roughly 80 percent of the real bugs I have caught came from tests nobody would think to generate.

Mobile web is where it really struggles.

This is the part that surprised me. AI models are trained on a mountain of desktop web test code. Ask them about viewport specific behaviour, touch targets, or the way a sticky header eats your click on a 390px screen and the quality drops hard. It will confidently give you a desktop solution and call it mobile.

I ended up writing my own reference for Playwright mobile web testing because I kept getting the same wrong suggestions. Device emulation, real touch events, and orientation handling still need a human who has actually seen the bug.

Flutter is worse.

If your app is Flutter, brace yourself. The training data is thin. Ask for a widget test and you get something plausible looking that uses an API that changed two versions ago. Ask for a smoke suite and it gives you web patterns wearing a Flutter costume. I built out our smoke and regression testing setup for Flutter almost entirely by hand for this reason. AI helped with the boilerplate inside each test. It helped with nothing about the structure.

Self healing locators are mostly marketing.

Every AI testing tool sells this. In practice, a locator that silently repairs itself is a locator that stops telling you the UI changed. Sometimes the UI changing IS the bug. I would rather my test break loudly.

The rest of my test automation notes go deeper on the CI side if you are setting this up fresh.

AI made me faster at writing tests. It did not make me better at knowing which tests to write. And the second skill is the entire job.

I think there is a real risk for people entering QA right now. If you learn to prompt before you learn to reason about failure modes, you will produce a very large, very green test suite that catches nothing. I have reviewed a few of those already. They are worse than having no tests, because they create confidence.

Three things I want to hear from you in the comments, and I will reply to every single one.

One. What is the dumbest test AI has ever generated for you? I want to collect these. Mine was a test that asserted expect(true).toBe(true) after a login flow.

Two. Has anyone here actually had self healing locators work in a real production suite? I am genuinely open to being proven wrong on this. If you have a case where it saved you, I want the details.

Three. If you test Flutter or React Native, has AI been useful to you at all, or is your experience as rough as mine?

I am also curious whether anyone has moved to an MCP based setup where the model drives the browser directly instead of generating code. I have tried it twice and both times it was slower than just writing the test, but I suspect I was holding it wrong.

Drop your take below. Especially if you disagree.

── more in #ai-tools 4 stories · sorted by recency
── more on @playwright 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-let-ai-write-my-te…] indexed:0 read:5min 2026-09-19 ·