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.gitand runcd node-js-playwright-browserstack. - Set
BROWSERSTACK_USERNAMEandBROWSERSTACK_ACCESS_KEYas environment variables with your BrowserStack Username and Access Key or update the same inbrowserstack.ymlfile. - Run
npm ito 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
