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

Set the Execution Timeout for Test Runs in AWS Device Farm

You can set a value for how long a test run should execute before you stop each device from running a test. The default execution timeout is 60 minutes per device, but you can set a value as low as 5 minutes. If you need to set a duration value longer than 60 minutes, contact us directly. You can use the console, AWS Command Line Interface, or API to set the execution timeout.

Important

The execution timeout option should be set to the maximum duration for a test run, along with some buffer. For example, if your tests take 20 minutes per device, you should choose a timeout of 30 minutes per device.

If the execution exceeds your timeout, the execution on that device is forcibly stopped. Partial results are available, if possible. You are billed for execution up to that point, if you're using the metered billing option. For more information about pricing, see AWS Device Farm Pricing.

You might want to use this feature if you know how long a test run is supposed to take to execute on each device. When you specify an execution timeout for a test run, you can avoid the situation where a test run is stuck for some reason and you are being billed for device minutes when no tests are being executed. In other words, using the execution timeout feature lets you stop that run if it's taking longer than expected.

You can set the execution timeout in two places: at the project level and at the test run level.

Prerequisites

  1. Complete the steps in Setting Up.

  2. Create a project in Device Farm. Follow the instructions in Create a Project, and then return to this page.

Set the Execution Timeout for a Project

  1. Sign in to the Device Farm console at https://console.aws.amazon.com/devicefarm.

  2. If you already have a project, choose it from the Device Farm page.

    Otherwise, choose Create project and enter a name for your project.

  3. Choose Project settings.

  4. On the General tab, for Execution timeout, enter a value or use the slider bar.

  5. Choose Save changes.

    All test runs in your project now use the execution timeout value you just specified, unless you override the timeout value when you schedule a run.

Set the Execution Timeout for a Test Run

  1. Sign in to the Device Farm console at https://console.aws.amazon.com/devicefarm.

  2. If you already have a project, choose it from the Device Farm page.

    Otherwise, choose Create project and enter a name for your project.

  3. Choose Create a new run.

  4. Follow the steps to choose an application, configure your test, select your devices, and specify a device state.

  5. On Review and start run, for Execution timeout, enter a value or use the slider bar.

  6. Choose Confirm and start run.