Saturday, October 17, 2009

Rubymine Rocks

Of course I missed another post last week. Amazing how soccer, work, life in that order controls your time. Any rate I was not sure what to post this week. I have been extremely busy learning more about JMeter, BrowserMon and performance testing and creating new automated regression tests.

I decided to pass on writing about performance testing and make a couple statements as to why Rubymine ROCKS.

Number one reason Rubymine ROCKS is that when you are working with Ruby and XPath you can pause the script at the point of failure. Then you highlight the XPath code that is failing and hit F11. Now edit the day lights out of that XPath until you get the XPath to work.

Typically I have a copy of the target page up in another Firefox instance and viewing the HTML closely.

A second reason I like Rubymine is the ability to quickly see what methods are available and command-B to see what the methods are doing (is the correct term intellisense?).

Probably not the last reason I find, but when you want to refactor a term you can find it and replace it for the entire project. Most IDE do this, but I like how Rubymine does it.

I also like how Rubymine tells me gems are not attached. I like the fact that you can can place code in test mode and test one method at a time. And I also really like the fact that they fixed the rename functionality so the name actually appears and I can make minor changes versus having to type in an entire new name.

I have definitely become a fan of Rubymine. Go Horns! I mean RubyMine!

Rocking the Ruby code!

Friday, October 02, 2009

Selenium Brittleness

This will be a quick post, but I wanted to share a little tip. When using the Selenium IDE you often get xpath that looks similar to this. "//div[@id='location-bar']/div[2]/div[4]/a"

Well when attempting to do cross-browser testing this Xpath may not work for all browsers and relying on an index value that may change is a bit brittle.

One way to adjust this Xpath would be to make it look like this. "//div[@id='location-bar']/div[@class='this']/div[@class='that']/a"

Of course everything is dependent on how the object on the page is represented. Inspect the HTML closely.

Here are another helpful hints on clicking links. "//a[contains(@href,'stuff')]"
or "//a[contains(text(),'otherstuff')]"

I hope you find these pointers helpful.

Happy coding!