Thursday, July 31, 2008


I'm working on a Rails project at the moment, and we're using Selenium. That's great, but now we want to move it all onto Selenium Grid. Why? Well, the few tests we have already take something like 15 minutes to run, and it would be nice to be able to spread out the work a little bit. Fifteen minutes is just too long to wait for feedback on a change while doing development, and it's only going to get worse.

I've been working on actually moving the tests to the grid. There are some variables that you set when you run the test: SELENIUM_SERVER_ADDRESS, SELENIUM_PORT, SELENIUM_TEST_ADDRESS, Browser, etc. In getting this working, I've found these variables specified in no fewer than 10 different places in each project!

That's what I call overspecifying.

Sure, you can set these variables, and in theory they will trump each other, but setting them in this many places only leads to problems. How do you know which one(s) to change?

So, unless there's some really good explanation I haven't thought of, stick to setting your test variables in only one location. Just because you can set something and override it doesn't mean you should.

No comments:

Post a Comment