<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Umair Iftikhar</title>
    <description>The latest articles on DEV Community by Umair Iftikhar (@umair_iftikhar).</description>
    <link>https://dev.to/umair_iftikhar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4002391%2Fd574cfa3-fdeb-45aa-b55c-161c1b41bb32.jpg</url>
      <title>DEV Community: Umair Iftikhar</title>
      <link>https://dev.to/umair_iftikhar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/umair_iftikhar"/>
    <language>en</language>
    <item>
      <title>What I Learned Wiring Playwright Into MCP: The Good, the Flaky, and the Surprising</title>
      <dc:creator>Umair Iftikhar</dc:creator>
      <pubDate>Fri, 26 Jun 2026 19:05:07 +0000</pubDate>
      <link>https://dev.to/umair_iftikhar/what-i-learned-wiring-playwright-into-mcp-the-good-the-flaky-and-the-surprising-1nik</link>
      <guid>https://dev.to/umair_iftikhar/what-i-learned-wiring-playwright-into-mcp-the-good-the-flaky-and-the-surprising-1nik</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4xmeyqff5lrol4qqbr9q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4xmeyqff5lrol4qqbr9q.png" alt=" " width="800" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The first time it worked, I just sat there.&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I'd typed one sentence into a chat window. Something like "go to the staging site, log in with the test account, and add two items to the cart." A browser opened on its own. The cursor moved. Fields filled in. A product landed in the cart. I hadn't written a single locator, a click, or one line of a spec file.&lt;/p&gt;

&lt;p&gt;My first reaction wasn't "this is the future." It was "what exactly just happened, and can I trust any of it?"&lt;/p&gt;

&lt;p&gt;That question is pretty much what this whole post is about. I've spent the last few years writing Playwright suites the normal way. Selectors, fixtures, page objects, all of it. Wiring Playwright into MCP felt like watching a tool I knew well start speaking a different language. Some of it was genuinely brilliant. Some of it drove me up the wall. And a few things caught me completely off guard.&lt;/p&gt;

&lt;p&gt;What this actually is, in plain terms&lt;br&gt;
If you haven't touched it yet, here's the short version.&lt;/p&gt;

&lt;p&gt;MCP, the Model Context Protocol, is a way for an AI model to call external tools through one shared interface. The Playwright MCP server is one of those tools. Instead of you writing the browser automation, it hands the model a set of browser actions. Navigate, click, type, read the page, take a snapshot. The model decides what to do and Playwright carries it out.&lt;/p&gt;

&lt;p&gt;The thing that surprised me earliest was how it sees the page. I assumed screenshots, with some vision model squinting at pixels. It isn't, at least not by default. It works off the accessibility tree, the structured, labelled version of the page that screen readers rely on. That one decision explains a lot of what comes next, both the good and the bad.&lt;/p&gt;

&lt;p&gt;So you're not really recording a test anymore. You're describing what you want and letting something else turn that into actions. After years of being deliberate about every selector, that's a strange thing to sit with.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The good&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I'll start with what genuinely impressed me, because there was plenty.&lt;/p&gt;

&lt;p&gt;Exploring an app got fast. Normally when I land on something unfamiliar I poke around by hand, work out the flows, then start scripting. With MCP in the loop I could just ask it to walk through a feature while I watched. It found steps and edge cases I'd have reached eventually, only quicker. As a way to understand a new system before writing a single real test, it paid for itself straight away.&lt;/p&gt;

&lt;p&gt;The accessibility tree approach held up better than I expected. Because it reads structured page data instead of pixels, a layout shifting a few points or a colour changing doesn't throw it. It reads the page the way the page describes itself. When it found an element, it usually found the right one, by role and label, which is honestly how we're all told we should be writing locators anyway.&lt;/p&gt;

&lt;p&gt;It opened the door for people who don't code. I showed it to a manual tester on our team who has never been comfortable writing automation. Within an hour they were driving real flows in plain English. That's not a small thing. So much testing knowledge sits with people who can't translate it into a framework, and this closes part of that gap.&lt;/p&gt;

&lt;p&gt;Drafting the boring scaffolding got quicker. Even when I went back to writing proper Playwright code, letting the model map a flow first gave me a decent structure to harden by hand. Less staring at an empty file.&lt;/p&gt;

