Simulate Network Conditions
TestingBot allows you to test your mobile apps under various network conditions, including download speed, upload speed, packet loss and latency.
Simulate network conditions using a predefined network profile
TestingBot provides a set of predefined network profiles which you can choose from.
| Profile Name | Bandwidth down/up (KB/s) | Packet Loss (%) | Latency (ms) |
|---|---|---|---|
| Edge | 250/150 | 0 | 300 |
| 3G | 400/100 | 0 | 100 |
| 4G | 18000/9000 | 0 | 100 |
| airplane | 0 | 100 | 0 |
On real iOS devices, these profiles are applied through the device's HTTP proxy settings, not by switching the radios. The airplane profile blocks traffic that uses the system proxy, such as most HTTP(S) requests from your app; connections that bypass the system proxy are not affected.
testingbot xcuitest app.ipa app-test.zip \
--device "iPhone.*" \
--real-device \
--throttle-network "3G"
curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/xcuitest/:id/run" \
-d '{ "options": { "throttle_network": "3G" }, "capabilities":[{"deviceName":"iPhone.*", "platformName":"iOS", "realDevice": true}]}' \
-H "Content-Type: application/json"
Simulate network conditions using a custom network profile
You can specify a custom set of parameters, including:
- Download rate (KB/s)
- Upload rate (KB/s)
- Packet loss (%)
- Latency (ms)
The CLI supports predefined network profiles. For custom network profiles, use the cURL API directly.
# Predefined profiles: 4G, 3G, Edge, airplane
testingbot xcuitest app.ipa app-test.zip \
--device "iPhone.*" \
--real-device \
--throttle-network "Edge"
curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/xcuitest/:id/run" \
-d '{ "options": { "throttle_network": { "uploadSpeed": 10240, "downloadSpeed": 10240, "latency": 0, "loss": 0 } }, "capabilities":[{"deviceName":"iPhone.*", "platformName":"iOS", "realDevice": true}]}' \
-H "Content-Type: application/json"