---
title: Simulate Network Conditions with XCUITest
description: 'iOS XCUI Testing with various Network conditions: GPRS, 3G, 4G, 5G and
  airplane mode.'
source_url:
  html: https://testingbot.com/support/app-automate/xcuitest/simulate-network-conditions
  md: https://testingbot.com/support/app-automate/xcuitest/simulate-network-conditions.md
---

# 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 (kbps) | Packet Loss (%) | Latency (ms) |
| --- | --- | --- | --- |
| Edge | 250/150 | 0 | 300 |
| 3G | 400/100 | 0 | 100 |
| 4G | 18000/9000 | 0 | 100 |
| airplane | 0 | 100 | 0 |

[CLI](https://testingbot.com#) [cURL](https://testingbot.com#)

```bash
testingbot xcuitest app.ipa app-test.zip \
  --device "iPhone 13" \
  --real-device \
  --throttle-network "3G"
```

```bash
curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/xcuitest/:id/run" \
-d '{ "options": { "throttle_network": "3G" }, "capabilities":[{"version":"15.5", "deviceName":"iPhone 13", "platformName":"iOS"}]}' \
-H "Content-Type: application/json"
```

## Simulate network conditions using a custom network profile

You can specify a custom set of parameters, including:

- Download rate (kbps)
- Upload rate (kbps)
- Packet loss (%)
- Latency (ms)

[CLI](https://testingbot.com#) [cURL](https://testingbot.com#)

The CLI supports predefined network profiles. For custom network profiles, use the cURL API directly.

```bash
# Predefined profiles: 4G, 3G, Edge, airplane
testingbot xcuitest app.ipa app-test.zip \
  --device "iPhone 13" \
  --real-device \
  --throttle-network "Edge"
```

```bash
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":[{"version":"15.5", "deviceName":"iPhone 13", "platformName":"iOS"}]}' \
-H "Content-Type: application/json"
```

### Looking for more help?

Have questions or need more information? Reach out via email or Slack.

[Email us](https://testingbot.com/contact/new) [Join our Slack](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
