Executing Selenium Grid test suite against a different URL on each node.

29 views
Skip to first unread message

Karl Portner

unread,
Oct 4, 2018, 10:09:54 PM10/4/18
to Selenium Users
Hi All,

I'm looking for a way on the Selenium Grid to execute the same test suite on each node, but having each node point to a different URL.  For example, TestSuite1 will run against www.mysite1.com on Node 1 and at the same time TestSuite1 will also run against www.mysite2.com on Node 2.  Is this possible?

Thanks

Karl Portner

unread,
Oct 5, 2018, 2:13:59 PM10/5/18
to Selenium Users
Any ideas?

⇜Krishnan Mahadevan⇝

unread,
Oct 30, 2018, 11:25:04 PM10/30/18
to seleniu...@googlegroups.com
Karl,

You should be able to do this easily at your client side (test side) using your TestRunner. You don't need Selenium Grid to deal with this for you. 
The benefit of doing this at your client side, is that you now no longer have to worry about which node the test is being routed to (which of-course is an internal behavior of the Grid Hub )

For example, assuming that you are using TestNG, you could basically create two <test> tags each which runs with a different URL and the URL is passed as a parameter to the <test> 

TestNG lets you build dynamic suites, so you don't need to worry about having to duplicate the <test> tag many times one per URL.
To learn how to build dynamic suites, please refer to my blog post: https://rationaleemotions.wordpress.com/2017/09/29/building-dynamic-testng-suites/

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ http://rationaleemotions.wordpress.com/


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/753104a3-0198-4139-a292-37fda3970444%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages