<?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: Ricardo Costa</title>
    <description>The latest articles on DEV Community by Ricardo Costa (@ricardocosta0405).</description>
    <link>https://dev.to/ricardocosta0405</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%2F3940957%2F961390be-0d9c-4410-9e8e-5bc5237e51c2.jpg</url>
      <title>DEV Community: Ricardo Costa</title>
      <link>https://dev.to/ricardocosta0405</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ricardocosta0405"/>
    <language>en</language>
    <item>
      <title>Something new to read about Playwright CLI</title>
      <dc:creator>Ricardo Costa</dc:creator>
      <pubDate>Wed, 17 Jun 2026 21:09:24 +0000</pubDate>
      <link>https://dev.to/ricardocosta0405/-1493</link>
      <guid>https://dev.to/ricardocosta0405/-1493</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/ricardocosta0405/playwright-cli-for-agent-driven-workflows-sessions-debugging-and-ci-sharding-27kk" class="crayons-story__hidden-navigation-link"&gt;Playwright CLI for agent-driven workflows: sessions, debugging, and CI Sharding&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/ricardocosta0405" class="crayons-avatar  crayons-avatar--l  "&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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3940957%2F961390be-0d9c-4410-9e8e-5bc5237e51c2.jpg" alt="ricardocosta0405 profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/ricardocosta0405" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Ricardo Costa
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Ricardo Costa
                
              
              &lt;div id="story-author-preview-content-3872506" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/ricardocosta0405" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3940957%2F961390be-0d9c-4410-9e8e-5bc5237e51c2.jpg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Ricardo Costa&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/ricardocosta0405/playwright-cli-for-agent-driven-workflows-sessions-debugging-and-ci-sharding-27kk" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jun 11&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/ricardocosta0405/playwright-cli-for-agent-driven-workflows-sessions-debugging-and-ci-sharding-27kk" id="article-link-3872506"&gt;
          Playwright CLI for agent-driven workflows: sessions, debugging, and CI Sharding
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/cicd"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;cicd&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/aiops"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;aiops&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/playwright"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;playwright&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/cli"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;cli&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/ricardocosta0405/playwright-cli-for-agent-driven-workflows-sessions-debugging-and-ci-sharding-27kk" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;2&lt;span class="hidden s:inline"&gt;&amp;nbsp;reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/ricardocosta0405/playwright-cli-for-agent-driven-workflows-sessions-debugging-and-ci-sharding-27kk#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              3&lt;span class="hidden s:inline"&gt;&amp;nbsp;comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            7 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial crayons-icon c-btn__icon"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success crayons-icon c-btn__icon"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>cicd</category>
      <category>playwright</category>
      <category>agents</category>
    </item>
    <item>
      <title>Getting deeper into AI-powered QA workflows lately, loving it so far.</title>
      <dc:creator>Ricardo Costa</dc:creator>
      <pubDate>Thu, 11 Jun 2026 11:02:56 +0000</pubDate>
      <link>https://dev.to/ricardocosta0405/getting-deeper-into-ai-powered-qa-workflows-lately-loving-it-so-far-1341</link>
      <guid>https://dev.to/ricardocosta0405/getting-deeper-into-ai-powered-qa-workflows-lately-loving-it-so-far-1341</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/ricardocosta0405/playwright-cli-for-agent-driven-workflows-sessions-debugging-and-ci-sharding-27kk" class="crayons-story__hidden-navigation-link"&gt;Playwright CLI for agent-driven workflows: sessions, debugging, and CI Sharding&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/ricardocosta0405" class="crayons-avatar  crayons-avatar--l  "&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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3940957%2F961390be-0d9c-4410-9e8e-5bc5237e51c2.jpg" alt="ricardocosta0405 profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/ricardocosta0405" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Ricardo Costa
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Ricardo Costa
                
              
              &lt;div id="story-author-preview-content-3872506" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/ricardocosta0405" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3940957%2F961390be-0d9c-4410-9e8e-5bc5237e51c2.jpg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Ricardo Costa&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/ricardocosta0405/playwright-cli-for-agent-driven-workflows-sessions-debugging-and-ci-sharding-27kk" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jun 11&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/ricardocosta0405/playwright-cli-for-agent-driven-workflows-sessions-debugging-and-ci-sharding-27kk" id="article-link-3872506"&gt;
          Playwright CLI for agent-driven workflows: sessions, debugging, and CI Sharding
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/cicd"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;cicd&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/aiops"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;aiops&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/playwright"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;playwright&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/cli"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;cli&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/ricardocosta0405/playwright-cli-for-agent-driven-workflows-sessions-debugging-and-ci-sharding-27kk" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;2&lt;span class="hidden s:inline"&gt;&amp;nbsp;reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/ricardocosta0405/playwright-cli-for-agent-driven-workflows-sessions-debugging-and-ci-sharding-27kk#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              3&lt;span class="hidden s:inline"&gt;&amp;nbsp;comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            7 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial crayons-icon c-btn__icon"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success crayons-icon c-btn__icon"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>agents</category>
      <category>ai</category>
      <category>automation</category>
      <category>testing</category>
    </item>
    <item>
      <title>Playwright CLI for agent-driven workflows: sessions, debugging, and CI Sharding</title>
      <dc:creator>Ricardo Costa</dc:creator>
      <pubDate>Thu, 11 Jun 2026 09:50:58 +0000</pubDate>
      <link>https://dev.to/ricardocosta0405/playwright-cli-for-agent-driven-workflows-sessions-debugging-and-ci-sharding-27kk</link>
      <guid>https://dev.to/ricardocosta0405/playwright-cli-for-agent-driven-workflows-sessions-debugging-and-ci-sharding-27kk</guid>
      <description>&lt;p&gt;Playwright has excellent tooling around browser automation, but most of the ecosystem still treats it as a test framework. For teams running AI coding agents and automated browser workflows, there is a different set of requirements:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;browser automation
    ↓
