- 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
-
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>
- 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,
- 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
- Run -
- Test case level
- Run -
pabot --testlevelsplit <file_name>
Eg:pabot --testlevelsplit Suite1.robot
- Run -
- 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.
- Run -
- Test Suite level
Understand how many parallel sessions you need by using our Parallel Test Calculator
- 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