Skip to main content
No Result Found
Get your setup working faster. Join our Discord for optimisation tips from elite testers. Join our DiscordJoin our Discord

Load testing with Selenium Python

Run a load test using Selenium Python scripts on BrowserStack Load Testing

Prerequisites

  • BrowserStack Username and Access key. You can find these under your account profile.
  • An existing automated test suite written in Selenium.

Supported versions

The following framework versions are recommended for Selenium Python load tests:

Framework Python version Recommended version
Selenium Python Python 3.x Selenium (Python binding) 4.15.0
Selenium Pytest Python 3.x Selenium (Python binding) 4.15.0
Pytest 9.1.0

Run a test

Perform the steps given to run load tests for your automated Selenium test suites written in:

  • Python
  • Pytest

You can start a new test either from the Quick Start page or the Load Tests page on the Load testing dashboard.

On the dashboard, click Create Load Test.

Screenshot of load testing dashboard showing the run a new test button highlighted

Enter a Test Name for your load test, select Browser Only and click Upload scripts.

Dashboard showing test name field and type of load test to run

Upload scripts

In this step, upload your Selenium Python automation project as a ZIP file. Select your framework (for example, Selenium - Python) from the dropdown, then drag and drop your ZIP file (up to 250MB) or click to select it.

Screenshot of load testing dashboard asking to add scripts for load testing

After you upload your ZIP file, the dashboard automatically validates your project. If validation is successful, you will see a confirmation message and a summary of the detected configuration and dependencies.

In the Specify run target field, enter the path to your Python file or module (for example, test_login.py). Then, select your requirements.txt file from the Select dependencies dropdown to specify which dependencies to install for your tests.

Dashboard showing successful validation of a Selenium project ZIP with config and dependencies

Ensure that your requirements.txt and any test runner configuration files are placed at the root level of your project.

Once you have verified the configuration, click Configure Load to move to the next step.

You can configure the following load parameters to customize your load test:

Run test

After you finish configuring load parameters, click RUN TEST.

Selenium Python run test screen on load testing dashboard

If you run into issues, try the troubleshooting steps or contact us for help.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle