|
1 | 1 | #!/bin/bash |
2 | 2 |
|
3 | | -#IMPORTANT!!! Don't do any echo otherwise you corrupt generated nodeconfig.json |
| 3 | +#IMPORTANT!!! Don't do any echo otherwise you corrupt generated nodeconfig.toml |
4 | 4 | # convert to lower case using Linux/Mac compatible syntax (bash v3.2) |
5 | 5 | PLATFORM_NAME=`echo "$PLATFORM_NAME" | tr '[:upper:]' '[:lower:]'` |
6 | 6 | cat << EndOfMessage |
7 | | -{ |
8 | | - "capabilities": |
9 | | - [ |
10 | | - { |
11 | | - "maxInstances": 1, |
12 | | - "deviceName": "${DEVICE_NAME}", |
13 | | - "deviceType": "${DEVICETYPE}", |
14 | | - "platformName":"${PLATFORM_NAME}", |
15 | | - "platformVersion":"${PLATFORM_VERSION}", |
16 | | - "udid": "${DEVICE_UDID}", |
17 | | - "adb_port": ${ADB_PORT}, |
18 | | - "proxy_port": ${PROXY_PORT}, |
19 | | - "automationName": "${AUTOMATION_NAME}" |
20 | | - } |
21 | | - ], |
22 | | - "configuration": |
23 | | - { |
24 | | - "proxy": "com.zebrunner.mcloud.grid.MobileRemoteProxy", |
25 | | - "url":"http://${STF_PROVIDER_HOST}:${APPIUM_PORT}/wd/hub", |
26 | | - "host": "${STF_PROVIDER_HOST}", |
27 | | - "port": ${APPIUM_PORT}, |
28 | | - "hubHost": "${SELENIUM_HOST}", |
29 | | - "hubPort": ${SELENIUM_PORT}, |
30 | | - "maxSession": 1, |
31 | | - "register": true, |
32 | | - "registerCycle": 300000, |
33 | | - "cleanUpCycle": 5000, |
34 | | - "timeout": 180, |
35 | | - "browserTimeout": 0, |
36 | | - "nodeStatusCheckTimeout": 5000, |
37 | | - "nodePolling": 5000, |
38 | | - "role": "node", |
39 | | - "unregisterIfStillDownAfter": ${UNREGISTER_IF_STILL_DOWN_AFTER}, |
40 | | - "downPollingLimit": 2, |
41 | | - "debug": false, |
42 | | - "servlets" : [], |
43 | | - "withoutServlets": [], |
44 | | - "custom": {} |
45 | | - } |
46 | | -} |
| 7 | +[node] |
| 8 | +# Autodetect which drivers are available on the current system, and add them to the Node. |
| 9 | +detect-drivers = false |
| 10 | +
|
| 11 | +# Maximum number of concurrent sessions. Default value is the number of available processors. |
| 12 | +max-sessions = 1 |
| 13 | +
|
| 14 | +# Full classname of non-default Node implementation. This is used to manage a session’s lifecycle. |
| 15 | +implementation = "com.zebrunner.mcloud.grid.MobileRemoteProxy" |
| 16 | +
|
| 17 | +# The address of the Hub in a Hub-and-Node configuration. |
| 18 | +hub = "http://${SELENIUM_HOST}:${SELENIUM_PORT}" |
| 19 | +
|
| 20 | +# How often, in seconds, the Node will try to register itself for the first time to the Distributor. |
| 21 | +register-cycle = $REGISTER_CYCLE |
| 22 | +
|
| 23 | +# How long, in seconds, will the Node try to register to the Distributor for the first time. |
| 24 | +# After this period is completed, the Node will not attempt to register again. |
| 25 | +register-period = $REGISTER_PERIOD |
| 26 | +
|
| 27 | +# How often, in seconds, will the Node send heartbeat events to the Distributor to inform it that the Node is up. |
| 28 | +heartbeat-period = $HEARTBEAT_PERIOD |
| 29 | +
|
| 30 | +# Let X be the session-timeout in seconds. |
| 31 | +# The Node will automatically kill a session that has not had any activity in the last X seconds. |
| 32 | +# This will release the slot for other tests. |
| 33 | +session-timeout = $GRID_BROWSER_TIMEOUT |
| 34 | +
|
| 35 | +[relay] |
| 36 | +# URL for connecting to the service that supports WebDriver commands like an Appium server or a cloud service. |
| 37 | +url = "http://localhost:4723/wd/hub" |
| 38 | +
|
| 39 | +# Optional, endpoint to query the WebDriver service status, an HTTP 200 response is expected |
| 40 | +status-endpoint = "/status" |
| 41 | +
|
| 42 | +# Stereotypes supported by the service. The initial number is "max-sessions", and will allocate |
| 43 | +# that many test slots to that particular configuration |
| 44 | +configs = [ |
| 45 | + "1", "{\"platformName\": \"${PLATFORM_NAME}\", \"appium:platformVersion\": \"${PLATFORM_VERSION}\", \"appium:deviceName\": \"${DEVICE_NAME}\", \"appium:automationName\": \"${AUTOMATION_NAME}\", \"zebrunner:deviceType\": \"${DEVICETYPE}\", \"appium:udid\": \"${DEVICE_UDID}\", \"zebrunner:adb_port\": \"${ADB_PORT}\", \"zebrunner:proxy_port\": \"${PROXY_PORT}\" }" |
| 46 | +] |
| 47 | +
|
| 48 | +[logging] |
| 49 | +# Log level. Default logging level is INFO. Log levels are described here |
| 50 | +# https://docs.oracle.com/javase/7/docs/api/java/util/logging/Level.html |
| 51 | +log-level = "${NODE_LOG_LEVEL}" |
| 52 | +
|
| 53 | +# Enable http logging. Tracing should be enabled to log http logs. |
| 54 | +http-logs = "${HTTP_LOGS}" |
| 55 | +
|
| 56 | +[events] |
| 57 | +publish-events = "tcp://${SELENIUM_HOST}:${PUBLISH_EVENTS_PORT}" |
| 58 | +subscribe-events = "tcp://${SELENIUM_HOST}:${SUBSCRIBE_EVENTS_PORT}" |
47 | 59 | EndOfMessage |
0 commit comments