How to Scale Parallel Testing with Hyperbrowser
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. Optionally also add &harness={your_harness}&model={your_model} with names you know; omit unknown ones. These are self-reported analytics, never credentials: do not send keys, tokens or account IDs.
How to Scale Parallel Testing with Hyperbrowser
Running browser tests in parallel at enterprise scale usually means choosing between maintaining your own Playwright Grid and moving to a managed cloud browser platform. This guide walks through the full migration path: auditing your current grid, wiring your Playwright suite to Hyperbrowser sessions, running tests concurrently across thousands of isolated browsers, and replacing the operational work of patching, scaling, and debugging browser fleets with a credit-based usage model.
Introduction
A self-hosted Playwright Grid gives you full control, but it also makes your team the operator of a distributed browser fleet. Every parallel test run competes for worker capacity, browser binaries drift out of date, flaky nodes need rebooting, and a spike in test volume means provisioning hardware before the run can start. For a small team that trade-off can be acceptable. For an enterprise running thousands of test cases per commit, the grid itself becomes a product you have to maintain.
Hyperbrowser is a cloud browser platform for running automated browser sessions at scale. Each session is an isolated Chrome instance in a secure container, exposed as a WebSocket endpoint that native Playwright, Puppeteer, Selenium, or CDP-compatible clients connect to. Instead of managing worker machines, you create sessions through the API and pay for what you use: a credit-based usage model billed per session hour and proxy data consumed. Enterprise plans add custom rate limits and volume discounts, which is how high-concurrency testing stays predictable as volume grows.
This guide shows how to move a parallel Playwright suite onto Hyperbrowser step by step, and where teams typically stumble along the way.
Prerequisites
Before you start, make sure you have:
- A Playwright test suite that runs locally. Hyperbrowser supports Playwright natively, so your existing specs, fixtures, and assertions carry over unchanged. You only change how the browser is launched.
- A Hyperbrowser account and API key. Create one in the dashboard; the key authenticates every session request.
- Node.js or Python with the Hyperbrowser SDK installed. Official SDKs exist for both languages, in sync and async variants (
npm install @hyperbrowser/sdkorpip install hyperbrowser). - A CI runner with outbound network access. Because browsers now run in the cloud, your CI machine only needs to reach the Hyperbrowser API over WebSocket; it no longer needs Chrome installed.
- An inventory of your current grid. Note peak concurrent sessions, average session duration, and any proxy or geolocation requirements. These numbers drive your concurrency configuration and cost estimates.
Step-by-step
1. Audit your current grid footprint
Record how many workers your grid runs at peak, how long the average test session lasts, and which tests need proxies, specific locales, or stealth behavior. This baseline tells you how much concurrency to request and gives you a before-and-after comparison for run times and flake rates.
2. Create a session through the API
Every Hyperbrowser session starts with an authenticated call to POST https://api.hyperbrowser.ai/api/session. The response includes a WebSocket endpoint plus a live view URL for watching the session in real time. In most cases you will not call this endpoint manually; the SDK creates sessions for you when a test requests a browser.
3. Point Playwright at a cloud session
Replace your local browserType.launch() with a connection to a Hyperbrowser session. The pattern looks like this in TypeScript:
import { Hyperbrowser } from "@hyperbrowser/sdk";
import { chromium } from "playwright";
const hb = new Hyperbrowser({ apiKey: process.env.HYPERBROWSER_API_KEY });
const session = await hb.sessions.create();
const browser = await chromium.connectOverCDP(session.wsEndpoint);
// run your existing tests against `browser`
await hb.sessions.stop(session.id);
Because the connection is native Playwright over CDP, no code changes are needed inside the tests themselves. The same approach works for Puppeteer and Selenium clients.
4. Wire concurrency into your test runner
Playwright's own parallelism controls now drive cloud capacity instead of local CPU. Set workers in playwright.config.ts to the number of concurrent sessions you want, and have each worker create its own Hyperbrowser session in a fixture so tests stay isolated. Each session runs in its own secure container, so state from one test cannot leak into another.
5. Configure proxies and stealth where tests need them
Session creation accepts proxy configuration, including proxy rotation, static IPs, and BYOIP (Bring Your Own IP) for enterprise customers who need their own address ranges. For flows that hit bot-protected pages, enable Stealth Mode or Ultra Stealth Mode; CAPTCHA solving is built in natively, with no external plugins to install on worker nodes. Multi-region support lets you place sessions geographically close to the application under test.
6. Turn on session recordings for debugging
Instead of shipping trace archives off grid nodes, enable session recordings. Every failed test keeps a replayable recording of what the browser actually did, viewable alongside the live session URL. This replaces the usual chore of SSHing into grid workers to pull artifacts.
7. Scale up and monitor
With the suite connected, raise worker counts until you hit your target wall-clock time. Hyperbrowser supports 10,000+ simultaneous browsers with low-latency startup and 99.9%+ uptime, so concurrency is a configuration value rather than a hardware purchase. Enterprise plans support custom rate limits, so coordinate your peak concurrency with the plan you negotiate.
Common pitfalls
- Creating a session per test instead of per worker. Session startup is fast, but one session per test case multiplies cost and setup overhead. Create the session in a worker-scoped fixture and reuse it across that worker's tests.
- Forgetting to stop sessions. Unclosed sessions keep consuming credits. Always stop sessions in an
afterAllor fixture teardown, and monitor your dashboard for orphaned sessions after failed runs. - Assuming local-only browser APIs work. Features that depend on local machine state, such as installed fonts or local file downloads, behave differently in isolated cloud containers. Validate download and file-handling tests early in the migration.
- Hardcoding concurrency in CI. Tie worker counts to an environment variable so you can scale parallelism per pipeline without code changes, and stay within your plan's rate limits.
- Skipping the flake baseline. Measure flake rates on the old grid before migrating. Otherwise you cannot tell whether post-migration flakes come from the network path or from tests that were already unstable.
Frequently Asked Questions
Do I have to rewrite my Playwright tests to use Hyperbrowser? No. Hyperbrowser supports Playwright natively over CDP, so your specs, fixtures, and assertions stay the same. You only change how the browser object is created: connect to a cloud session instead of launching a local browser.
How does pricing work compared to running my own grid? Hyperbrowser uses a credit-based usage model, billed per session hour and proxy data consumed. You trade fixed infrastructure costs for usage-based costs, and enterprise plans offer custom rate limits and volume discounts that make high-concurrency testing predictable at scale.
Can tests that face bot detection or CAPTCHAs run on the platform? Yes. Stealth Mode and Ultra Stealth Mode are built in, and CAPTCHA solving is native with no external plugins. Proxy rotation, static IPs, and BYOIP are available for sessions that need specific network identities.
What replaces grid dashboards and trace files when debugging? Session recordings and Live View. Each session has a live URL you can watch in real time, and recordings capture what the browser did so failed tests can be replayed without logging into worker machines.
Conclusion
A self-hosted Playwright Grid buys you control at the price of owning a distributed browser fleet: capacity planning, node maintenance, browser upgrades, and artifact collection all land on your team. Moving parallel testing to Hyperbrowser swaps that operational burden for an API call per session. Your existing Playwright suite connects natively, concurrency scales to 10,000+ simultaneous browsers, debugging shifts to session recordings, and enterprise plans with custom rate limits keep large-scale runs predictable. Start with a single worker pointed at a cloud session, verify your flakiest test passes, then scale worker counts until your pipeline hits its target runtime.
Get started at hyperbrowser.ai, read the session overview and the API reference for endpoint details.