开发者

get the actual machine a client got from a selenium grid

Sometimes on开发者_Python百科e of the machines registered under the selenium grid gets shutdown, or something similar. Then, the grid starts reporting that it cannot start a new session. I would like, in such cases, to know which machine did the grid actually try to allocate for the session (we have ~70 machines so going through them one by one isn't practical). Is this data available somewhere?


I don't know how to do that using Selenium grid, but you can always have you own monitoring system to know exactly which machine is not working properly. I'm thinking on something like a script that iterates over the 70 ips, checking for Selenium RC listening on port 4444.

That way, you'll find the machine is not working, without even having to wait for selenium grid to fail.


After a lot of digging, the answer is, sadly - as of today, grid doesn't support any way of knowing this. The only thing to do is wait until they add that to their API.


I use Ant to run my Selenium tests (Windows only at themoment) and the the high level overview is

i) Restart the Grid (using psservice) ii) Kill all cmd.exe on client machines (using taskkill) iii) Start Selenium via a batch file on the client machine (using psexec) iv) Run Selenium tests

Therefore any dead machines and the Ant task fails.

However we are very early in our adoption of Selenium and our tests are minimal and there is only one client so far (but plans for lots more!)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