Playwright Virtual Users: Load Testing What Real Browsers Actually See
This is the third post in our "Features Sitting Idle" series, where we shine a light on OctoPerf features that are already in your account but rarely used to their full potential.

"Your Application Loads Content Through JavaScript. Your Load Test Doesn't See It."¶
This is a blind spot many teams discover too late. Tests pass, metrics look fine, yet real users report slowness or errors after a release.
The root cause is almost always the same: the load test was built against the HTTP protocol layer, but the user pain happens in the browser, above that layer.
The Situations We Encounter¶
We regularly run into the same kinds of situations on customer projects:
- Browser-specific data exchanges. Applications that rely on browser extensions or non-HTTP mechanisms for critical data exchanges - standard protocol recording simply doesn't capture them.
- JavaScript-heavy SPAs. Modern Single Page Applications where the meaningful interactions happen client-side, making JMeter scripts either impossible to maintain or unable to reproduce real user behavior.
- No client-side measurement. Teams that want to measure what users actually experience in a browser under load, not just server-side response times, but don't know how to add that layer to their existing tests.
A protocol-based load test (Pure JMeter) doesn't render JavaScript. It doesn't trigger XHR calls dynamically generated by a SPA, doesn't natively handle client-side OAuth2 flows, and doesn't simulate real browser interactions.
Playwright, Natively, in OctoPerf¶
OctoPerf natively integrates Playwright as a Virtual User type.
Playwright is Microsoft's browser automation framework that drives real browsers (Chrome, Firefox, Edge). You import your Playwright script directly into OctoPerf and run it alongside classic protocol-based VUs in the same scenario.
That last part is the important one. You don't pick between protocol and browser - you combine them.
The Hybrid Approach¶
The recommended approach is hybrid: protocol-based VUs generate the volume, and a small number of Playwright VUs make sure everything's fine on the client side.
The numbers matter here. One Playwright VU consumes roughly as much resources as 200 JMeter VUs. So the goal isn't to replace volume; it's to complement the measurement.
A typical scenario looks like this:
- 9,800 JMeter VUs generating the realistic transactional volume against the API layer.
- 200 Playwright VUs running real browser journeys in parallel, on a small handful of representative paths.
The protocol VUs answer "can the backend take it?". The Playwright VUs answer "and is the actual user experience still good while it does?".
What You Actually Measure with Playwright VUs¶
Once Playwright is part of your scenario, you suddenly have access to client-side metrics that are simply invisible from a protocol test:
- Real page load times, including DOM rendering and JavaScript execution
- XHR calls that are only triggered by user interaction
- OAuth2 redirect flows handled natively by the browser
- Behavior of third-party scripts (analytics, A/B testing, ads) under load
These are not nice-to-haves. They are precisely the parts of the application that most often degrade first under load, while server-side metrics still look "green".
A Word on Scripting¶
Playwright scripts are TypeScript or JavaScript files. If your team already maintains end-to-end functional tests in Playwright, you can reuse them directly in your load testing scenarios.
That alignment between functional QA and performance testing is often where the biggest efficiency gains come from. The script that runs every night to validate the login flow is the same one that, on the day of a release, will tell you whether the login flow survived a 10x burst.
Final Reflection¶
Pure protocol testing is not dead, far from it. It still gives you the cheapest, fastest way to push a backend to its limits.
But the day a stakeholder asks "what does it actually feel like for a user during the peak?", a protocol-only test cannot answer. A hybrid scenario with a handful of Playwright VUs can.
Full documentation: api.octoperf.com/doc/design/create-virtual-user/import-playwright-node-project/