Archive for February, 2009

CubicTest, with pictures

Sunday, February 8th, 2009

In a recent post, I mentioned that I was planning on writing a test in CubicTest to help refactor an IP address validator web page.

I finished the test, and fixed the script. My overall impression is that CubicTest is fairly straightforward, and I have not yet used it to its strengths. I still want to play with subtests, test suites, and custom test steps.

Now for the pictures:

The IP Validator looks like this:

IP Address Validator, initial view

IP Address Validator, initial view

When you enter a possible IP address and click the button, the server-side script returns a nifty table with the result:

Validator after entering a good address

Validator after entering a good address

Unfortunately, there was a bug in the script. After the third address checked, the display looked like this:

Validator showing display bug

Validator showing display bug

That bug is not the interesting bug I wanted to keep. Here’s the quick test I came up with, using the CubicTest plugin:

Test for validator

Test for validator

During the test development, I added id attributes to the result table elements. That made the common contexts much easier to specify. And I had a few go rounds with eclipse editor weirdness switching the sense of the last check from “text on the page” to “text not on the page”.

OSTATLI a success, and a lot of fun

Friday, February 6th, 2009

Yesterday, I was one of the attendees at the Open Source Test Automation Tool Love-In, hosted by Elisabeth Hendrickson at the QualityTree offices here in the Bay Area.

Other attendees included Dale Emery, Chris Sims, Jeffrey Frederick, Ken Pier, and Kevin Lawrence.

We chatted a bit about test automation philosophy, told war stories, and played with the tools.

I watched Elisabeth set up a RobotFramework test for some ATDD work she is doing with a new website. When she showed the “fixture” code and the interface capabilities of the tool, I was hooked. I’m going to write up some tests for the big-app-at-work next week.

Kevin Lawrence gave a demo of what he accomplished after 10 minutes of playing with CubicTest. It reminded me of the graphical workflow test for rails Brian Marick was working on.

Last night, I managed to get seleniumrc up and running on my MacBook, then this morning I got cubictest installed and running in eclipse. I think I’ll use it to write tests so I can refactor my ip address validator (the one with the interesting bug I’m keeping in, but the annoying bugs I want to fix).

Finally, Elisabeth shared a pointer to UISpec4J as a good unit test library for Swing.

Lots of other tool goodness happened, too.

Thanks again, Elisabeth, for calling and hosting the event.

Test Data Management

Wednesday, February 4th, 2009

A quick hint about managing test data for “enterprise” applications.

Does the application under test rely on a large central database?

If so, is that large central database backed up on a regular basis?

If so, can you get access to the backup files?

For some testing tasks, it might be easier to just load a new database instance from those backups than to create and populate a database from scratch.

In one case, we dropped, truncated, and pruned a number of tables from the backup, then created a new backup file. A much smaller backup file. One that loaded in one hour instead of many hours.