在哪里可以找到Se 2网格集线器配置json的架构或文档?

Pre*_*ous 7 selenium selenium-webdriver

我有一个Se 2网格集线器正在运行.在哪里可以找到-hubConfig参数的效果和架构的文档?目前我的网格集线器显示:"updated with grid2 config : No hub config file specified. To specify one, use -hubConfig XXX.json where XXX.json is a hub config file".我可以使用没有配置的集线器.

我在博客和问题中找到了示例,但没有明确的文档.

博客:http://opensourcetester.co.uk/2011/07/06/selenium-grid-2/

问题:http://code.google.com/p/selenium/issues/detail?id = 2399

小智 11

我发现一个很好的起点是查看Selenium Grid 2代码库中的示例.

这是一个示例中心文件(假设我们将json文件命名为hub.json):

使用:java -jar selenium-server-standalone-2.6.0.jar -role hub -hubConfig hub.json

{
  "host": null,
  "port": 4444,
  "newSessionWaitTimeout": -1,
  "servlets" : [],
  "prioritizer": null,
  "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
  "throwOnCapabilityNotPresent": true,
  "nodePolling": 5000,

  "cleanUpCycle": 5000,
  "timeout": 300000,
  "maxSession": 5
}
Run Code Online (Sandbox Code Playgroud)

这是一个示例节点文件(假设该文件名为rc.json):

使用:java -jar selenium-server-standalone-2.6.0.jar -role rc -nodeConfig rc.json

{
  "capabilities":
      [
        {
          "browserName": "firefox",
          "maxInstances": 5
        },
        {
          "browserName": "chrome",
          "maxInstances": 5
        },
        {
          "browserName": "internet explorer",
          "maxInstances": 1
        }
      ],
    "configuration":
        {
        "nodeTimeout":120,
        "port":5555,

        "hubPort":4444,
        "hubHost":"localhost",

        "nodePolling":2000,

        "registerCycle":10000,
        "register":true,
        "cleanUpCycle":2000,
        "timeout":30000,
        "maxSession":5,
        }
}
Run Code Online (Sandbox Code Playgroud)

如果需要具有不同的配置,您可以创建角色"wd"的类似格式.