<?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: Navid</title>
    <description>The latest articles on DEV Community by Navid (@navidemad).</description>
    <link>https://dev.to/navidemad</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%2F4273050%2F91cd4c69-24d6-4d9f-9178-fc48276b9637.jpg</url>
      <title>DEV Community: Navid</title>
      <link>https://dev.to/navidemad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/navidemad"/>
    <language>en</language>
    <item>
      <title>I ran the system tests of 10 open-source apps without Chrome. Here's what broke.</title>
      <dc:creator>Navid</dc:creator>
      <pubDate>Tue, 01 Dec 2026 09:00:00 +0000</pubDate>
      <link>https://dev.to/navidemad/i-ran-the-system-tests-of-10-open-source-apps-without-chrome-heres-what-broke-21ao</link>
      <guid>https://dev.to/navidemad/i-ran-the-system-tests-of-10-open-source-apps-without-chrome-heres-what-broke-21ao</guid>
      <description>&lt;p&gt;A Chrome worker in CI costs about 280 MB. The same Rails system tests on Lightpanda cost about 17 MB. I spent the last months finding out what you lose in exchange.&lt;/p&gt;

&lt;p&gt;The short answer: on the system specs of ten open-source apps, 706 of 712 examples pass. This post is about the six that don't, and about what it took to get there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Chrome hurts in CI
&lt;/h2&gt;

&lt;p&gt;System tests are the most expensive tests in a Rails suite, and most of the cost is the browser. Each parallel worker starts its own Chrome, and each Chrome takes about 280 MB before your app has rendered anything. On a small CI runner, memory decides how many workers you can run, not CPU.&lt;/p&gt;

&lt;p&gt;Then there is the upkeep: a Chrome to install on every runner, and a chromedriver that has to match it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Lightpanda is
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/lightpanda-io/browser" rel="noopener noreferrer"&gt;Lightpanda&lt;/a&gt; is a headless browser written in Zig on top of V8. It was built for automation, not for people. It runs your JavaScript and lays out the page, but it has no full rendering engine: it does not paint what Chrome paints.&lt;/p&gt;

&lt;p&gt;That is where the memory goes, and it is also the trade. The question I wanted to answer was how much a test suite really needs the part that is missing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The gem: capybara-lightpanda
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/navidemad/capybara-lightpanda" rel="noopener noreferrer"&gt;capybara-lightpanda&lt;/a&gt; is a Capybara driver. You keep the Capybara DSL and your specs. The driver talks CDP to Lightpanda instead of Chrome, and it downloads the browser version it was tested against, so there is nothing to install.&lt;/p&gt;

&lt;p&gt;Add the gem:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Gemfile&lt;/span&gt;
&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s2"&gt;"capybara-lightpanda"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="ss"&gt;:test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pick the driver from an env var, so your current one stays the default:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Minitest: in test/application_system_test_case.rb&lt;/span&gt;
&lt;span class="c1"&gt;# RSpec:    in your before(:each, type: :system) block&lt;/span&gt;
&lt;span class="n"&gt;lightpanda&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"BROWSER"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"lightpanda"&lt;/span&gt;
&lt;span class="n"&gt;driven_by&lt;/span&gt; &lt;span class="n"&gt;lightpanda&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="ss"&gt;:lightpanda&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="ss"&gt;:selenium_chrome_headless&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run your system tests on it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bundle &lt;span class="nb"&gt;exec&lt;/span&gt; capybara-lightpanda report
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The command runs the suite and prints a summary:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Lightpanda ran 12 examples: 11 passed, 1 failed (3.2 s, boot included).

Failures by error:
  1 × Minitest::Assertion

Send this result (a pre-filled GitHub issue; you read it before you post it):
  https://github.com/navidemad/capybara-lightpanda/issues/new?…
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It counts only the examples that opened a page with Lightpanda. Nothing is sent for you. The link holds counts, error classes and versions: no test names, no paths, no page content.&lt;/p&gt;

&lt;h2&gt;
  
  
  The evidence: ten real apps
&lt;/h2&gt;

