Skip to Main Content
Lightning Talk Intermediate Talk/slides: CC BY 4.0, Code samples: Apache 2.0 (same as Selenium)

Parallel Testing Redefined: The Browserpooling Method

Proposal status is Withdrawn
Session Description

When running browser automation tests in parallel, each test needs its own separate browser. So N tests running in parallel, need N browsers. N browsers means it consumes N times the memory, N times the CPU, and N browser startup and teardown cycles. For example, 10 tests running in parallel, need 10 Chrome browsers. Imagine how this scales when running a realistic test suite of hundreds of tests.

But what if N tests can share 1 browser? I call this “browserpooling”. Where multiple tests, share a single browser, instead of spinning up new ones for each test.

This talk will demonstrate how to do this using the open-source browser automation framework Selenium. Each browse tab can be made fully isolated (with it own cookie storage). Think of it like a private browsing window (incognito mode) but per tab. This makes it safe to run tests in separate tabs of the same browser at the same time. So now N tests, run in N tabs, using 1 browser.

For simple tests, I observed these numbers:

  • 3 tests, 3 browsers (classic approach): 12 sec 207 ms

  • 3 tests, 1 browser, 3 isolated tabs (browserpooling): 2 sec 326 ms

That is a ~5x improvement for simple tests. For real test suites, you can imagine the time and performance gains.

Additionally, most common web app tests require isolation to give accurate results. Before browserpooling, the only way to get that isolation was to spin up separate browsers. For example:

  • Two users logged in with different accounts in parallel. Each needed its own browser to keep sessions separate.

  • Testing light theme and dark theme preference together. A theme is stored in cookies so separate browsers were needed to avoid one cookie overriding the other.

  • Testing two users with different locale settings required separate browsers. Since locale is stored in cookies and they can override each other.

With browserpooling, all these scenarios (and many more) can be tested with a single browser with complete isolation. It helps save test time, resources and infrastructure costs.

This session will cover:

  • How browserpooling works

  • Walk through the Selenium implementation with live demo

  • How to adopt this pattern in an existing test suite right away

All code examples are already available in open-source examples repo of Selenium.

Key Takeaways
  • Learn how to optimize testing environments by using a single browser instance.

  • Practical knowledge of using browserpooling in Selenium with code examples.

  • Understand real-world use cases where this method can lead to performance gains and reduce the total runtime of automation tests.

References

Session Categories

Tutorial about using a FOSS project
Talk License: Talk/slides: CC BY 4.0, Code samples: Apache 2.0 (same as Selenium)

Which track are you applying for?

Main track

Speakers

Puja Jagani
Puja Jagani Lead of OpenSource and Developer Advocacy | BrowserStack

I lead Open Source and Developer Advocacy at BrowserStack, working at the intersection of engineering, community, and product. I am a core committer and Technical Leadership Committee member for Selenium, where I collaborate closely with browser vendors to advance web automation.

As a Developer Advocate, I have been deeply involved in enabling and empowering the testing and developer community through meetups, conferences, blogs, and hands-on how-to videos.

My work focuses on improving open-source tooling, contributing bug fixes and features, shaping best practices for test automation, and helping teams adopt modern testing approaches using BrowserStack.