Как получить более детальные результаты тестов в AWS-Device Farm? [Appium node.js]

Я запускаю тесты Appium node.js на AWS Device Farm. Я хотел бы получить подробные результаты тестов, отображаемые в Device Farm, но я всегда получаю один результат «Tests Suite», который включает все тесты. Таким образом, если один небольшой тест терпит неудачу, весь Test Suite терпит неудачу. Я читал в документации Device Farm, что в стандартной среде будут отображаться более подробные результаты, но я не уверен, как переключить или использовать стандартную среду. Я предполагаю, что это как-то связано с файлом YAML, поскольку возможность выбора между стандартной или настраиваемой средой больше не предоставляется в пользовательском интерфейсе фермы устройств.

Это мой текущий файл YAML:

version: 0.1

# Phases are collection of commands that get executed on Device Farm.
phases:
  # The install phase includes commands that install dependencies that your tests use.
  # Default dependencies for testing frameworks supported on Device Farm are already installed.
  install:
    commands:
      # By default, Appium server version used is 1.7.2.
      # You can switch to an alternate supported version from 1.6.5, 1.7.1, 1.7.2, 1.8.0 , 1.8.1, 1.9.1 by using a command like "avm 1.7.1"
      # OR
      # To install a newer version of Appium use the following commands:
      - export APPIUM_VERSION=1.9.1
      - avm $APPIUM_VERSION
      - ln -s /usr/local/avm/versions/$APPIUM_VERSION/node_modules/.bin/appium  /usr/local/avm/versions/$APPIUM_VERSION/node_modules/appium/bin/appium.js

      # By default the node version installed is 11.4.0
      # you can switch to an alternate node version using below command.
      # - nvm install 10.13.0

      # Unpackage and install the node modules that you uploaded in the test phase.
      - echo "Navigate to test package directory"
      - cd $DEVICEFARM_TEST_PACKAGE_PATH
      - npm install *.tgz

  # The pre-test phase includes commands that setup your test environment.
  pre_test:
    commands:
      # We recommend starting appium server process in the background using the command below.
      # Appium server log will go to $DEVICEFARM_LOG_DIR directory.
      # The environment variables below will be auto-populated during run time.
      - echo "Start appium server"
      - >-
        appium --log-timestamp --device-name $DEVICEFARM_DEVICE_NAME
        --platform-name $DEVICEFARM_DEVICE_PLATFORM_NAME --app $DEVICEFARM_APP_PATH
        --automation-name UiAutomator2 --udid $DEVICEFARM_DEVICE_UDID
        --chromedriver-executable $DEVICEFARM_CHROMEDRIVER_EXECUTABLE  >> $DEVICEFARM_LOG_DIR/appiumlog.txt 2>&1 &

      - >-
        start_appium_timeout=0;
        while [ true ];
        do
            if [ $start_appium_timeout -gt 60 ];
            then
                echo "appium server never started in 60 seconds. Exiting";
                exit 1;
            fi;
            grep -i "Appium REST http interface listener started on 0.0.0.0:4723" $DEVICEFARM_LOG_DIR/appiumlog.txt >> /dev/null 2>&1;
            if [ $? -eq 0 ];
            then
                echo "Appium REST http interface listener started on 0.0.0.0:4723";
                break;
            else
                echo "Waiting for appium server to start. Sleeping for 1 second";
                sleep 1;
                start_appium_timeout=$((start_appium_timeout+1));
            fi;
        done; 

  # The test phase includes commands that run your test suite execution.
  test:
    commands:
      # Go into the root folder containing your source code and node_modules
      - echo "Navigate to test source code"
      # Change the directory to node_modules folder as it has your test code and the dependency node modules.
      - cd $DEVICEFARM_TEST_PACKAGE_PATH/node_modules/*

      - echo "Start Appium Node test"
      # Enter the command below to start the tests . The comamnd should be similar to what you use to run the tests locally.
      # For e.g. assuming you run your tests locally using command "node YOUR_TEST_FILENAME.js.", enter the same command below:
      - npm run test:android

  # The post test phase includes are commands that are run after your tests are executed.
  post_test:
    commands:

# The artifacts phase lets you specify the location where your tests logs, device logs will be stored.
# And also let you specify the location of your test logs and artifacts which you want to be collected by Device Farm.
# These logs and artifacts will be available through ListArtifacts API in Device Farm.
artifacts:
  # By default, Device Farm will collect your artifacts from following directories
  - $DEVICEFARM_LOG_DIR``` 

person Daniel Schlager    schedule 14.04.2020    source источник
comment
я использую для этого отчет обаяния   -  person El David    schedule 23.12.2020


Ответы (1)


Стандартный режим AWS Device Farm не зависит от файла YAML. Это параметр, который настраивается на этапе «Настроить», когда вы планируете запуск через консоль или через интерфейс командной строки через API ScheduleRun. В настоящее время AWS Device Farm не поддерживает узел Appium в стандартном режиме, а это означает, что детализированная отчетность, которую вы ищете, недоступна.

Если у вас есть дополнительные вопросы, вы можете перейти на форумы AWS Device Farm за дополнительную помощь от их инженерной команды.

Энди

person bad-hambo    schedule 17.04.2020