<?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: NEE</title>
    <description>The latest articles on DEV Community by NEE (@terryso).</description>
    <link>https://dev.to/terryso</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F454084%2Fea33dbf7-e498-4b47-b5b2-1031b6fb3b77.png</url>
      <title>DEV Community: NEE</title>
      <link>https://dev.to/terryso</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/terryso"/>
    <language>en</language>
    <item>
      <title>AutoQA-Agent: Write Acceptance Tests in Markdown, Run Them with AI + Playwright</title>
      <dc:creator>NEE</dc:creator>
      <pubDate>Fri, 19 Dec 2025 02:31:42 +0000</pubDate>
      <link>https://dev.to/terryso/autoqa-agent-write-acceptance-tests-in-markdown-run-them-with-ai-playwright-3c1k</link>
      <guid>https://dev.to/terryso/autoqa-agent-write-acceptance-tests-in-markdown-run-them-with-ai-playwright-3c1k</guid>
      <description>&lt;p&gt;AutoQA-Agent is a &lt;strong&gt;Docs-as-Tests&lt;/strong&gt; CLI: you write acceptance tests in &lt;strong&gt;plain Markdown&lt;/strong&gt;, and it runs them via a lightweight &lt;strong&gt;Claude Agent SDK&lt;/strong&gt; loop + &lt;strong&gt;Playwright&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It focuses on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reducing script fragility&lt;/strong&gt; with snapshot-first, ref-first interactions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Letting non-engineers contribute&lt;/strong&gt; (Markdown specs)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Leaving great artifacts&lt;/strong&gt; (logs / snapshots / screenshots / traces)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Exporting passing runs&lt;/strong&gt; into standard &lt;code&gt;@playwright/test&lt;/code&gt; specs&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Write test steps in Markdown.&lt;/li&gt;
&lt;li&gt;Run: &lt;code&gt;autoqa run &amp;lt;spec-or-dir&amp;gt; --url &amp;lt;baseUrl&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Get artifacts under &lt;code&gt;.autoqa/runs/&amp;lt;runId&amp;gt;/...&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;If the spec passes, AutoQA-Agent can export to &lt;code&gt;tests/autoqa/*.spec.ts&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why this exists
&lt;/h2&gt;

&lt;p&gt;UI automation tends to break for boring reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Locators become unstable after small UI refactors.&lt;/li&gt;
&lt;li&gt;Test code is often unreadable for PMs/QAs.&lt;/li&gt;
&lt;li&gt;Failures are hard to diagnose without good context.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AutoQA-Agent treats acceptance tests as &lt;em&gt;living documentation&lt;/em&gt;, then uses an agent loop to drive a real browser and recover from transient failures.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick start
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Node.js &amp;gt;= 20&lt;/li&gt;
&lt;li&gt;Claude Code authorized (recommended) or &lt;code&gt;ANTHROPIC_API_KEY&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Install &amp;amp; build&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/terryso/AutoQA-Agent.git
&lt;span class="nb"&gt;cd &lt;/span&gt;AutoQA-Agent
npm &lt;span class="nb"&gt;install
&lt;/span&gt;npm run build
npm &lt;span class="nb"&gt;link&lt;/span&gt; &lt;span class="c"&gt;# optional&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Initialize&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;autoqa init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Run a spec&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;autoqa run specs/saucedemo-01-login.md &lt;span class="nt"&gt;--url&lt;/span&gt; https://www.saucedemo.com/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Debug (headed browser)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;autoqa run specs/saucedemo-01-login.md &lt;span class="nt"&gt;--url&lt;/span&gt; https://www.saucedemo.com/ &lt;span class="nt"&gt;--debug&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What a Markdown spec looks like
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Login&lt;/span&gt;

&lt;span class="gu"&gt;## Preconditions&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Test account exists

&lt;span class="gu"&gt;## Steps&lt;/span&gt;
&lt;span class="p"&gt;1.&lt;/span&gt; Navigate to /login
&lt;span class="p"&gt;2.&lt;/span&gt; Verify the login form is visible
&lt;span class="p"&gt;3.&lt;/span&gt; Fill the username field with standard_user
&lt;span class="p"&gt;4.&lt;/span&gt; Fill the password field with secret_sauce
&lt;span class="p"&gt;5.&lt;/span&gt; Click the "Login" button
&lt;span class="p"&gt;6.&lt;/span&gt; Verify the user is redirected to dashboard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Base URL is provided via &lt;code&gt;--url&lt;/code&gt; (the “Base URL” line in preconditions is for readability).&lt;/li&gt;
&lt;li&gt;Steps starting with &lt;strong&gt;Verify/Assert&lt;/strong&gt; (also supports Chinese “验证/断言”) are treated as assertions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How it works (high level)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Parse Markdown into preconditions + ordered steps.&lt;/li&gt;
&lt;li&gt;Run an &lt;strong&gt;observe → act → recover&lt;/strong&gt; loop using Claude Agent SDK.&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;accessibility snapshots&lt;/strong&gt; (with stable &lt;code&gt;ref&lt;/code&gt;s) to drive ref-first actions.&lt;/li&gt;
&lt;li&gt;When a tool/assertion fails, return structured errors (instead of crashing) so the agent can retry, bounded by guardrails.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Artifacts you get for free
&lt;/h2&gt;

&lt;p&gt;After a run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.autoqa/runs/&amp;lt;runId&amp;gt;/
├── run.log.jsonl
├── ir.jsonl
├── screenshots/
├── snapshots/
└── traces/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes failures much easier to debug locally &lt;em&gt;and&lt;/em&gt; in CI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Export to &lt;code&gt;@playwright/test&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Successful specs can be exported to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tests/autoqa/*.spec.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So you can keep what worked and run it as classic Playwright tests later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Roadmap (short)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Richer export (more semantic parsing + more assertion mappings)&lt;/li&gt;
&lt;li&gt;More example specs and demo projects&lt;/li&gt;
&lt;li&gt;Continuous improvement in docs and diagrams&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it / contribute
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Repo: &lt;a href="https://github.com/terryso/AutoQA-Agent" rel="noopener noreferrer"&gt;https://github.com/terryso/AutoQA-Agent&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Issues &amp;amp; PRs: welcome&lt;/li&gt;
&lt;/ul&gt;

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