Playwright with PyTest Test runner Integration with BrowserStack.
- Python3
- Clone the repo
- Install dependencies
pip install -r requirements.txt
- To run your automated tests using BrowserStack, you must provide a valid username and access key. This can be done by setting the BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY environment variables.
- To run parallel tests, run
paver run sample-test remote
- To run a local test, (if you have not set the BROWSERSTACK_ACCESS_KEY environment variable) first go to resources/local.json then edit key on line 3
- Run
paver run sample-local-test remote
- To run tests locally you may have to install the browser dependencies.
- For example, if you want to run the test on Firefox browser, you have to run the below command
playwright install firefox
- After installing the browsers, run
paver run sample-test on-prem
Understand how many parallel sessions you need by using our Parallel Test Calculator
- You can view your test results on the BrowserStack Automate dashboard