Skip to content

browserstack/robot-browserstack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BrowserStack Integration with Robot Framework Selenium (Python)

BrowserStack Logo

Setup

  • Clone the repo
  • Install dependencies pip install -r requirements.txt

Set BrowserStack Credentials

  • Export the BrowserStack username and access key as environment variables

For Linux/MacOS

export BROWSERSTACK_USERNAME=<browserstack-username>
export BROWSERSTACK_ACCESS_KEY=<browserstack-access-key>

For Windows

setx BROWSERSTACK_USERNAME=<browserstack-username>
setx BROWSERSTACK_ACCESS_KEY=<browserstack-access-key>

Running tests

  • To run local test, run robot tests/LocalTest.robot
  • To run parallel tests we will be using the Pabot library:
    1. To run test suites in parallel (Testcases within respective test suites will be sequential)
      • Run - pabot --processes <count_of_parallels> tests/parallel/*.robot
      • Alternate method: pabot --processes <count_of_parallels> <name_of_suites_to_run>
        Eg: pabot --processes 2 tests/parallel/Suite01.robot tests/parallel/Suite02.robot
    2. To run all test cases within a test suite in parallel
      • Run - pabot --testlevelsplit <test_suite_file_name>
        Eg: pabot --testlevelsplit tests/parallel/Suite01.robot
    3. Run all testcases across all Test Suites in parallel
      • Run - pabot --testlevelsplit --processes <count_of_parallels> tests/parallel/*.robot
        Note: If the process count exceeds the parallel threads available on BrowserStack, the sessions will automatically get queued.

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

Notes

Additional Resources

About

Code samples for robot tests on browserstack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors