AWS Device Farm
Developer Guide (API Version 2015-06-23)

Simulate Network Connections and Conditions for your AWS Device Farm Runs

You can simulate network connections and conditions while testing your Android, iOS, FireOS, and web apps using network shaping in Device Farm. For example, you may want to test your app behavior and performance in different customer environments.

When you create a run using the default network settings, each device has a full, unhindered WiFi connection with Internet connectivity. When you use network shaping, you can change the WiFi 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 any projects yet, see Create a Project.

  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 your own Network Profile

When you create a test run, you can choose to create a new network profile.

  1. Choose Create a new network profile.

    The Create a new network profile dialog box appears.

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

  3. Choose Save network profile.

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

Once created, you'll be able to see and manage your network profiles on the Project settings page.

              Network profiles in Project settings

Change Network Conditions During your Test

You can also simulate dynamic network conditions during your test execution. For example, you may simulate a dropped connection or fluctuating network types. You can do this by utilizing an API from the device host using a framework like Appium or Calabash.

We are still working on the API that simulates these conditions during your test execution, but you can try them out and let us know about your experience. For more information about this API, please contact us.