Structure of Selenium project

238 views
Skip to first unread message

alex...@gmail.com

unread,
Sep 8, 2015, 8:45:50 PM9/8/15
to Selenium Developers
Hi folks,

I've been doing some work on the Selenium code base and have some questions I'm hoping you can help me out with.

I was working a lot running a large Selenium Grid before and wanted to do some work on the Hub but was intimidated by the large, monolithic code base, which I didn't have time to parse in that role. When I had time, I went through and analyzed and extracted the Grid code and refactored it into separate small projects that were easier to work with in git (the Selenium project is gigs now I believe) and modularized it.

Essentially the hub just launches a bunch of servlets, so I put each of these into it's own module so you can easily pull in whatever versions you want. The underlying utility code I broke into three modules: 

  • one with the org/openqa/selenium/remote/server classes
  • one with the org/openqa/selenium/server and cybervillains/ca classes
  • and one with the org/openqa/grid classes
I'm not really sure what the difference between these classes is, and there was probably no reason to put them into three different modules, so I will probably consolidate them into one.

After a three day marathon session getting all that done, I tried to setup some VMs to play around with it, then haven't had time to work on it, but as I am not embarking on building a large Grid implementation for a client this is a good opportunity to continue working on improving it, and I have some other functionality I would like to add later. I have a few questions I'm hoping someone can help me with though:

  • All of these classes come from the java/server section of the Selenium project. Am I correct in assuming that this "server" part of the code base is only representing the Selenium Grid classes, or are these classes used somewhere else in the project? When I use Selenium without a Grid, is this server code also used to implement a standalone implementation of Selenium?
  • The actual WebDriver interface that is used when coding tests is in the java/client section of the Selenium project. I am assuming that this is the content of the
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-java</artifactId>
   Selenium Maven artifact used to develop tests? Is everything in the java/client what is used to implement Selenium tests (that would make sense), and everything in java/server just used for the Grid?

Anyone who is interested can see and use the code at https://github.com/SeleniumGridRefactor . There is some other stuff in there, basically JMX hooks so I could see what was going on inside as I attempted to reverse engineer the project; I will probably roll those back and go back to the original code base, refactor it and then start there with a reference refactor implementation. There were a couple tight coupling problems which I solved with an interface but other than that it broke up fairly easily.

Excuse my ignorance but a little bit of knowledge from those who already know it could probably save me a lot of time in decyphering it myself. Thanks!

alko

unread,
Nov 22, 2015, 8:05:06 AM11/22/15
to Selenium Developers
Well, after over two months and no reply, I took my question to the source and asked Francois. 

He said the classes in the Grid project are completely independent from the rest of the code, so I can break it all off without worrying about having to keep it in synch with the main code base.

So is this forum dead, or does no one know the answer, or are they just not bothering to answer? Anyhow I have what I need to do what I need to do, so I guess I'm off :)

Daniel Davison

unread,
Dec 1, 2015, 4:21:33 PM12/1/15
to Selenium Developers
hey alko, sorry you got no response..

The group isn't dead - the reason you didn't get a reply is probably because of deferral :) User 1 thinks that maybe User 2 will answer. but User 2 thinks User 3 will answer.  but how about that - User 3 thinks User 1 will answer.


We reply as best we can but this probably just slipped through the cracks.. Sorry about that.

alko

unread,
Dec 12, 2015, 4:11:58 AM12/12/15
to Selenium Developers
Fair enough. Thanks for your response.

Let me know if you need any input on Ansible :)

Thanks

Alex
Reply all
Reply to author
Forward
0 new messages