Skip to content

kamal-kaur04/java-playwright-browserstack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java-playwright-browserstack

Setup

  • Clone the repo
  • Install dependencies mvn install
  • Update credentials in the /src/test/resources/*.conf.json file with your BrowserStack Username and Access Key.
  • For parallel testing, control the concurrency by setting the value for parallel.count. Junit 5 uses the following properties for parallelism:
    junit.jupiter.execution.parallel.enabled = true
    junit.jupiter.execution.parallel.mode.default = concurrent
    junit.jupiter.execution.parallel.config.strategy=fixed
    junit.jupiter.execution.parallel.config.fixed.parallelism=${parallel.count}
    

Running your tests

  • To run a sample tests, run mvn test -P sample-test
  • To run sample tests with local, run mvn test -P sample-local-test
  • Update <parallel.count> in pom.xml to set the number of parallel threads

Understand how many parallel sessions you need by using our Parallel Test Calculator

Notes

  • You can view your test results on the BrowserStack Automate dashboard

  • You can export the environment variables for the Username and Access Key of your BrowserStack account.

    • For Unix-like or Mac machines:
    export BROWSERSTACK_USERNAME=<browserstack-username> &&
    export BROWSERSTACK_ACCESS_KEY=<browserstack-access-key>
    
    • For Windows:
    set BROWSERSTACK_USERNAME=<browserstack-username>
    set BROWSERSTACK_ACCESS_KEY=<browserstack-access-key>
    

About

Creating a sample repo for different Playwright languages and runners

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%