Your AI Wrote the Site. Who Tests It? A Self-QA Loop With Claude and Playwright MCP
Michael Sacca•There's a step missing from every AI website tutorial on the internet, and it's the step that actually determines whether your site works.
The pattern is always the same: prompt, generate, paste, deploy. Some tutorials — like Stop Asking ChatGPT to "Make Me a Website" — The Brief That Gets a Deployable Site in One Pass — get you to a genuinely deployable output on the first try. The Last Mile of Building Landing Pages With AI: Prompt to Live URL Without a Builder covers the deployment leg. But almost nobody talks about what happens between "the code exists" and "the site is live and I'm confident in it." The gap is assumed to be covered by... you, clicking around in a preview pane, squinting.
That's not QA. That's vibes. And the moment your LLM-built site has a form, a mobile breakpoint, or more than three pages, vibes stop being enough.
The good news: the same model that wrote the site can test it. Not by re-reading its own code and telling you it looks great — models are famously bad at grading their own homework that way — but by actually opening a browser, clicking through the pages, filling in the form, resizing the viewport, taking screenshots, and reporting back on what broke. Playwright MCP is what makes that possible.
Why an LLM can't just "review" its own code
Ask Claude to look over the HTML it just generated and you'll get a confident, mostly useless answer: structure looks fine, tags are balanced, accessibility looks reasonable. The model is reading the code, not the rendered page. The two diverge in exactly the places that bite you:
- A form that renders fine but never actually submits because the
fetchURL points at a placeholder - A mobile menu that's wired to a button with the wrong selector, so the hamburger does nothing
- An image path that works locally and 404s after deploy because of a case-sensitivity difference
- A layout that's beautiful at 1440px and collapses into an unreadable stack at 375px
None of these are visible in the code. All of them are visible in a browser. Which is why the fix isn't a better prompt — it's giving the model eyes and hands.
What Playwright MCP actually is
Playwright is Microsoft's browser automation framework — the same technology QA engineers use to write end-to-end tests. The Playwright MCP server wraps it so an LLM can drive it conversationally. Instead of writing test scripts, Claude gets tools like:
browser_navigate— go to a URLbrowser_click— click an element, referenced by accessibility role or refbrowser_type— fill in form fieldsbrowser_snapshot— pull the accessibility tree of the current page (how the model "reads" the page)browser_take_screenshot— capture what the page actually looks likebrowser_resize— change the viewport size, which is how you test responsive behaviorbrowser_console_messages— read console errors, the fastest way to find broken JavaScript
Connect the server, and "test my site" stops being a metaphor. Claude literally opens a browser, navigates to your local dev server or preview URL, and interacts with the page the way a human tester would — except it never gets bored, never skips a page, and always checks the console.
The self-QA loop, step by step
Here's the loop I run on every AI-built site before it goes anywhere near a domain. Assume the site is running locally — npx serve on a static build, or your dev server of choice.
Step 1: Give Claude the test brief, not a vague instruction
The same way a vague build prompt gets you a chat draft instead of a site, a vague test prompt gets you a rubber-stamp review. Write the QA brief like a human QA engineer's ticket:
The site is running at http://localhost:3000. Test it like a QA engineer:
1. Visit every page linked in the nav. Report any 404s or broken links.
2. On the contact form, fill every field with realistic data and submit.
Confirm the success state appears. Then submit with the email field
empty and confirm validation fires.
3. Resize to 375x812 (iPhone-sized) and check: nav works, no horizontal
scroll, no text overlapping images. Screenshot each page.
4. Check console messages on every page and report any errors.
5. Do not fix anything yet. Report findings first.
That last line matters more than it looks. Without it, Claude will find a bug and immediately start patching mid-test, losing track of what else it found. Report first, fix second — same discipline you'd want from a human tester.
Step 2: Read the findings like a QA report, not a chat message
A good run comes back with a triaged list: what's broken, what's suspicious, what was verified working. The screenshot step is where you should pay attention yourself — Claude can't always judge aesthetics, but a screenshot of a 375px-wide viewport where the hero text overlaps the CTA button tells you instantly what needs saying.
Two things to sanity-check in its report:
- Success-state claims. When Claude says "form submitted successfully," ask it how it knows. Did it observe a confirmation message in the snapshot, or just a lack of errors? Those are different. If the form posts to a third-party endpoint, a network-level success doesn't mean your endpoint actually received anything.
- Console errors. These are the highest-signal findings and the most concrete. A single
404on a font file is boring but real; aTypeError: Cannot read properties of nullmeans some interactive feature is silently dead.
Step 3: Let Claude fix, then re-run the same brief
This is the part that makes it a loop instead of a one-off review. After the fix, run the exact same test brief again. Not a shortened version — the same one. AI-built sites have a characteristic failure mode where fixing one thing breaks another: a CSS change that repairs mobile layout and destroys the desktop footer. Re-running the full brief catches regressions the patch introduced.
Repeat until the report comes back clean on two consecutive runs. Two, not one — the first clean run is often the run where the fix happened to land; the second is the one that means anything.
Step 4: Run the loop again after deploy
Your local environment and your live one are not the same environment. Paths resolve differently, CORS behaves differently, and free-tier hosting does things to headers that localhost doesn't. Point the same brief at your live URL once it's deployed — this is also exactly when you want analytics and form wiring verified end to end, and it pairs naturally with the launch checklist in The Last Mile of Building Landing Pages With AI: Prompt to Live URL Without a Builder.
Where the loop falls short
Honesty about limits, because this setup will let you down in specific ways:
It can't test what it can't see. Claude operating through Playwright's accessibility tree is great at structure, links, forms, and layout breakage — and bad at "does this feel trustworthy." Visual polish judgments from a model are worth about as much as a stranger's opinion. Keep screenshots and use your own eyes for the aesthetics.
Edge cases need to be enumerated by you. The model will test what your brief lists. It won't invent "what happens if I paste a 5,000-character string into the name field" unless you tell it to. The brief is the intelligence in this system; the loop is just the hands.
It's not a load test, and it's not a security audit. One automated browser is one visitor. Don't let a clean QA report convince you the site handles traffic or that your form can't be abused.
Why this matters more for AI-built sites than for hand-coded ones
A hand-coded site usually gets tested as a side effect of building it — you click every link as you write it. An AI-built site is different: the code arrives finished, in bulk, and the temptation is to trust it because it looks complete. It's precisely the output you didn't write line by line that you should test most aggressively, because you have no muscle memory of its failure points.
And the economics are absurd. A QA pass that used to mean either hours of your own clicking or a freelancer's invoice is now a fifteen-minute loop that runs as many times as you want, for free, using tools you already have. If you've already wired Claude into your build-and-deploy pipeline — the workflow described in The Free Website Maker Nobody Lists: Claude Commits, GitHub Pages Deploys, Your Bill Stays $0 — the QA loop slots in as one more step between commit and push.
Build fast, then close the loop. The site your AI wrote is only as good as the last thing that actually clicked through it.
Keep Reading
Your Website Can Talk Back: Wiring Analytics, Forms, and Booking Into Claude Via MCP
Nov 15, 2026
The Free Website Maker Nobody Lists: Claude Commits, GitHub Pages Deploys, Your Bill Stays $0
Nov 14, 2026
Marketing Agent" Doesn't Mean Chatbot: What It Takes for Claude or GPT to Actually Run Your Site's Marketing
Nov 13, 2026