&lt;p&gt;For a few days I was sold. Then I pushed it on real work and the cracks showed.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The flaky&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Here's where I have to be straight with you, because the title promised flaky and the title wasn't bluffing.&lt;/p&gt;

&lt;p&gt;It isn't deterministic, and tests are meant to be. Run the same instruction twice and you don't always get the same path. Once it logged in through the main form. Another time it spotted a "continue with email" route I'd forgotten was even there and went that way instead. Both reached the goal. But a test that takes a different road on each run is a test you can't fully trust, because you no longer know exactly what it checked. In automation, "it got there somehow" is not the same as "it did the thing I meant."&lt;/p&gt;

&lt;p&gt;It resolves ambiguity confidently, and sometimes wrongly. When my instruction was vague, it didn't stop to ask. It picked a reading and ran with it, totally sure of itself. "Submit the form" once meant a Save Draft button rather than the real submit, and the run looked perfectly fine while testing the wrong thing. A green result that quietly checked the wrong path is the most dangerous green there is.&lt;/p&gt;

&lt;p&gt;It stalls on the genuinely odd parts. Custom date pickers, drag and drop, canvas elements, anything that isn't a clean, clearly labelled control. These tripped it up far more than they trip up a locator I've tuned by hand for that exact widget. The accessibility tree strength turns into a weakness the moment the interface stops describing itself properly. And plenty of real apps describe themselves badly.&lt;/p&gt;

&lt;p&gt;Cost and speed pile up. Every step means a model deciding what to do next. For a quick bit of exploring, fine. For a full regression run, the latency and the token cost are real, and a plain Playwright suite still wins comfortably on both.&lt;/p&gt;

&lt;p&gt;None of this means it's broken. It means it behaves like a sharp assistant improvising, not a deterministic test runner. Different tools, different jobs.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The surprising&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A few things I didn't see coming at all.&lt;/p&gt;

&lt;p&gt;The bottleneck moved to how well I describe things. I thought the hard part would be setup. It wasn't. The hard part was writing instructions precise enough to get the same behaviour twice. The clearer and tighter my wording, the better it ran. Which, once I sat with it, is just a fuzzier version of the discipline good test design already asks for. The skill didn't vanish. It changed shape.&lt;/p&gt;

&lt;p&gt;Watching it work became its own debugging tool. Seeing the model talk through its choices, "the login link wasn't visible, so I opened the menu first," surfaced assumptions about my own app I'd long stopped noticing. A couple of times it exposed genuine clunkiness in the UX, not test problems. I went in to judge a testing tool and came out with notes for the product team.&lt;/p&gt;

&lt;p&gt;It made me value my boring old suite more, not less. I'd half expected to walk away feeling replaceable. Instead I came away clearer on what handwritten, deterministic tests are actually for. The predictability I used to take for granted turns out to be the entire point in the places that matter.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;So where would I actually use it&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I keep landing on a simple split.&lt;/p&gt;

&lt;p&gt;For exploring, prototyping, getting to know a new app, and helping teammates who don't write code contribute, Playwright through MCP is a real addition to the toolbox. I'll keep using it there. It's fast, it's approachable, and it lowers a barrier that's been stubbornly high for years.&lt;/p&gt;

&lt;p&gt;For the regression suite that gates a release, though, especially anything I'd have to defend to someone who can stop that release, I still want deterministic tests I wrote and can explain. It's the same conclusion I keep reaching with AI in testing in general. Lean on it where being wrong costs little, and keep a firm hand where it doesn't.&lt;/p&gt;

&lt;p&gt;That's not a dig at the tooling. It's just knowing which job you're doing.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Where I've landed, for now&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Wiring Playwright into MCP was one of the more interesting things I've done in a while, mostly because it refused to resolve neatly into "great" or "useless." It's both, depending on what you ask of it.&lt;/p&gt;

&lt;p&gt;The good is genuinely good. The flaky is genuinely flaky. And the most surprising part was realising the tool didn't reduce the need for testing judgement. It just moved it, from writing the steps to deciding which steps to trust.&lt;/p&gt;

&lt;p&gt;I'm still working out exactly where it fits in my week. These are early notes, not a verdict.&lt;/p&gt;

