Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get statistics for selenium grid utilization

I'm using selenium grid with 13 nodes, each one is limited to one chrome instance. My project uses most of those nodes on different times.

In the future, I will need to add more nodes - due to more tests, parallel exec., different browsers , etc. The problem is that I can't tell exactly what is the utilization of the grid's nodes.

is there a way to get the following statistics from the grid:

  1. nodes idle / busy time in % - determine if the node was busy most of the time or idle most of the time
  2. amount of executed test since the node was started
  3. running time - duration since the node was started

thanks Tizki

like image 879
Tidhar Klein Orbach Avatar asked Nov 06 '13 07:11

Tidhar Klein Orbach


1 Answers

You may create a Servlet on the hub so that you can check those statistics directly from a browser just by loading the URL. Check the class RegistryBasedServlet.

Then on the node's launch script you will launch that node directly from a launcher java class that contains a loop that collects all the information you neeed on that node.

You could also use that loop to update that node configuration and re-register on the hub.

Then from the servlet, you may process all node and collect all the information. From the hub's registry and/or the servlet.

like image 101
amk Avatar answered Oct 02 '22 13:10

amk