我有一个 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
最佳答案
我发现一个很好的起点是查看 examples in the Selenium Grid 2 code base .
这是一个示例集线器文件(假设我们将 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
}
这是一个示例节点文件(假设文件名为 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,
}
}
如果需要不同的配置,您可以为角色“wd”创建使用类似的格式。
关于selenium - 在哪里可以找到 Se 2 网格集线器配置 json 的架构或文档?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7405912/