&lt;p&gt;If you've wired Playwright into MCP, or any model into a real browser, I'd love to hear where it held up for you and where it fell apart. I get the feeling we're all still mapping the edges of this one.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>playwright</category>
      <category>test</category>
      <category>programming</category>
    </item>
    <item>
      <title>What I've Learned Using AI for Testing in Industries Where Mistakes Actually Cost Something</title>
      <dc:creator>Umair Iftikhar</dc:creator>
      <pubDate>Thu, 25 Jun 2026 12:57:18 +0000</pubDate>
      <link>https://dev.to/umair_iftikhar/what-ive-learned-using-ai-for-testing-in-industries-where-mistakes-actually-cost-something-p40</link>
      <guid>https://dev.to/umair_iftikhar/what-ive-learned-using-ai-for-testing-in-industries-where-mistakes-actually-cost-something-p40</guid>
      <description>&lt;p&gt;A while back I sat through a demo where someone generated an entire regression suite from a single prompt. It was genuinely impressive. The tests appeared in seconds, the locators looked clean, and the presenter barely touched the keyboard.&lt;/p&gt;

&lt;p&gt;My first thought wasn't "this is going to replace me." It was "I would never let that run on a claims platform without a human reading every line first."&lt;/p&gt;

&lt;p&gt;That gap, between what AI testing tools can do and what you can actually trust them to do in a regulated environment, is something I think about constantly. I've spent the last five years building automation frameworks for clients in fintech, insurance, and healthcare. In those worlds the conversation about AI sounds very different from the optimism I usually see online.&lt;/p&gt;

&lt;p&gt;It isn't that AI doesn't belong in testing. It clearly does, and I use it most days. It's that the cost of being wrong changes everything about how you use it.&lt;/p&gt;

&lt;p&gt;When a passing test is the dangerous outcome&lt;/p&gt;

&lt;p&gt;Most AI testing tools are built, whether the makers say so or not, for environments where a false positive is irritating rather than serious.&lt;/p&gt;

&lt;p&gt;If a test wrongly passes on an ecommerce checkout, a bad order slips through. You refund the customer and move on. If a test wrongly passes on a claims workflow, or a dosage calculation in a health system, or a transaction check in a payments engine, you are in completely different territory. Audit exposure. Regulatory questions. Real harm to real people.&lt;/p&gt;

&lt;p&gt;So nothing here is an argument against AI. It's an argument for understanding the room you're standing in before you decide how much to trust the machine.&lt;/p&gt;

&lt;p&gt;The three things that quietly break&lt;/p&gt;

&lt;p&gt;Three areas come up again and again.&lt;/p&gt;

&lt;p&gt;The first is test data. In a normal product, fake data is trivial. Invent a name, invent an email, done. In healthcare that data has to respect HIPAA. In fintech you're handling account numbers and transaction histories. In insurance, policy data is both legally and personally sensitive. Tools that generate test data on demand will happily hand you something that looks perfectly realistic and quietly breaks your data handling rules the moment it lands in a test environment. I've seen suites seeded with data exactly like that. It looked fine. It would have failed an audit on sight. The tool wasn't being careless. It simply had no idea what world it was operating in.&lt;/p&gt;

&lt;p&gt;The second is the audit trail. Regulated work gets audited, sometimes by people with the power to stop a release. When an auditor asks why a test passed, "the model wrote it that way" is not an answer anyone will accept. Every test in that kind of pipeline needs a reason a human can read and defend. AI can absolutely help draft the test. What it can't do is own the intent. That part stays with an engineer who can explain the logic out loud.&lt;/p&gt;

&lt;p&gt;The third is change. In consumer software you ship, test, and fix at speed. In an insurance or healthcare platform, a single release can pass through compliance gates, change boards, and approvals before it ever reaches production. This is where the feature that lets tests repair their own locators gets interesting. Tests that quietly rewrite themselves when the interface shifts sound wonderful, until you remember that in a validated suite an undocumented automatic change is still a change, and under frameworks like GAMP 5 that can drag you back into validating the whole suite again. A model that helpfully fixed your tests overnight can hand you a compliance problem that takes weeks to untangle.&lt;/p&gt;

&lt;p&gt;Where it genuinely earns its place&lt;/p&gt;

&lt;p&gt;I don't want this to read as a list of reasons to avoid AI, because I lean on it. The trick is putting it where the downside is small.&lt;/p&gt;

