Features

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 browser = await puppeteer.connect({
    browserWSEndpoint: `wss://cloud.testingbot.com?key=api_key&secret=api_secret&browserName=${cap.browserName}&browserVersion=${cap.browserVersion}&platform=${cap.platform}`
  })

  const page = await browser.newPage()
  await page.goto('https://testingbot.com')
  await page.screenshot({ path: 'screenshot.png' })
  browser.close()
}

const capabilities = [
{
  'browserName': 'chrome',
  'browserVersion': 'latest',
  'platform': 'WIN10',
},
{
  'browserName': 'chrome',
  'browserVersion': 'latest-1',
  'platform': 'LINUX',
},
{
  'browserName': 'edge',
  'browserVersion': 'latest',
  'platform': 'BIGSUR',
}]

capabilities.forEach(async (cap) => {
  await doConnect(cap)
})

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.