Archive for the 'ruby' Category

Everybody stand back

Steve Hayes writes that Scripting for Testershas the clearest explanation of regular expressions that I’ve come across.” Assuming it’s not the only explanation he’s read, I’m immensely pleased. I think regular expressions are terribly important for my intended audience*, and I was worried my explanation wasn’t good enough.

* As I write, I’m wearing my regular expression T-shirt:

Czech Ruby/Rails conference

I’ve been asked to post a pointer to the first Czech Ruby / Ruby on Rails conference. It would be fun to go, but I surely won’t make it. You can, though.

MoB-FAT 1: Controller channels

I am going to write a document called “The Mechanics of Business-Facing Automated Tests”. I’ll be posting drafts of the different chunks here, hoping that you’ll help me improve it. I’m interested in improvements to the ideas and the flow of explanation rather than line-by-line or word-by-word improvements. Thanks.

The sample application is only a realistic sketch. It pretends to be the server part of a system used by travel agents. For my own convenience, I wrote the application in Ruby, but I’m treating it just as I would were it in Java. The tests are written in Ruby for the reasons I gave earlier.

The real travel agency app In normal use, the application is a server that communicates with a client and with airline servers. The server communicates to the client via XML messages over a network. To communicate with airline servers, it drops files on disk to be picked up by FTP. Airline servers deliver files in the same way.
(more…)

Independent invention

I’m not the only person thinking of writing Fit-like tests in Ruby. Zenspider had the same idea first.

The tenth time you say it, decide that it’s wrong

That title seems like a good motto in general. Here’s a specific instance.

I was on a short consulting trip recently. We talked about Fit. I said the two things that I’ve said to clients at least ten times:

“I recommend using Fit when the product director wants to read the tests or when the data is naturally tabular. If the product director doesn’t care or if the test is a do-this-do-that-check-this type test, I’d rather you used xUnit.”

“There are no decent HTML editors. The most tolerable I’ve found is OpenOffice, but they’re all a pain when you want to modify tables.”

There’s a contradiction here. If the product director doesn’t care, why would you write a tabular test in HTML? Because using xUnit means you have to keep columns aligned, and that’s a pain. So use HTML and have the browser line up the columns. But I just said that editing HTML is also a pain. And I never gave much thought to which is the greater pain.

(more…)