Skip to content

Creating a sample repo for different Playwright languages and runners

Notifications You must be signed in to change notification settings

browserstack/pytest-playwright-browserstack

 
 

Repository files navigation

pytest-playwright-browserstack

Playwright with PyTest Test runner Integration with BrowserStack.

BrowserStack Logo

Prerequisite

  • Python3

Setup

  • 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.

Run sample tests

  • To run parallel tests, run paver run sample-test remote

Run tests on locally hosted websites

  • 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

Run sample tests locally

  • 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

Notes

About

Creating a sample repo for different Playwright languages and runners

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages