You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/AutomatedTesting/Gem/PythonTests/AWS
Junbo Liang 44744d95b0
Fix the cmake issue for AWSI automation tests (#6531)
Signed-off-by: Junbo Liang <68558268+junbo75@users.noreply.github.com>
4 years ago
..
aws_metrics AWSI automation tests support on Linux (#6278) 4 years ago
client_auth AWSI automation tests support on Linux (#6278) 4 years ago
common Update resource mapping schema to make default account ID optional (#5475) 4 years ago
core AWSI automation tests support on Linux (#6278) 4 years ago
CMakeLists.txt Fix the cmake issue for AWSI automation tests (#6531) 4 years ago
README.md AWSI automation tests support on Linux (#6278) 4 years ago
__init__.py Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
conftest.py Update the AWS automation tests to use existing CloudFormation stacks (#3092) 4 years ago

README.md

AWS Gem Automation Tests

Prerequisites

  1. Build the O3DE Editor and AutomatedTesting.GameLauncher in Profile.
  2. Install the latest version of NodeJs.
  3. AWS CLI is installed and configured following Configuration and Credential File Settings.
  4. AWS Cloud Development Kit (CDK) is installed.

Deploy CDK Applications

  1. Go to the AWS IAM console and create an IAM role called o3de-automation-tests which adds your own account as as a trusted entity and uses the "AdministratorAccess" permissions policy.
  2. Copy the following deployment script to your engine root folder:
    • Windows (Command Prompt)
          {engine_root}\scripts\build\Platform\Windows\deploy_cdk_applications.cmd
      
    • Linux
          {engine_root}/scripts/build/Platform/Linux/deploy_cdk_applications.sh
      
  3. Open a new CLI window at the engine root and set the following environment variables:
    • Windows
          Set O3DE_AWS_PROJECT_NAME=AWSAUTO
          Set O3DE_AWS_DEPLOY_REGION=us-east-1
          Set ASSUME_ROLE_ARN=arn:aws:iam::{your_aws_account_id}:role/o3de-automation-tests
          Set COMMIT_ID=HEAD
      
    • Linux
          export O3DE_AWS_PROJECT_NAME=AWSAUTO
          export O3DE_AWS_DEPLOY_REGION=us-east-1
          export ASSUME_ROLE_ARN=arn:aws:iam::{your_aws_account_id}:role/o3de-automation-tests
          export COMMIT_ID=HEAD
      
  4. In the same CLI window, Deploy the CDK applications for AWS gems by running deploy_cdk_applications.cmd.

Run Automation Tests

CLI

  1. In the same CLI window, run the following CLI command:
    • Windows
          python\python.cmd -m pytest {path_to_the_test_file} --build-directory {directory_to_the_profile_build}
      
    • Linux
          python/python.sh -m pytest {path_to_the_test_file} --build-directory {directory_to_the_profile_build}
      

Pycharm

You can also run any specific automation test directly from Pycharm by providing the "--build-directory" argument in the Run Configuration.

Destroy CDK Applications

  1. Copy the following destruction script to your engine root folder:
    • Windows
          {engine_root}\scripts\build\Platform\Windows\destroy_cdk_applications.cmd
      
    • Linux
          {engine_root}/scripts/build/Platform/Linux/destroy_cdk_applications.sh
      
  2. In the same CLI window, destroy the CDK applications for AWS gems by running destroy_cdk_applications.cmd.