Test Runners

Puppeteer

Because Replay Browser lets you record anything that happens inside it, you can simply just point your test script to the Replay Browser binary and you are all set up.


1

Install Replay Puppeteer package

To start, you need to install @replayio/puppeteer package to your project.

Puppeteer package is open-source and available on GitHub

Terminal
npm i @replayio/puppeteer
2

Set up your configuration file

In order to use Replay Browser in your Puppeteer scripts, you need to point your configuration to the Replay Browser binary. The getExecutablePath function will take care of locating the binary on your machine.

puppeteer.config.js
1const puppeteer = require('puppeteer')
2const { getExecutablePath } = require('@replayio/puppeteer')
3
4;(async () => {
5 const browser = await puppeteer.launch({
6 headless: false,
7 executablePath: getExecutablePath('chromium'),
8 })
9 const page = await browser.newPage()
10 await page.goto('https://replay.io')
11 await page.screenshot({ path: 'replay.png' })
12
13 await page.close()
14 await browser.close()
15})()
3

Run your tests

With configration set up, you can run your tests the same way as before. After your run finishes, your recordings will be stored locally.

4

Install Replay CLI to upload

To download and install Replay CLI, run the following command:

Terminal
npm i -g replayio

Upload your replays with the following command.

Terminal
replayio upload-all

You can use Replay CLI to manage and upload your recordings. To learn more see the docs on Replay CLI.

After you upload your recordings, you can view them in Test Suite Dashboard.

Read more

Learn how to manage your recordings, debug your app using Replay DevTools and more

Manage your recordings

Learn how to upload, remove and view your recordings using CLI

Replay DevTools

Learn how to use Replay DevTools to debug your tests.

Setting up a team

Learn how to create a team in the Replay App

Test Suite Management

Test Suite Dashboard helps you stay on top of your test suite health.

Previous
WebdriverIO