This repo contains samples for running Playwright tests on BrowserStack using the browserstack-node-sdk.
- Clone the repo
git clone -b sdk https://github.com/browserstack/node-js-playwright-browserstack.git
and runcd node-js-playwright-browserstack
. - Set
BROWSERSTACK_USERNAME
andBROWSERSTACK_ACCESS_KEY
as environment variables with your BrowserStack Username and Access Key or update the same inbrowserstack.yml
file. - Run
npm i
to install the dependencies.
- To run the sample tests in parallel across the platforms specified in the
browserstack.yml
, runnpm run sample-test
. - To run the sample local tests in parallel across the platforms specified in the
browserstack.yml
, runnpm run sample-local-test
.
- You can view your test results on the BrowserStack Automate dashboard
- Understand how many parallel sessions you need by using our Parallel Test Calculator