Skip to content

BrowserStackCE/browserstack-robot-framework-selenium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BrowserStack Integration with Robot Framework Selenium (Python)

BrowserStack Logo

Setup

  • Clone the repo
  • Install dependencies
    • pip install robotframework==3.2.2
    • pip install --upgrade robotframework-seleniumlibrary==5.1.1
    • pip install robotframework-pabot
    • pip install browserstack-local

Set BrowserStack Credentials

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

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

Running tests

  • To run single test, run robot tests/SingleTest.robot
  • To run local tests, run sh runLocalTest.sh
  • To run parallel tests we will be using the Pabot library,
    1. Test Suite level
      • 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 Suite1.robot Suite2.robot
    2. Test case level
      • Run - pabot --testlevelsplit <file_name>
        Eg: pabot --testlevelsplit Suite1.robot
    3. Run Test cases and Test suites together in parallel
      • Run - pabot --testlevelsplit --processes <count_of_parallels> *.robot
        Note: If the process count exceeds the parallel thread limit, it will automatically get queued. No changes required in the scripts.

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

Notes

  • This repository only works for Selenium 3 as of now. Desired Capabilities do not get honoured for Selenium 4. The open issue on SeleniumLibrary can be found here.
  • You can view your test results on the BrowserStack Automate dashboard
  • To test on a different set of browsers, check out our platform configurator

Additional Resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •