2017-04-13 47 views
1

我正在完成將Selenium Hub/Nodes升級到3.3版的過程。 一切工作正常,但我想確保我有最佳配置...問題是我找不到任何地方的Hub/Node屬性的完整列表。Selenium Grid Hub/Node Config的屬性

我看遍了:

這些文檔只表S通過示例配置來了解屬性,但沒有一個看起來像是一個完整的列表,更重要的是它們中沒有一個實際上說明了這些屬性的作用。 Selenium Hub/Nodes的配置屬性的完整列表的文檔在哪裏?

回答

7

本文檔可通過Selenium獨立超級罐自己。

java -jar selenium-server-standalone-3.3.1.jar -help

Usage: <main class> [options] 
    Options: 
    --version, -version 
     Displays the version and exits. 
     Default: false 
    -browserTimeout 
     <Integer> in seconds : number of seconds a browser session is allowed to 
     hang while a WebDriver command is running (example: driver.get(url)). If the 
     timeout is reached while a WebDriver command is still processing, the session 
     will quit. Minimum value is 60. An unspecified, zero, or negative value means 
     wait indefinitely. 
     Default: 0 
    -debug 
     <Boolean> : enables LogLevel.FINE. 
     Default: false 
    -jettyThreads, -jettyMaxThreads 
     <Integer> : max number of threads for Jetty. An unspecified, zero, or 
     negative value means the Jetty default value (200) will be used. 
    -log 
     <String> filename : the filename to use for logging. If omitted, will log 
     to STDOUT 
    -port 
     <Integer> : the port number the server will use. 
     Default: 4444 
    -role 
     <String> options are [hub], [node], or [standalone]. 
     Default: standalone 
    -timeout, -sessionTimeout 
     <Integer> in seconds : Specifies the timeout before the server 
     automatically kills a session that hasn't had any activity in the last X seconds. The 
     test slot will then be released for another test to use. This is typically 
     used to take care of client crashes. For grid hub/node roles, cleanUpCycle 
     must also be set. 
     Default: 1800 

有關hub作用

java -jar selenium-server-standalone-3.3.1.jar -role hub -help

Usage: <main class> [options] 
    Options: 
    --version, -version 
     Displays the version and exits. 
     Default: false 
    -browserTimeout 
     <Integer> in seconds : number of seconds a browser session is allowed to 
     hang while a WebDriver command is running (example: driver.get(url)). If the 
     timeout is reached while a WebDriver command is still processing, the session 
     will quit. Minimum value is 60. An unspecified, zero, or negative value means 
     wait indefinitely. 
     Default: 0 
    -matcher, -capabilityMatcher 
     <String> class name : a class implementing the CapabilityMatcher 
     interface. Specifies the logic the hub will follow to define whether a request can 
     be assigned to a node. For example, if you want to have the matching process 
     use regular expressions instead of exact match when specifying browser 
     version. ALL nodes of a grid ecosystem would then use the same capabilityMatcher, 
     as defined here. 
     Default: [email protected] 
    -cleanUpCycle 
     <Integer> in ms : specifies how often the hub will poll running proxies 
     for timed-out (i.e. hung) threads. Must also specify "timeout" option 
     Default: 5000 
    -custom 
     <String> : comma separated key=value pairs for custom grid extensions. 
     NOT RECOMMENDED -- may be deprecated in a future revision. Example: -custom 
     myParamA=Value1,myParamB=Value2 
     Default: {} 
    -debug 
     <Boolean> : enables LogLevel.FINE. 
     Default: false 
    -host 
     <String> IP or hostname : usually determined automatically. Most commonly 
     useful in exotic network configurations (e.g. network with VPN) 
    -hubConfig 
     <String> filename: a JSON file (following grid2 format), which defines 
     the hub properties 
    -jettyThreads, -jettyMaxThreads 
     <Integer> : max number of threads for Jetty. An unspecified, zero, or 
     negative value means the Jetty default value (200) will be used. 
    -log 
     <String> filename : the filename to use for logging. If omitted, will log 
     to STDOUT 
    -maxSession 
     <Integer> max number of tests that can run at the same time on the node, 
     irrespective of the browser used 
    -newSessionWaitTimeout 
     <Integer> in ms : The time after which a new test waiting for a node to 
     become available will time out. When that happens, the test will throw an 
     exception before attempting to start a browser. An unspecified, zero, or negative 
     value means wait indefinitely. 
     Default: -1 
    -port 
     <Integer> : the port number the server will use. 
     Default: 4444 
    -prioritizer 
     <String> class name : a class implementing the Prioritizer interface. 
     Specify a custom Prioritizer if you want to sort the order in which new session 
     requests are processed when there is a queue. Default to null (no priority = FIFO 
     ) 
    -role 
     <String> options are [hub], [node], or [standalone]. 
     Default: hub 
    -servlet, -servlets 
     <String> : list of extra servlets the grid (hub or node) will make 
     available. Specify multiple on the command line: -servlet tld.company.ServletA 
     -servlet tld.company.ServletB. The servlet must exist in the path: 
     /grid/admin/ServletA /grid/admin/ServletB 
     Default: [] 
    -timeout, -sessionTimeout 
     <Integer> in seconds : Specifies the timeout before the server 
     automatically kills a session that hasn't had any activity in the last X seconds. The 
     test slot will then be released for another test to use. This is typically 
     used to take care of client crashes. For grid hub/node roles, cleanUpCycle 
     must also be set. 
     Default: 1800 
    -throwOnCapabilityNotPresent 
     <Boolean> true or false : If true, the hub will reject all test requests 
     if no compatible proxy is currently registered. If set to false, the request 
     will queue until a node supporting the capability is registered with the grid. 
     Default: true 
    -withoutServlet, -withoutServlets 
     <String> : list of default (hub or node) servlets to disable. Advanced 
     use cases only. Not all default servlets can be disabled. Specify multiple on 
     the command line: -withoutServlet tld.company.ServletA -withoutServlet 
     tld.company.ServletB 
     Default: [] 

幫助有關幫助在node作用

java -jar selenium-server-standalone-3.3.1.jar -role node -help