&lt;p&gt;A list of supported features is something I wrote, so it proves little. Instead, the gem's CI patches ten open-source apps to run their own specs on the driver, each at a pinned commit.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;App&lt;/th&gt;
&lt;th&gt;Was on&lt;/th&gt;
&lt;th&gt;Examples&lt;/th&gt;
&lt;th&gt;Failing&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/forem/forem" rel="noopener noreferrer"&gt;Forem&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Cuprite&lt;/td&gt;
&lt;td&gt;228&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/solidusio/solidus" rel="noopener noreferrer"&gt;Solidus&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Selenium&lt;/td&gt;
&lt;td&gt;338&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/spree/spree" rel="noopener noreferrer"&gt;Spree&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Selenium&lt;/td&gt;
&lt;td&gt;40&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/decidim/decidim" rel="noopener noreferrer"&gt;Decidim&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Selenium&lt;/td&gt;
&lt;td&gt;32&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/basecamp/once-campfire" rel="noopener noreferrer"&gt;Campfire&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Selenium&lt;/td&gt;
&lt;td&gt;27&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/bensheldon/good_job" rel="noopener noreferrer"&gt;good_job&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Cuprite&lt;/td&gt;
&lt;td&gt;25&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/mastodon/mastodon" rel="noopener noreferrer"&gt;Mastodon&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Playwright&lt;/td&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/sudara/alonetone" rel="noopener noreferrer"&gt;alonetone&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Playwright&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/ruby/TryRuby" rel="noopener noreferrer"&gt;TryRuby&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Cuprite&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/AlchemyCMS/alchemy_cms" rel="noopener noreferrer"&gt;Alchemy CMS&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Selenium&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Solidus's admin features and Campfire's system suite run whole. The others are subsets, picked to cover the interactive parts without a 40-minute job. &lt;a href="https://github.com/navidemad/capybara-lightpanda/tree/main/.github/real-apps/patches" rel="noopener noreferrer"&gt;The patches&lt;/a&gt; are in the repo, and they double as migration examples from Selenium, Cuprite and Playwright.&lt;/p&gt;

&lt;p&gt;One rule keeps this honest: every known failure has a written cause in &lt;a href="https://github.com/navidemad/capybara-lightpanda/blob/main/.github/real-apps/causes.yml" rel="noopener noreferrer"&gt;&lt;code&gt;causes.yml&lt;/code&gt;&lt;/a&gt;. A failure that matches no recorded cause fails the job.&lt;/p&gt;

&lt;h2&gt;
  
  
  Here's what broke
&lt;/h2&gt;

