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!