This is a sample code repository prepared by grandEL for running percy with playwright on BrowserStack with a custom framework of importing URLS from a JSON file
ode-js-playwright-browserstackThis repo contains samples for running Playwright tests on BrowserStack using the browserstack-node-sdk.
- Clone the repo
git clone -b sdk https://github.com/grandEL-dsouza/Percy-with-Playwright-on-BrowserStack/
and runcd Percy-with-Playwright-on-BrowserStack
. - Set
BROWSERSTACK_USERNAME
andBROWSERSTACK_ACCESS_KEY
inbrowserstack.yml
file. - Run
npm i
to install the dependencies. Runnpm fs
Run npm install --save @percy/cli
Install the relevant SDK
npm install @percy/playwright
Create Percy token and export the token
export PERCY_TOKEN=""
- To run the sample tests in parallel across the platforms specified in the
browserstack.yml
, runnpx percy exec -- npm run sample-test
.