session persistence across runs
    ↓
debuggable traces when things go wrong
    ↓
parallel execution across CI shards
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Playwright CLI directly addresses these gaps. It ships as a standalone npm package and exposes every browser operation as a CLI command; open, click, type, snapshot - without requiring a Node.js script or test runner.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;npm package:&lt;/strong&gt; @playwright/cli&lt;br&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/microsoft/playwright-cli" rel="noopener noreferrer"&gt;https://github.com/microsoft/playwright-cli&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The current implementation focuses on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;session persistence with named instances and portable state&lt;/li&gt;
&lt;li&gt;video and trace recording built into every session&lt;/li&gt;
&lt;li&gt;CI sharding for parallel execution at scale&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  session persistence
&lt;/h2&gt;

&lt;p&gt;The default behaviour keeps browser state in memory. Cookies and localStorage are preserved between CLI calls within the session, but cleared when the browser closes. For repeatable workflows, that breaks down fast — logging into an application before every run wastes time and introduces flakiness.&lt;/p&gt;

&lt;p&gt;Named sessions let you run multiple browser instances simultaneously and address them by name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;playwright-cli -s=admin open https://app.example.com/admin
playwright-cli -s=checkout open https://app.example.com/checkout
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each session is an isolated browser instance. An agent can orchestrate workflows across multiple authenticated contexts without state leaking between them. The goal is straightforward:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the same CLI binary should be able to maintain independent browser contexts for parallel workflows without requiring environment-specific configuration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The critical piece for CI and agent reuse is state persistence:&lt;br&gt;
&lt;em&gt;log in once&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;playwright-cli -s=admin open https://app.example.com/login
playwright-cli -s=admin fill "#username" "admin"
playwright-cli -s=admin fill "#password" "$ADMIN_PASS"
playwright-cli -s=admin click "button[type=submit]"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;save cookies + localStorage to portable JSON&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;playwright-cli -s=admin state-save admin-auth.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;restore in any future session - no re-authentication&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;playwright-cli -s=admin state-load admin-auth.json
playwright-cli -s=admin open https://app.example.com/dashboard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The state-save and state-load commands persist cookies, localStorage, and sessionStorage to a portable JSON file. Log in once, restore auth in every future session, no re-authenticating.&lt;/p&gt;

&lt;p&gt;For long-lived workflows that need full browser profile persistence across restarts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;playwright-cli open https://app.example.com --persistent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The --persistent flag saves the complete browser profile to disk.&lt;br&gt;
Cookies, extensions, service workers, and IndexedDB survive browser restarts. &lt;br&gt;
This is effectively a reusable browser identity.&lt;/p&gt;

&lt;p&gt;Session management at scale:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;playwright-cli list                    # list all active sessions
playwright-cli -s=stale close          # stop a named browser
playwright-cli -s=stale delete-data    # clean up user data
playwright-cli close-all               # close all browsers
playwright-cli kill-all                # forcefully kill all browser processes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Agents can also pick up the session name from the environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PLAYWRIGHT_CLI_SESSION=todo-app claude .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  why not just screenshot failures?
&lt;/h2&gt;

