Menu
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 using the console, the AWS Command Line Interface, or the API. If you need to set a duration value longer than 60 minutes, contact us directly to set that up.

Important

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

If execution exceeds your timeout, execution on that device will be forcibly stopped. Partial results will be available if possible, and you will be 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 may 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 where no tests are executing. In other words, using the execution timeout feature lets you stop that run if the test run is taking longer than expected.

You can set the execution timeout in two places: at the project level and at the test run level. The following procedures show you how to set up both using the Device Farm console.

Prerequisites

  1. Complete the steps in Setting Up, which include signing up for an AWS account, creating or using an IAM user in the AWS account, and giving the IAM user permission to access Device Farm.

  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 have a project already, choose that project from the Device Farm page.

    Otherwise, choose Create project and specify a name.

  3. Choose Project settings.

  4. Choose the General tab of your project.

  5. Change the execution timeout by typing a value or using the slider bar.

  6. Choose Save changes.

    All test runs in your project will now use the execution timeout value you just specified, unless you override the timeout value when scheduling 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 have a project already, choose that project from the Device Farm page.

    Otherwise, choose Create project and specify a name.

  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. When you get to Review and start run, you can specify the execution timeout for your test run.

  6. Change the execution timeout by typing a value or using the slider bar.

  7. Choose Confirm and start run.