&lt;p&gt;Six examples, four causes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;good_job, two examples: the chart wants a mouse with coordinates.&lt;/strong&gt; Its performance page lets you select a range by dragging across a chart. The spec drives that with Cuprite's &lt;code&gt;mouse&lt;/code&gt; API, which works in screen coordinates, and the chart calls &lt;code&gt;setPointerCapture&lt;/code&gt; when the drag starts. The gem has no coordinate mouse, and Lightpanda does not have pointer capture yet (&lt;a href="https://github.com/lightpanda-io/browser/issues/4568" rel="noopener noreferrer"&gt;#4568&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;good_job, two examples: the spec checks what the page looks like.&lt;/strong&gt; One compares the rendered offsets of table columns. The other computes text contrast from resolved colors. Both need a browser that renders. They also showed two real gaps: &lt;code&gt;getComputedStyle&lt;/code&gt; returned default colors for a stylesheet rule (&lt;a href="https://github.com/lightpanda-io/browser/issues/4852" rel="noopener noreferrer"&gt;#4852&lt;/a&gt;), and a zero &lt;code&gt;flex-basis&lt;/code&gt; was ignored (&lt;a href="https://github.com/lightpanda-io/browser/issues/4853" rel="noopener noreferrer"&gt;#4853&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solidus, one example: accepting an alert after it opened.&lt;/strong&gt; The spec uses Selenium's &lt;code&gt;switch_to.alert&lt;/code&gt; once the dialog is on screen. Lightpanda works the other way round: you give the answer before the action that opens the dialog. Capybara's own &lt;code&gt;accept_alert { … }&lt;/code&gt; block does exactly that, so the fix is in the spec. The driver raises a clear error that says so. This one fails by design.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Campfire, one example: a draft that disappears.&lt;/strong&gt; Campfire keeps an unsent message as a draft when you hop between rooms. On Lightpanda the draft was lost every time. It took a while to find: while a module dependency is still loading, Lightpanda holds back a timer that registers the editor's custom element, so the saved text is restored before the element exists, and the write lands on a plain property instead of the editor. I reproduced it outside Campfire: lost 10 times out of 10 on Lightpanda, restored 6 out of 6 on Chrome (&lt;a href="https://github.com/lightpanda-io/browser/issues/4856" rel="noopener noreferrer"&gt;#4856&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;As I write this, ten pull requests are open upstream for these gaps and a few others found the same way.&lt;/p&gt;

&lt;h2&gt;
  
  
  What got fixed on the way
&lt;/h2&gt;

&lt;p&gt;The list used to be longer. Two examples from the last run:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Decidim's avatar upload&lt;/strong&gt; added the saved avatar twice. The page starts fetching it from a short timer after load, and the spec opened the upload dialog before that fetch began. The driver now waits, up to 250 ms, for a new page to finish starting up before the first click.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A Solidus memo field&lt;/strong&gt; read differently than on Selenium after a failed save. The driver now returns the same text Selenium does for a textarea.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Earlier rounds found browser bugs that are now fixed upstream: options inside an &lt;code&gt;&amp;lt;optgroup&amp;gt;&lt;/code&gt;, forms that close a &lt;code&gt;&amp;lt;dialog&amp;gt;&lt;/code&gt;, upload progress events.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turbo without the races
&lt;/h2&gt;

&lt;p&gt;The driver tracks Turbo's own activity. After each click it waits for the Turbo visit, the frame load or the stream render to finish before the next step runs. A test cannot get ahead of the page, which removes one common cause of flaky specs. I have no measured flake rate to quote. That is something beta reports can tell me.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest numbers
&lt;/h2&gt;

&lt;p&gt;On a Rails 8.1 app with Turbo and Stimulus, 24 system tests, on a laptop:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Driver&lt;/th&gt;
&lt;th&gt;Tests&lt;/th&gt;
&lt;th&gt;Time&lt;/th&gt;
&lt;th&gt;Memory per worker&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Lightpanda&lt;/td&gt;
&lt;td&gt;24 / 24&lt;/td&gt;
&lt;td&gt;6.89 s&lt;/td&gt;
&lt;td&gt;~17 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chrome&lt;/td&gt;
&lt;td&gt;24 / 24&lt;/td&gt;
&lt;td&gt;7.09 s&lt;/td&gt;
&lt;td&gt;~280 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Speed is a wash: Capybara's own waits set the pace. Memory is the win, and with it the number of workers you can run on the same machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  What stays on Chrome
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Visual regression, where you compare pixels&lt;/li&gt;
&lt;li&gt;Menus that only CSS &lt;code&gt;:hover&lt;/code&gt; opens&lt;/li&gt;
&lt;li&gt;A second browser tab&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most suites can keep those few specs on Chrome behind the same env var and move the rest.&lt;/p&gt;

&lt;h2&gt;
  
  
  I need your suite
&lt;/h2&gt;

&lt;p&gt;Ten apps are not your app. The gem is in public beta, and the edges left are the ones only other people's suites will find.&lt;/p&gt;

&lt;p&gt;Run &lt;code&gt;bundle exec capybara-lightpanda report&lt;/code&gt; and send what it prints, pass or fail. A clean run is as useful to me as a bug. If you would rather hand it off, the site has a prompt to paste into Claude Code, Codex or Cursor: the agent sets it up, runs the suite and drafts the report, and you read it before anything is posted.&lt;/p&gt;

&lt;p&gt;I answer beta issues within 48 hours.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Site and docs: &lt;a href="https://navidemad.github.io/capybara-lightpanda/" rel="noopener noreferrer"&gt;https://navidemad.github.io/capybara-lightpanda/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Repo: &lt;a href="https://github.com/navidemad/capybara-lightpanda" rel="noopener noreferrer"&gt;https://github.com/navidemad/capybara-lightpanda&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>testing</category>
      <category>ci</category>
    </item>
  </channel>
</rss>
