---
title: Parallel Testing with Puppeteer | TestingBot
description: Run Puppeteer tests in parallel across Chrome, Microsoft Edge and Firefox
  on the TestingBot cloud grid. Worker-based parallelism with Jest, Mocha or a custom
  runner, concurrency capped by your plan.
source_url:
  html: https://testingbot.com/support/web-automate/puppeteer/puppeteer-parallel-testing
  md: https://testingbot.com/support/web-automate/puppeteer/puppeteer-parallel-testing/index.md
---
# Parallel Testing

Parallel Testing means you can run multiple tests simultaneously, with Puppeteer.   
 It allows you to speed up your test execution, drastically shortening your total test duration time.

The documentation below will show you how to run Puppeteer tests concurrently on the TestingBot browser grid, which offers over 100+ Desktop Browser combinations for Puppeteer.

## Parallel Example

In the example below, we'll start various Puppeteer sessions on different browser versions, in the TestingBot cloud.

    const puppeteer = require('puppeteer-core')
    
    const doConnect = async (cap) => {
      const capabilities = {
        'tb:options': {
          key: process.env.TB_KEY,
          secret: process.env.TB_SECRET
        },
        browserName: cap.browserName,
        browserVersion: cap.browserVersion,
        platform: cap.platform
      }
      const browser = await puppeteer.connect({
        browserWSEndpoint: `wss://cloud.testingbot.com/puppeteer?capabilities=${encodeURIComponent(JSON.stringify(capabilities))}`
      })
    
      const page = await browser.newPage()
      await page.goto('https://testingbot.com')
      await page.screenshot({ path: 'screenshot.png' })
      await browser.close()
    }
    
    const capabilities = [
    {
      'browserName': 'chrome',
      'browserVersion': 'latest',
      'platform': 'WIN11',
    },
    {
      'browserName': 'chrome',
      'browserVersion': 'latest-1',
      'platform': 'LINUX',
    },
    {
      'browserName': 'edge',
      'browserVersion': 'latest',
      'platform': 'SEQUOIA',
    }]
    
    (async () => {
      await Promise.all(
        capabilities.map((cap) => doConnect(cap))
      )
      console.log('All tests finished!');
    })();

You can use `latest` and `latest-x` to automatically run on the latest browser version.

### Queueing

Depending on your account subscription, you can run multiple tests in parallel.   
 If you exceed your maximum allocated slots, the connection will be queued until a slot frees up.

Was this page helpful? Yes No 

## Looking for More Help?

Have questions or need more information?   
 You can reach us via the following channels:

- [Email us](https://testingbot.com/contact/new)
- [Join our Slack Channel](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
