Test your website’s performance on different networks (2G, 3G, LTE etc.,) with varied upload & download speeds & latencies on BrowserStack Automate
In many cases, you would want to test how your websites looks and performs on browsers with different networks (2G, 3G, LTE etc.,) that have varied upload & download speeds & latencies.
To simulate these network conditions on mobile browsers, you can use one of our presets, or define your own custom network conditions using the browserstack.networkProfile and browserstack.customNetwork capabilities. You can also change the network conditions mid-way during the test run, just like in real world where the end-user’s network varies.
The networkProfile and customNetwork capabilities are supported for Android and iOS devices. To simulate network conditions on desktop devices, use the Emulate Network Conditions feature supported with Selenium version 4 and higher.
Specifying the network profile to start the tests with
BrowserStack SDK is a plug-n-play solution that takes care of all the integration steps for you. Using the BrowserStack SDK is the recommended integration method for your project. To know more, visit the SDK core concepts page.
You can use the networkProfile capability to set the network profile the test should start with. By default, each device will have unhindered WiFi connection with Internet connectivity.
You can use the browserstack.networkProfile capability to set the network profile the test should start with. By default, each device will have unhindered WiFi connection with Internet connectivity.
If you have unique network conditions to test in, you can use the browserstack.customNetwork to specify the connection speed, latencies and the packet loss %.
Capability
Description
Expected values
browserstack.customNetwork
The custom network condition to start the test with
A string.
1000,1000,100,1
Specify the desired download speed, upload speed, latency in milliseconds and packet loss percentage