AppiumTestDistribution / appium-device-farm

This is an Appium 2.0 plugin designed to manage and create driver sessions on available devices.
https://devicefarm.org
Other
335 stars 102 forks source link

Additional property must not have additional properties for max-session #732

Closed ValzRon closed 1 year ago

ValzRon commented 1 year ago

I have the following config yaml:

server:
  relaxed-security: true
  base-path: /wd/hub
  keep-alive-timeout: 300
  log-timestamp: true
  port: 4723
  use-drivers:
    - espresso
  use-plugins:
    - device-farm
  plugin:
    device-farm:
      max-sessions: 8
      android-device-type: simulated
      platform: android

I get:

 ADDTIONAL PROPERTY must NOT have additional properties
{"server":{"relaxed-security":true,"base-path":"/wd/hub","keep-alive-timeout":300,"log-timestamp":true,"port":4723,"use-drivers":["espresso"],"use-plugins":["device-farm"],"plugin":{"device-farm":{"max-sessions":8,"android-device-type":"simulated","platform":"android"}}}}
**max-sessions is not expected to be here!**

ADDTIONAL PROPERTY must NOT have additional properties
{"server":{"relaxed-security":true,"base-path":"/wd/hub","keep-alive-timeout":300,"log-timestamp":true,"port":4723,"use-drivers":["espresso"],"use-plugins":["device-farm"],"plugin":{"device-farm":{"max-sessions":8,"android-device-type":"simulated","platform":"android"}}}}
**android-device-type is not expected to be here!**

Am I doing something wrong here? platform:android seems fine...

saikrishna321 commented 1 year ago

@ValzRon replace max-sessions as maxSession. android-device-type should be androidDeviceType

Check package.json for other properties

ValzRon commented 1 year ago

@saikrishna321 Thanks, i will try that. Question: If I want to use maxSessions with hub/node remote execution, do I set it only for Hub or for the node also? Does it even work with remote execution?

saikrishna321 commented 1 year ago

Yes, set it in the hub config please.

ValzRon commented 1 year ago

@saikrishna321 the server starts however the log seems incomplete:

2023-06-28 08:45:17:494 - [Appium] Welcome to Appium v2.0.0-rc.3
2023-06-28 08:45:17:496 - [Appium] Non-default server args:
2023-06-28 08:45:17:498 - [Appium] {
2023-06-28 08:45:17:498 - [Appium]   basePath: '/wd/hub',
2023-06-28 08:45:17:498 - [Appium]   keepAliveTimeout: 300,
2023-06-28 08:45:17:498 - [Appium]   logTimestamp: true,
2023-06-28 08:45:17:499 - [Appium]   relaxedSecurityEnabled: true,
2023-06-28 08:45:17:499 - [Appium]   usePlugins: [
2023-06-28 08:45:17:499 - [Appium]     'device-farm'
2023-06-28 08:45:17:499 - [Appium]   ],
2023-06-28 08:45:17:500 - [Appium]   plugin: {
2023-06-28 08:45:17:500 - [Appium]     'device-farm': {
2023-06-28 08:45:17:500 - [Appium]       androidDeviceType: 'simulated'
2023-06-28 08:45:17:500 - [Appium]     }
2023-06-28 08:45:17:500 - [Appium]   }
2023-06-28 08:45:17:501 - [Appium] }
2023-06-28 08:45:17:501 - [Appium] Attempting to load driver espresso...

Im using the above mentioned yaml with your corrections