&lt;p&gt;Drafting is the obvious one. Handing a model a requirements document or a set of user stories and asking for a first cut of test cases saves real time. In regulated work that draft is never the finished article. A human reviews it, adds the compliance edge cases the model missed, and writes down the reasoning. But starting from something solid beats starting from a blank file, and the model often surfaces a scenario a tired reviewer would skip.&lt;/p&gt;

&lt;p&gt;Coverage analysis is similar. Feeding a spec to a model and asking what scenarios it implies is useful less as an answer and more as a second opinion. When a missed scenario can mean a failed audit, another set of eyes, even synthetic ones, has value.&lt;/p&gt;

&lt;p&gt;Then there's the plumbing. Page objects, data factories, pipeline configuration, all the mechanical scaffolding nobody enjoys writing. Tools like GitHub Copilot have made that part of my week noticeably faster, and the risk stays low because I'm reading and integrating the output, not shipping it untouched.&lt;/p&gt;

&lt;p&gt;The skill that actually matters now&lt;/p&gt;

&lt;p&gt;Here's the part I think a lot of people are dancing around.&lt;/p&gt;

&lt;p&gt;AI is not going to delete QA jobs in regulated industries. But it is going to change what makes a QA engineer worth hiring.&lt;/p&gt;

&lt;p&gt;Knowing how to prompt a model for a test case is not really a skill anymore. It's a baseline, like knowing how to use version control. The people who become hard to replace are the ones who know when to overrule the model. The engineer who reads a generated test and instantly spots that it ignores a data residency rule in the third scenario. Who notices that a locator was silently rewritten in a way that changes what the test actually checks. Who can sit across from an auditor and explain, in plain language, what every test is verifying and why it exists at all.&lt;/p&gt;

&lt;p&gt;That kind of judgement rests on domain knowledge. Understanding how a payment really settles, how a claim moves through a system, how health data is allowed to be handled. A model can't stand in for that, and in regulated industries it's exactly what makes an engineer valuable.&lt;/p&gt;

&lt;p&gt;The future I see isn't AI replacing testers. It's testers who understand both the rules and the tooling, leaning on the tooling to move faster and on the rules to know where to push back.&lt;/p&gt;

&lt;p&gt;A rough test I apply&lt;/p&gt;

&lt;p&gt;Before I let anything a model produced into a regulated suite, I ask myself three questions.&lt;/p&gt;

&lt;p&gt;Can I explain this to an auditor in plain language? If I can't describe the test, its inputs, and its expected results to someone outside the technical team, it needs more documentation before it goes anywhere near the suite.&lt;/p&gt;

&lt;p&gt;Does it touch sensitive data? If it does, anything the model generated or suggested gets a compliance review before it runs anywhere that isn't fully isolated.&lt;/p&gt;

&lt;p&gt;Is this suite under formal validation? If the project falls under something like GAMP 5 or 21 CFR Part 11, any automated change, including one the model made on its own, goes through change control. No shortcuts.&lt;/p&gt;

&lt;p&gt;None of that is red tape for its own sake. It's the line between automation that helps a regulated product ship safely and automation that turns into a liability you discover at the worst possible moment.&lt;/p&gt;

&lt;p&gt;The bigger picture&lt;/p&gt;

&lt;p&gt;AI is going to reshape testing. I believe that, and I'm actively learning the new tools as they arrive.&lt;/p&gt;

&lt;p&gt;But in regulated industries the change will look different. Slower, more deliberate, with human judgement carrying real weight for longer. That isn't a weakness. When the software you're testing handles a medical record, a mortgage, or someone's insurance claim, a testing mistake reaches a lot further than a bad afternoon for one user.&lt;/p&gt;

&lt;p&gt;The engineers who can hold both ideas at once, moving faster with AI while keeping the rigour these industries demand, are the ones who will set the standard for what good looks like next.&lt;/p&gt;

&lt;p&gt;I'm still working mine out. These are just the questions I've found worth asking.&lt;/p&gt;

&lt;p&gt;If you've used AI tools inside a regulated environment, I'd genuinely like to hear what has held up for you and what hasn't.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>qa</category>
      <category>automation</category>
      <category>testing</category>
    </item>
  </channel>
</rss>
