Lumberyard
User Guide (Version 1.21)

Using AWS Device Farm in Lumberyard Editor

Use AWS Device Farm to test your Android or iOS apps on many different types of devices without needing to have any of them present physically. Device Farm can help you find and resolve compatibility issues on a large number of devices. For more information about Device Farm, see the Device Farm Developer Guide.

Starting in Lumberyard version 1.20, you can use the Lumberyard Editor Deployment Tool to make Device Farm a deployment target.


            Lumberyardintegration with AWS Device Farm.

Prerequisites

To use Device Farm in Lumberyard Editor, you need the following requirements:

  • The Cloud Gem Framework gem, enabled for your project in the Project Configurator.

    
                        The Cloud Gem Framework gem in Project Configurator.

    For information about using Project Configurator to enable gems, see Enabling Gems.

  • A set of Amazon Web Services (AWS) credentials and access keys.

    • If you do not have an AWS account, complete the following steps to create one.

      To sign up for an AWS account

      1. Open https://portal.aws.amazon.com/billing/signup.

      2. Follow the online instructions.

        Part of the sign-up procedure involves receiving a phone call and entering a verification code on the phone keypad.

    • For more information about access keys, see How do I create an AWS access key?.

    • For information about the AWS Free Tier, see the AWS Free Tier page.

  • Device Farm requires that you have a shader compiler running on an Amazon Elastic Compute Cloud (Amazon EC2) instance. For more information, see Running the Shader Compiler on Amazon EC2.

Creating an AWS Profile in Lumberyard Editor

After you have a set of AWS credentials, use them to create a profile in Lumberyard Editor.

To enter your credentials in Lumberyard Editor

  1. In Lumberyard Editor, choose AWS, Credentials manager.

    
                            Open Credentials manager
  2. In the Credentials Manager dialog box, click Add profile.

    
                            Click Add profile
  3. In the Add profile dialog box, enter the required information.

    
                            Enter profile information for your AWS account in
                                    Lumberyard Editor
    • For Profile name, enter a name for the profile.

    • For AWS access key and AWS secret key, enter the access key and secret key.

    Important

    Do not share these credentials with anyone, and do not check them into source control. These credentials grant control over your AWS account, and a malicious user could incur charges.

  4. Click Save.

  5. In Credentials Manager, click OK.

You have now created a profile that is associated with your credentials. It is saved locally on your machine in your AWS credentials file. This file is usually located in your C:\Users\user_name\.aws\ directory.

Accessing the Device Farm Console from Lumberyard Editor

After the new profile is selected in the Credentials Manager, you can use Lumberyard Editor to access the Device Farm console.

To access the Device Farm console from Lumberyard Editor

  1. Choose AWS, Credentials Manager and ensure that a profile is selected.

  2. Choose AWS, Open AWS Console, Device Farm. This signs you into AWS and creates a new session.

Configuring a Deployment for AWS Device Farm

After you have selected a valid AWS profile in Lumberyard Editor, you can use the Deployment Tool to configure a deployment to AWS Device Farm.

To configure a deployment for AWS Device Farm.

  1. Ensure that a valid AWS profile is selected.

  2. In Lumberyard Editor, choose File, Project Settings, Deploy to device.

  3. In Deployment Tool, under Deploy, click the AWS Device Farm tab.

    
                        AWS Device Farm features in the Deployment
                                Tool.
  4. For information about general Deployment Tool options, see Setting Deployment Tool Options.

    The following options are specific to Device Farm usage.

    Option Description
    Load current level Because the Deployment Tool cannot communicate directly with the actual devices used by Device Farm, this option is not supported. Instead, specify the level that you want to test in your project's autoexec.cfg file as a map levelName command.
    Shader compiler IP address Set the shader compiler IP address to the IP address of your EC2 instance shader compiler. For more information, see Running the Shader Compiler on Amazon EC2.
    Project name Select a Device Farm project, or click Add to create a new project.
    Device pool name Select a device pool, or click Add to create a device pool. For more information about adding a device pool, see the next step.
    Execution timeout Specify the maximum amount of time, in minutes, that you want the test to run. Possible values are from 5 to 150.
    Test type Built-in fuzz, the only option, sets the event throttle to 1000. This means that the test waits one second between random input events. The event count is 600.
  5. Adding a device pool opens the Device Farm Device Pool dialog box, which retrieves the latest list of supported devices from Device Farm.

    
                        Configuring a Device Farm device pool.
  6. For Name, enter a name for your device pool, and then select the devices that you want to test your application on.

  7. Click Save.

Building and Deploying an App to AWS Device Farm

At this point, you are ready to build and deploy your app to Device Farm.

To build and deploy an app to AWS Device Farm

  1. Click Deploy to Device Farm. The deployment advances through the following steps:

    1. Process all assets. This can take a long time if this is the first time assets for the target platform are processed.

    2. Run the WAF build command using --deploy-android=False --android-asset-mode=apk_files.

    3. Run the WAF package command using --deploy-android=False --android-asset-mode=apk_files.

    4. Upload the app that is created to Device Farm.

    5. Schedule the test run on Device Farm.

  2. After a test run is scheduled, you can track its status in the Device Farm Log section of the Deployment Tool. Information from Device Farm is refreshed every 10 seconds.

    
                        Using the Device Farm Log in the Deployment
                            Tool.

    Note

    The Device Farm test fails on some devices if the device does not respond to input quickly enough. If this occurs, set r_ShadersAsyncCompiling=1 in your system_android_es3.cfg file so that the main UI thread is blocked by shader loads and continues to respond.

  3. To open a test run in the Device Farm console, right-click the run, and choose View details in AWS console.

  4. To delete a test run, right-click the run, and choose Delete.