Bronto plugins
The Bronto Playwright Plugin enhances your frontend testing suite by adding visual regression with natural language right in your Playwright tests. This documentation guides you through the setup and usage of the Bronto plugin to ensure your web apps and sites maintain visual consistency with every release.
Start by installing the necessary packages. You will need both Playwright and the Bronto plugin.
Use Playwright’s test
function to define your test case. This example navigates to a page and performs a visual regression test using Bronto:
When calling bronto
, the function expects the following parameters:
Name
Type
Description
name
string
The test name set in the Bronto UI. Keep in mind the name should match exactly.
page
Page
The page object that represents the browser page.
testInfo
TestInfo
Contains metadata about the current test run, which Bronto uses to manage test artifacts.
Bronto requires authentication to ensure secure access to its services. Set up your authentication credentials by creating a .env
file in the root directory of your project and adding the following lines:
Bronto accepts all of the config objects supported by page.screenshot like fullPage. Read more about that here.