&lt;p&gt;Many teams rely on failure screenshots as their primary debugging signal. That approach tends to be fragile because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a screenshot captures one moment, not the sequence that led to it&lt;/li&gt;
&lt;li&gt;timing issues are invisible in a static image&lt;/li&gt;
&lt;li&gt;network requests and console errors are absent&lt;/li&gt;
&lt;li&gt;the agent performing the actions may interact with the page in unexpected ways&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead, the Playwright CLI provides two built-in recording mechanisms that capture the full execution context.&lt;/p&gt;




&lt;h2&gt;
  
  
  video recording
&lt;/h2&gt;

&lt;p&gt;The CLI can record .webm video of an entire session:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;playwright-cli video-start session-debug.webm
playwright-cli -s=checkout open https://app.example.com/checkout
playwright-cli -s=checkout click "#add-to-cart"
playwright-cli -s=checkout click "#checkout"
playwright-cli video-stop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;During recording, you can annotate actions with callouts and chapter markers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;playwright-cli video-show-actions      # annotate each action with a callout
playwright-cli video-chapter "Login flow"
playwright-cli video-chapter "Checkout flow"
playwright-cli video-hide-actions      # stop annotating
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This produces a timestamped, annotated video of exactly what happened. When an AI agent clicks the wrong element or navigates unexpectedly, the video shows the sequence as it occurred, not a single post-mortem screenshot.&lt;/p&gt;

