Simulate Network Connections and Conditions for your AWS Device Farm Runs - AWS Device Farm

Simulate Network Connections and Conditions for your AWS Device Farm Runs

You can use network shaping to simulate network connections and conditions while testing your Android, iOS, FireOS, and web apps in Device Farm. For example, you can test your app in less than perfect network conditions.

When you create a run using the default network settings, each device has a full, unhindered Wi-Fi connection with internet connectivity. When you use network shaping, you can change the Wi-Fi connection to specify a network profile like 3G or Lossy WiFi that controls throughput, delay, jitter, and loss for both inbound and outbound traffic.

Set Up Network Shaping When Scheduling a Test Run

When you schedule a run, you can choose from any of the Device Farm-curated profiles, or you can create and manage your own.

  1. From any Device Farm project, choose Create a new run.

    If you don't have a project yet, see Create a Project in AWS Device Farm.

  2. Choose your application, and then choose Next step.

  3. Configure your test, and then choose Next step.

  4. Select your devices, and then choose Next step.

  5. Choose a network profile or choose Create a new network profile to create your own.

            Network profile for a test run
  6. Choose Next step.

  7. Review and start your test run.

Create a Network Profile

When you create a test run, you can create a network profile.

  1. Choose Create a new network profile.

            Create a new network profile
  2. Enter a name and settings for your network profile.

  3. Choose Save network profile.

  4. Finish creating your test run and start the run.

After you have created a network profile, you'll be able to see and manage it on the Project settings page.

        Network profiles in Project settings

Change Network Conditions During Your Test

You can call an API from your device host using a framework like Appium or Calabash to simulate dynamic network conditions such as reduced bandwidth during your test run. For more information, see CreateNetworkProfile.