Category: Ruby
More Ruby goodness for testing
July 10, 2014
Did I mention how much I love Ruby? items = (“A”..”Z”).to_a.in_groups(5,false) 5.times do | i | puts items[i].flatten.to_s puts “—-” end Source code is at http://apidock.com/rails/Array/in_groups
Cool Watir-related gem from Tim Koopmans
May 18, 2011
Tim seems to be pretty busy now that he’s a free agent, so I’m looking forward to trying this new(ish) gem he announced recently for querying browser performance stats. I can’t believe it’s been as long as it has since I last posted. This has mostly been because I’ve been busy preparing to become a dad. […]
Test automation styles and alternatives to the Page Object pattern
January 25, 2011
Alister Scott has posted some code examples on watirmelon.com that show different solutions to a problem that arises for people implementing the Page Object pattern for test automation. I found Alister’s approach solutions interesting, because as my automation usually models business/user goals and/or domain features/concepts, I don’t often have my own page abstraction. See http://gojko.net/2009/10/06/putting-selenium-in-the-right-place/ […]
Progress bar for Ruby Sequel datasets
September 28, 2010
I’m hacking away at a tool to give me better JMeter results, and I needed to see progress as I iterated through the data I’d imported into MySQL. The progress bar described in my earlier post can be made to work with a simple addition: class Sequel::Dataset alias :size :count end This adds the necessary […]
Does cucumber suck?
August 31, 2010
I’ve been having a lot of rants about Cucumber of late, as it’s the new shiny thing for agile teams. Does anyone else have issues with it? I’ve asked all of my programmer friends to convince me of its worth, and they’ve all failed so far. I’ve not seen it adding any value above building […]
The state of Ruby versions
August 10, 2010
As much as I love using Ruby, it’s become more frustrating over time. Developers are feeling this, and as a tester, I’ve had my share as well. This article, passed on by James Ladd sums things up for me (for testing, as well as development). The best example of this in the Watir space is […]
Watching/tailing multiple log files at the same time with Ruby’s NET::SSH library
May 19, 2010
A good testing habit when working with web apps is to monitor the log files of servers as you test. In some cases this is easy, especially where there’s a single application server. With the trend toward more service-oriented architectures, and server clusters for high-traffic applications, the environments I’m working in tend to have many […]
Text-based progress bar in Ruby for command line programs
January 13, 2010
When I’m running tests and tools, I frequently want to know how far through I am. I’d built a class to help with this a while back, but Corey Goldberg’s recent post on a python version prompted me to post this Ruby version. First, you’ll need to save this to progress_bar.rb: class Progress_bar attr_accessor :items_to_do, […]
Big XML files, REXML and learning about stream parsers
June 27, 2007
After taking the easy route and building some XML check test scripts using Ruby and REXML’s DOM access, I decided that I really didn’t want my computer grinding to a halt for a whole day while it parsed a gig and a half of XML. So it was time to try a streaming parser. Unfortunately, […]
Ruby, windows, command lines and problems
June 6, 2007
I’ve been building tools for web service testing using Ruby and its SOAP libraries. I hope to write more on this later, but for now, a pointer to a simple problem that took up far too much time. My test toolkit has three small programs, each providing different services. The first can be passed a […]