Usage: <main class> [options] 
    Options: 
    --version, -version 
     Displays the version and exits. 
     Default: false 
    -browserTimeout 
     <Integer> in seconds : number of seconds a browser session is allowed to 
     hang while a WebDriver command is running (example: driver.get(url)). If the 
     timeout is reached while a WebDriver command is still processing, the session 
     will quit. Minimum value is 60. An unspecified, zero, or negative value means 
     wait indefinitely. 
     Default: 0 
    -capabilities, -browser 
     <String> : comma separated Capability values. Example: -capabilities 
     browserName=firefox,platform=linux -capabilities browserName=chrome,platform=linux 
     Default: [Capabilities [{seleniumProtocol=WebDriver, browserName=chrome, maxInstances=5}], Capabilities [{seleniumProtocol=WebDriver, browserName=firefox, maxInstances=5}], Capabilities [{seleniumProtocol=WebDriver, browserName=internet explorer, maxInstances=1}]] 
    -cleanUpCycle 
     <Integer> in ms : specifies how often the hub will poll running proxies 
     for timed-out (i.e. hung) threads. Must also specify "timeout" option 
    -custom 
     <String> : comma separated key=value pairs for custom grid extensions. 
     NOT RECOMMENDED -- may be deprecated in a future revision. Example: -custom 
     myParamA=Value1,myParamB=Value2 
     Default: {} 
    -debug 
     <Boolean> : enables LogLevel.FINE. 
     Default: false 
    -downPollingLimit 
     <Integer> : node is marked as "down" if the node hasn't responded after 
     the number of checks specified in [downPollingLimit]. 
     Default: 2 
    -host 
     <String> IP or hostname : usually determined automatically. Most commonly 
     useful in exotic network configurations (e.g. network with VPN) 
    -hub 
     <String> : the url that will be used to post the registration request. 
     This option takes precedence over -hubHost and -hubPort options. 
     Default: http://localhost:4444 
    -hubHost 
     <String> IP or hostname : the host address of the hub we're attempting to 
     register with. If -hub is specified the -hubHost is determined from it. 
    -hubPort 
     <Integer> : the port of the hub we're attempting to register with. If 
     -hub is specified the -hubPort is determined from it. 
    -id 
     <String> : optional unique identifier for the node. Defaults to the url 
     of the remoteHost, when not specified. 
    -jettyThreads, -jettyMaxThreads 
     <Integer> : max number of threads for Jetty. An unspecified, zero, or 
     negative value means the Jetty default value (200) will be used. 
    -log 
     <String> filename : the filename to use for logging. If omitted, will log 
     to STDOUT 
    -maxSession 
     <Integer> max number of tests that can run at the same time on the node, 
     irrespective of the browser used 
     Default: 5 
    -nodeConfig 
     <String> filename : JSON configuration file for the node. Overrides 
     default values 
    -nodePolling 
     <Integer> in ms : specifies how often the hub will poll to see if the 
     node is still responding. 
     Default: 5000 
    -nodeStatusCheckTimeout 
     <Integer> in ms : connection/socket timeout, used for node "nodePolling" 
     check. 
     Default: 5000 
    -port 
     <Integer> : the port number the server will use. 
     Default: 5555 
    -proxy 
     <String> : the class used to represent the node proxy. Default is 
     [org.openqa.grid.selenium.proxy.DefaultRemoteProxy]. 
     Default: org.openqa.grid.selenium.proxy.DefaultRemoteProxy 
    -register 
     if specified, node will attempt to re-register itself automatically with 
     its known grid hub if the hub becomes unavailable. 
     Default: true 
    -registerCycle 
     <Integer> in ms : specifies how often the node will try to register 
     itself again. Allows administrator to restart the hub without restarting (or 
     risk orphaning) registered nodes. Must be specified with the "-register" 
     option. 
     Default: 5000 
    -role 
     <String> options are [hub], [node], or [standalone]. 
     Default: node 
    -servlet, -servlets 
     <String> : list of extra servlets the grid (hub or node) will make 
     available. Specify multiple on the command line: -servlet tld.company.ServletA 
     -servlet tld.company.ServletB. The servlet must exist in the path: 
     /grid/admin/ServletA /grid/admin/ServletB 
     Default: [] 
    -timeout, -sessionTimeout 
     <Integer> in seconds : Specifies the timeout before the server 
     automatically kills a session that hasn't had any activity in the last X seconds. The 
     test slot will then be released for another test to use. This is typically 
     used to take care of client crashes. For grid hub/node roles, cleanUpCycle 
     must also be set. 
     Default: 1800 
    -unregisterIfStillDownAfter 
     <Integer> in ms : if the node remains down for more than 
     [unregisterIfStillDownAfter] ms, it will stop attempting to re-register from the hub. 
     Default: 60000 
    -withoutServlet, -withoutServlets 
     <String> : list of default (hub or node) servlets to disable. Advanced 
     use cases only. Not all default servlets can be disabled. Specify multiple on 
     the command line: -withoutServlet tld.company.ServletA -withoutServlet 
     tld.company.ServletB 
     Default: [] 
+0

omg不敢相信我以前沒有找到...非常感謝! – Gunderson

+0

非常感謝,有一個問題,是否可以禁用「網格/控制檯」頁面? –

+0

@ElheniMokhles可以通過參數'-withoutServlet'來禁用以下servlet:1.'org.openqa.grid.web.servlet.beta.ConsoleServlet',2.'org.openqa.grid.web.servlet.LifecycleServlet' ,3.'org.openqa.grid.web.servlet.Grid1HeartbeatServlet' –