Selenium grid - Why it's needed

I’m facing the grid configuration and doing a workaround about but what I’ve learned is stopping me about this idea.

Configuration needed:

  • You need one selenium server running with the hub role and listening to the nodes.
  • N appium server instances as nodes for N devices you want to test which listen appium client and send the data to the hub.
  • N appium clients which are connected with each appium server.

So if you need to automate the test launching you need:

  • Take the list of all devices you have and get their names.
  • Launch one selenium server.
  • Launch N appium servers each one with a different JSON file and ports assigned.
  • Launch N appium clients each one with the parameters the client needs and the server needs.
    (Take into account that each appium client is controlled by the same code, so it seems unnecessary)

So my question is:
Why all this headache is needed if you can simply launch an appium server and an appium client through the same port?
What is really doing the selenium server?

(I’m controlling all the setup from a bash file and I started to feel seek when I saw all this huge configuration)
(huge because is needed to launch it dynamically independent).

I hope you could understand everything I exposed, sorry if my english is not as well as I needed.

Thank you for your time

Hope this reference will clarify some of your questions.

I think the correct approach should be.

1- Start Selenium server
2- Start Appium Server nodes and connect them with server and devices
3- Launch the test against the Selenium Server and it shares everything to the nodes

But as I’ve seen in my workaround (all your posts also), appium server should be capable of distributing all the data through each client instance.

BTW: I’ve read about launching two different drivers from the same client configuration and connecting them with two different appium servers but I’d not know how to make it with the XML file as you’ve said here:

Really thank you @bhaskar for understanding my question exposed, it’s a pleasure seeing someone with the same doubts. It means we are not so out of the way hahah

1 Like

For parallel device testing, Selenium server (acts as Hub) will create new sessions itself for each node you’ve registered and appium commands will reach the particular session with respect to the capabilities (device info.) provided accordingly.

Regards,
Bhaskar.

But I’ll have N instances of my program running, true?
It’s for this reason I was trying to execute one script with two driver instances OR (but I think it’s not possible) launching my script pointing to selenium server and it redirects to each node (so I have one instance of the test and the hub distributes everything)