&lt;p&gt;Video can also be enabled declaratively in the config file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;json
{
  "saveVideo": {
    "width": 1280,
    "height": 720
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  trace recording
&lt;/h2&gt;

&lt;p&gt;Traces go deeper than video. &lt;br&gt;
A Playwright Trace file contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;full DOM snapshots at each action&lt;/li&gt;
&lt;li&gt;network requests and responses&lt;/li&gt;
&lt;li&gt;console logs&lt;/li&gt;
&lt;li&gt;execution timeline&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Recording a trace:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;playwright-cli tracing-start
playwright-cli -s=checkout open https://app.example.com/checkout
playwright-cli -s=checkout click "#add-to-cart"
playwright-cli -s=checkout click "#checkout"
playwright-cli tracing-stop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output is a trace file inspectable in the Playwright Trace Viewer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx playwright show-trace trace.zip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or open &lt;a href="https://trace.playwright.dev" rel="noopener noreferrer"&gt;https://trace.playwright.dev&lt;/a&gt; in a browser and drop the file in.&lt;/p&gt;

&lt;p&gt;Inside the viewer you can step through every action, inspect the DOM at each point, examine network requests, view console output, and see exactly what the browser rendered at each step. This is critical when an agent does something unexpected; you are not guessing from a screenshot, you are replaying the entire session.&lt;/p&gt;

&lt;p&gt;Traces can also be enabled via environment variable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PLAYWRIGHT_MCP_SAVE_TRACE=1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  the visual dashboard
&lt;/h2&gt;

&lt;p&gt;For real-time observation of running agent sessions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;playwright-cli show
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This opens a window with a session grid showing all active sessions grouped by workspace, each with a live screencast preview, current URL, and page title. Click any session to zoom in and take control, click into the viewport to drive the browser manually, press Escape to release. From the grid you can also close sessions or delete data for inactive ones.&lt;/p&gt;

&lt;p&gt;For design review and UI feedback, the dashboard supports annotations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;playwright-cli show --annotate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  CI sharding
&lt;/h2&gt;

&lt;p&gt;Sharding is where the CLI integrates with Playwright Test's parallel execution model. The core idea: split your test suite into N shards, run each shard on a separate CI job, and merge the results.&lt;/p&gt;

&lt;p&gt;Playwright Test natively supports sharding:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx playwright test --shard=1/4
npx playwright test --shard=2/4
npx playwright test --shard=3/4
npx playwright test --shard=4/4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each shard runs an approximately equal portion of the test files. When fullyParallel: true is enabled in the config, sharding balances at the individual test level rather than the file level, producing more even distribution.&lt;/p&gt;

&lt;p&gt;The CLI session model composes naturally with sharded CI jobs. Each shard gets its own named session:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;CI job for shard 1&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export PLAYWRIGHT_CLI_SESSION="shard-1"
npx playwright test --shard=1/4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;CI job for shard 2&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export PLAYWRIGHT_CLI_SESSION="shard-2"
npx playwright test --shard=2/4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This keeps browser state isolated between shards. Sessions run headlessly by default on CI; pass --headed to open only when you need to observe a specific session.&lt;/p&gt;




&lt;h2&gt;
  
  
  merging reports across shards
&lt;/h2&gt;

&lt;p&gt;Each shard produces its own report. &lt;br&gt;
To produce a unified view, use the blob reporter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;typescript
// playwright.config.ts
export default defineConfig({
  reporter: process.env.CI ? 'blob' : 'html',
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Blob reports contain all test results plus attachments; traces, screenshots, video. &lt;br&gt;
After all shards complete, merge:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx playwright merge-reports --reporter html ./all-blob-reports
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This produces a single HTML report in playwright-report/ with the combined results from every shard, including all traces and videos from every session.&lt;/p&gt;




&lt;h2&gt;
  
  
  GitHub Actions example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yaml
name: Playwright Tests
on:
  push:
    branches: [main]
jobs:
  test:
    strategy:
      matrix:
        shardIndex: [1, 2, 3, 4]
        shardTotal: [4]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm ci
      - run: npx playwright install --with-deps
      - run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
        env:
          PLAYWRIGHT_CLI_SESSION: "shard-${{ matrix.shardIndex }}"
      - uses: actions/upload-artifact@v4
        if: always()
        with:
          name: blob-report-${{ matrix.shardIndex }}
          path: blob-report/
  merge-reports:
    if: always()
    needs: [test]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm ci
      - uses: actions/download-artifact@v4
        with:
          pattern: blob-report-*
          path: all-blob-reports
      - run: npx playwright merge-reports --reporter html ./all-blob-reports
      - uses: actions/upload-artifact@v4
        with:
          name: html-report
          path: playwright-report/


Each shard runs independently, uploads its blob report, and a final job merges everything into a single HTML report with all traces and videos attached.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  the agent debugging loop
&lt;/h2&gt;

&lt;p&gt;The part I find most interesting is how these features compose into a debugging workflow for AI-driven browser automation.&lt;/p&gt;

&lt;p&gt;When an agent runs a workflow and something fails, the typical debugging approach involves:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- thousands of log lines
- screenshots
- console output
- stack traces
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works, but scales poorly. &lt;br&gt;
As more workflows run through agents, the volume of debugging context grows quickly.&lt;/p&gt;

&lt;p&gt;With the CLI tooling, the debugging signal is structured from the start:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Open the merged HTML report → see which shard and which test failed
2. Open the trace for that session → step through every action frame by frame
3. Watch the session video → see the visual result of each action
4. Inspect network requests in the trace → confirm API calls returned expected data
5. Check console output in the trace → catch JavaScript errors on the page
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The goal is not just better debugging. The goal is to reduce the time between "something went wrong" and "I can see exactly what happened."&lt;/p&gt;




&lt;h2&gt;
  
  
  open questions
&lt;/h2&gt;

&lt;p&gt;Some areas I am currently exploring:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;should session state be committed to the repository for deterministic replay, or kept ephemeral?&lt;/li&gt;
&lt;li&gt;at what point does per-shard video recording become too expensive in storage?&lt;/li&gt;
&lt;li&gt;can trace diffs between passing and failing runs be automated to highlight the exact divergence point?&lt;/li&gt;
&lt;li&gt;should agents receive the full trace or a machine-readable summary first?&lt;/li&gt;
&lt;li&gt;how much of the debugging loop can be automated before human review becomes necessary?&lt;/li&gt;
&lt;li&gt;what is the smallest useful artifact set for an agent to diagnose a failure: one trace, one video, one screenshot, or all three?&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  next steps
&lt;/h2&gt;

&lt;p&gt;Current roadmap items include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;deeper integration between CLI session state and Playwright Test fixtures&lt;/li&gt;
&lt;li&gt;automated trace diffing between baseline and failing runs&lt;/li&gt;
&lt;li&gt;agent-friendly failure summaries as structured output&lt;/li&gt;
&lt;li&gt;shard-aware video and trace artifact routing&lt;/li&gt;
&lt;li&gt;persistent session profiles as reusable CI artifacts&lt;/li&gt;
&lt;li&gt;locator stability analysis from trace data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Curious how other teams running Playwright CLI in production agent-driven workflows are approaching these problems.&lt;/p&gt;

</description>
      <category>cicd</category>
      <category>aiops</category>
      <category>playwright</category>
      <category>cli</category>
    </item>
    <item>
      <title>Building a CI helper for Playwright Java</title>
      <dc:creator>Ricardo Costa</dc:creator>
      <pubDate>Tue, 02 Jun 2026 18:29:35 +0000</pubDate>
      <link>https://dev.to/ricardocosta0405/building-a-ci-helper-for-playwright-java-43i6</link>
      <guid>https://dev.to/ricardocosta0405/building-a-ci-helper-for-playwright-java-43i6</guid>
      <description>&lt;p&gt;Playwright has excellent tooling around browser automation, but most of the ecosystem still feels heavily Node.js-centric.&lt;/p&gt;

&lt;p&gt;For Java teams, there's a surprising amount of infrastructure work that sits between:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push
   ↓
ci execution
   ↓
useful failure diagnostics
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To explore that gap, I built a small Java CLI:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub repo:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/ricardo-costa0405/playwright-java-ci-helper" rel="noopener noreferrer"&gt;https://github.com/ricardo-costa0405/playwright-java-ci-helper&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The current implementation focuses on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;build system detection&lt;/li&gt;
&lt;li&gt;test execution&lt;/li&gt;
&lt;li&gt;artifact collection&lt;/li&gt;
&lt;li&gt;machine-readable failure summaries&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  build system detection
&lt;/h2&gt;

&lt;p&gt;The first requirement was zero project configuration.&lt;/p&gt;

&lt;p&gt;The helper attempts to detect:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./mvnw
pom.xml
./gradlew
build.gradle
build.gradle.kts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and automatically generates the appropriate execution strategy.&lt;/p&gt;

&lt;p&gt;The goal is straightforward:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;the same binary should be able to run inside arbitrary playwright java repositories without requiring repository-specific configuration.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This allows the tool to work consistently across Maven and Gradle projects while keeping onboarding friction close to zero.&lt;/p&gt;




&lt;h2&gt;
  
  
  test execution
&lt;/h2&gt;

&lt;p&gt;The helper can execute either an automatically detected build command or a user-supplied command.&lt;/p&gt;

&lt;p&gt;Examples:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;java &lt;span class="nt"&gt;-jar&lt;/span&gt; playwright-java-ci-helper.jar &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--project-dir&lt;/span&gt; my-project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;java &lt;span class="nt"&gt;-jar&lt;/span&gt; playwright-java-ci-helper.jar &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--test-command&lt;/span&gt; &lt;span class="s2"&gt;"mvn test -Dtest=LoginTest"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An optional setup phase can also be be executed before running tests.&lt;/p&gt;

&lt;p&gt;This allows repositories to perform environment preparation, Playwright installation, or custom bootstrap steps before execution begins.&lt;/p&gt;




&lt;h2&gt;
  
  
  why not parse console logs?
&lt;/h2&gt;

&lt;p&gt;Many CI systems still derive test status from stdout.&lt;/p&gt;

&lt;p&gt;That approach tends to be fragile because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;log formats change&lt;/li&gt;
&lt;li&gt;plugins inject additional output&lt;/li&gt;
&lt;li&gt;parallel execution interleaves messages&lt;/li&gt;
&lt;li&gt;different frameworks produce different structures&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead, the helper parses JUnit XML directly and extracts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tests
failures
errors
skipped
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;from the actual source of truth.&lt;/p&gt;

&lt;p&gt;This produces deterministic results regardless of how verbose or customized the console output becomes.&lt;/p&gt;




&lt;h2&gt;
  
  
  artifact collection
&lt;/h2&gt;

&lt;p&gt;The less obvious challenge is artifact discovery.&lt;/p&gt;

&lt;p&gt;A failing Playwright run can generate output across multiple locations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;target/surefire-reports
target/failsafe-reports
build/test-results
build/reports/tests
playwright-report
test-results
screenshots
videos
traces
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;depending on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;build tool&lt;/li&gt;
&lt;li&gt;project structure&lt;/li&gt;
&lt;li&gt;reporting configuration&lt;/li&gt;
&lt;li&gt;team conventions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The helper currently collects only artifacts generated during the active execution window.&lt;/p&gt;

&lt;p&gt;This avoids a common CI problem where stale artifacts from previous executions are accidentally included in failure analysis.&lt;/p&gt;




&lt;h2&gt;
  
  
  CI sharding
&lt;/h2&gt;

&lt;p&gt;One area I wanted to support from the beginning was CI parallelization.&lt;br&gt;
The helper exports:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PW_JAVA_CI_SHARD_INDEX
PW_JAVA_CI_SHARD_TOTAL
PW_JAVA_CI_WORKERS
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and automatically injects equivalent parameters into Maven and Gradle executions.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;java &lt;span class="nt"&gt;-jar&lt;/span&gt; playwright-java-ci-helper.jar &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--shard-index&lt;/span&gt; 2 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--shard-total&lt;/span&gt; 4 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--workers&lt;/span&gt; 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The idea is to keep orchestration concerns outside the test implementation itself.&lt;/p&gt;




&lt;h2&gt;
  
  
  machine-readable failure context
&lt;/h2&gt;

&lt;p&gt;The part I find most interesting isn't the reporting itself.&lt;br&gt;
It's creating a deterministic interface between CI systems and automated tooling.&lt;br&gt;
Today, many teams experimenting with agents and AI-assisted debugging are still passing large amounts of raw information:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;thousands of log lines
screenshots
reports
traces
console output
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The approach works, but it scales poorly.&lt;br&gt;
As more platforms move toward API-based billing models, context size starts becoming an engineering concern rather than just an implementation detail.&lt;/p&gt;

&lt;p&gt;Instead of sending:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;4000+ lines of CI logs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;a tool can provide:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"tests"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;182&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"failures"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"screenshots"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"traces"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"failedTests"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The goal isn't only to improve signal quality.&lt;br&gt;
The goal is to reduce the amount of context required for an agent to reason about a failure.&lt;/p&gt;

&lt;p&gt;This becomes increasingly important when traces, screenshots, reports, and execution logs start accumulating across hundreds or thousands of CI runs.&lt;/p&gt;

&lt;p&gt;I suspect we'll see more tooling move in this direction as agents become part of the standard engineering workflow.&lt;/p&gt;


&lt;h2&gt;
  
  
  generating playwright java skeletons
&lt;/h2&gt;

&lt;p&gt;I've also been experimenting with generating Playwright Java test skeletons from browser interaction flows and agent command scripts.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;playwright-cli open https://demo.playwright.dev/todomvc
playwright-cli type "Buy groceries"
playwright-cli press Enter
playwright-cli screenshot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;can be transformed into a Java test template.&lt;br&gt;
One interesting limitation is locator generation.&lt;/p&gt;

&lt;p&gt;Agent references such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;e21
e37
e42
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cannot safely be translated into stable Playwright locators.&lt;br&gt;
The generated code compiles, but locator selection remains a human responsibility.&lt;/p&gt;

&lt;p&gt;At least for now, a human-in-the-loop approach feels significantly more realistic than fully autonomous test generation.&lt;/p&gt;




&lt;h2&gt;
  
  
  open questions
&lt;/h2&gt;

&lt;p&gt;Some areas I'm currently exploring:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;should junit parsing remain framework-agnostic?&lt;/li&gt;
&lt;li&gt;or should framework-specific adapters be introduced for richer diagnostics (e.g. TestNG retries, groups and dependencies)?&lt;/li&gt;
&lt;li&gt;is artifact collection better handled through plugins than filesystem discovery?&lt;/li&gt;
&lt;li&gt;what is the smallest useful schema for agent-driven failure analysis?&lt;/li&gt;
&lt;li&gt;can locator repair be performed safely without introducing additional flakiness?&lt;/li&gt;
&lt;li&gt;how much CI context should be exposed to agents before signal becomes noise?&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  next steps
&lt;/h2&gt;

&lt;p&gt;Current roadmap items include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;testng support&lt;/li&gt;
&lt;li&gt;richer failure diagnostics&lt;/li&gt;
&lt;li&gt;ai-friendly summaries&lt;/li&gt;
&lt;li&gt;sarif output&lt;/li&gt;
&lt;li&gt;environment validation ("doctor" command)&lt;/li&gt;
&lt;li&gt;locator repair suggestions&lt;/li&gt;
&lt;li&gt;deeper agent integrations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The project is still in its early stages, but the objective is simple:&lt;br&gt;
Build better tooling around the gap between test execution and actionable failure diagnostics for Playwright Java teams.&lt;/p&gt;

&lt;p&gt;I'm curious how other teams running Playwright Java at scale are approaching these problems&lt;/p&gt;

</description>
      <category>ci</category>
      <category>playwright</category>
      <category>java</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
