---
title: Parallel Testing with Playwright | TestingBot
description: Run Cross-Browser Playwright tests concurrently with parallel testing.
source_url:
  html: https://testingbot.com/support/web-automate/playwright/playwright-parallel-testing
  md: https://testingbot.com/support/web-automate/playwright/playwright-parallel-testing/index.md
---
# Parallel Testing

**Parallel testing** lets you execute multiple Playwright tests at the same time, dramatically reducing your overall test suite duration and accelerating feedback cycles.

On TestingBot's browser grid, you can easily run Playwright tests concurrently across more than 100 browser and device combinations. This enables you to validate your web application in multiple environments, all in parallel.

The guide below will walk you through setting up and running Playwright tests concurrently using TestingBot’s scalable infrastructure.

## Parallel Example

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

    const pw = require('playwright-core');
    
    const doConnect = async (cap) => {
      cap['tb:options'] = {
        key: process.env.TB_KEY,
        secret: process.env.TB_SECRET
      }
      const browser = await pw.chromium.connect({
        wsEndpoint: `wss://cloud.testingbot.com/playwright?capabilities=${encodeURIComponent(JSON.stringify(cap))}`,
      });
      const context = await browser.newContext();
      const page = await context.newPage();
    
      await page.goto('https://testingbot.com/');
      await page.screenshot({ path: `screenshot-${cap.browserName}-${cap.browserVersion}.png` });
    
      await browser.close();
    }
    
    const capabilities = [
    {
      'browserName': 'chrome',
      'browserVersion': 'latest',
      'platform': 'WIN10',
    },
    {
      '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)
