sudharsan-selvaraj / appium-dashboard-plugin

Appium plugin that provides complete test logs, video recording of test and device logs(logcat and syslogs) for easy debugging.
117 stars 28 forks source link

Appium Dashboard has no Sessions in Hub + Node setup of Device Farm #128

Open ValzRon opened 1 year ago

ValzRon commented 1 year ago

Hello,

i've noticed that the Appium Dashboard remains empty when I run sessions with a hub + node configuration of device farm. Currently im running device farm with one hub and 8 nodes in a Kubernetes cluster. It uses ConfigMap to dynamicly apply the hub/node config. This is for the hub:

apiVersion: v1
data:
  appium-config.yaml: |
    server:
      relaxed-security: true
      base-path: /wd/hub
      keep-alive-timeout: 800
      port: 4723
      use-plugins:
        - device-farm
        - appium-dashboard
      plugin:
        device-farm:
          platform: android
kind: ConfigMap
metadata:
  name: device-farm-hub-cm
  namespace: default

and this is for the node:

apiVersion: v1
data:
  appium-config.yaml: |
    server:
      relaxed-security: true
      base-path: /wd/hub
      keep-alive-timeout: 800
      port: 4723
      use-plugins:
        - device-farm
        - appium-dashboard
      plugin:
        device-farm:
          platform: android
          hub: http://device-farm-hub.default.svc.cluster.local:4723
kind: ConfigMap
metadata:
  name: device-farm-node-cm
  namespace: default

This works just fine. I also configured that the service is reachable via port 31337 not 4723, so I can lookup --> "my.domain.com:31337/device-farm/" and "my.domain.com:31337/dashboard/".

Im using: Appium beta.64 Appium Dashboard 2.02 Device-Farm 7.2 The 8 nodes all have an Android Emulator with API23 (so fairly old) and Espresso 2.15.0

Does Dashboard even work in this kind of setup? Has it been tested for remote execution? I can provide additional logs if necessary.

sudharsan-selvaraj commented 1 year ago

Currently appium-dashboard plugin won't work well with Hub + Node setup. The logs and videos can only be saved in node level and in the hub you wont see any session details.

win5923 commented 1 year ago

@ValzRon Hi, May I ask how to build Appium on k8s?

ValzRon commented 1 year ago

@win5923 create a Dockerfile with Appium and its Dependencies and deploy the image on a pod. Copy and paste a start server script with needed parameters (like plugins, relaxed security etc.) or create a yaml/json config and pass it into your start server command.

Im running a pod with only Appium and device-farm plugin that serves as a hub and a handful of pods running Appium + device-farm + espresso driver with emulators as node.