From 9ac80b027f86e9eb552d6af2ada1c6c371e5ee08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Wed, 29 Nov 2023 08:31:59 +0100 Subject: [PATCH 1/3] fix use specified app paths --- tests/e2e/testRunner.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/e2e/testRunner.js b/tests/e2e/testRunner.js index 1e9a9a89caf0..1cedbf1abd76 100644 --- a/tests/e2e/testRunner.js +++ b/tests/e2e/testRunner.js @@ -80,8 +80,8 @@ if (args.includes('--config')) { } // Important set app path after correct config file has been set -let mainAppPath = config.MAIN_APP_PATH; -let deltaAppPath = config.DELTA_APP_PATH; +let mainAppPath = args[args.indexOf('--mainAppPath') + 1] || config.MAIN_APP_PATH; +let deltaAppPath = args[args.indexOf('--deltaAppPath') + 1] || config.DELTA_APP_PATH; // Create some variables after the correct config file has been loaded const OUTPUT_FILE = `${config.OUTPUT_DIR}/${label}.json`; @@ -205,8 +205,8 @@ const runTests = async () => { let progressLog = Logger.progressInfo('Installing apps and reversing port'); - await installApp('android', config.MAIN_APP_PACKAGE, defaultConfig.MAIN_APP_PATH); - await installApp('android', config.DELTA_APP_PACKAGE, defaultConfig.DELTA_APP_PATH); + await installApp('android', config.MAIN_APP_PACKAGE, mainAppPath); + await installApp('android', config.DELTA_APP_PACKAGE, deltaAppPath); await reversePort(); progressLog.done(); From 635aa85dfb05fcd4ffd73e7f8bb13f4f8ec6ba5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Wed, 29 Nov 2023 08:59:51 +0100 Subject: [PATCH 2/3] fix aws step to print errors on failure --- .github/workflows/e2ePerformanceTests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2ePerformanceTests.yml b/.github/workflows/e2ePerformanceTests.yml index 016fe89ccfce..92b4e52c159c 100644 --- a/.github/workflows/e2ePerformanceTests.yml +++ b/.github/workflows/e2ePerformanceTests.yml @@ -211,7 +211,9 @@ jobs: test_spec_file: tests/e2e/TestSpec.yml test_spec_type: APPIUM_NODE_TEST_SPEC remote_src: false - file_artifacts: Customer Artifacts.zip + file_artifacts: | + Customer Artifacts.zip + Test spec output.txt log_artifacts: debug.log cleanup: true timeout: 5400 @@ -220,6 +222,7 @@ jobs: if: failure() run: | echo ${{ steps.schedule-awsdf-main.outputs.data }} + cat "./mainResults/Host_Machine_Files/\$WORKING_DIRECTORY/Test spec output.txt" unzip "Customer Artifacts.zip" -d mainResults cat ./mainResults/Host_Machine_Files/\$WORKING_DIRECTORY/debug.log From 859fba26815679c36d4deaade72809172248472b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Wed, 29 Nov 2023 09:30:43 +0100 Subject: [PATCH 3/3] fix test spec --- tests/e2e/TestSpec.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/e2e/TestSpec.yml b/tests/e2e/TestSpec.yml index c53010ec02fd..a234ef67b8a6 100644 --- a/tests/e2e/TestSpec.yml +++ b/tests/e2e/TestSpec.yml @@ -6,14 +6,16 @@ phases: # Install correct version of node - export NVM_DIR=$HOME/.nvm - . $NVM_DIR/nvm.sh - - nvm install 20.9.0 - - nvm use 20.9.0 + # Note: Node v16 is the latest supported version of node for AWS Device Farm + # using v20 will not work! + - nvm install 16 + - nvm use --delete-prefix 16 # Reverse ports using AWS magic - PORT=4723 - IP_ADDRESS=$(ip -4 addr show eth0 | grep -Po "(?<=inet\s)\d+(\.\d+){3}") - reverse_values="{\"ip_address\":\"$IP_ADDRESS\",\"local_port\":\"$PORT\",\"remote_port\":\"$PORT\"}" - - "curl -H \"Content-Type: application/json\" -X POST -d \"$reverse_values\" http://localhost:31007/reverse_forward_tcp" + - 'curl -H "Content-Type: application/json" -X POST -d "$reverse_values" http://localhost:31007/reverse_forward_tcp' - adb reverse tcp:$PORT tcp:$PORT test: @@ -23,4 +25,4 @@ phases: - node e2e/testRunner.js -- --skipInstallDeps --buildMode "skip" --skipCheckout --mainAppPath app-e2eRelease.apk --deltaAppPath app-e2edeltaRelease.apk artifacts: -- $WORKING_DIRECTORY + - $WORKING_DIRECTORY